diff --git a/modules/codec/avcodec/dxva2.c b/modules/codec/avcodec/dxva2.c
index f9e7c405dee03d372f18efa44a7f125e3c21b739..bdcc6bffb346cd9fb17475f984779d98130a3ffb 100644
--- a/modules/codec/avcodec/dxva2.c
+++ b/modules/codec/avcodec/dxva2.c
@@ -884,6 +884,7 @@ static int DxCreateVideoDecoder(vlc_va_t *va,
     sys->surface_height = (fmt->i_height + 15) & ~15;
     int surface_count;
     switch (codec_id) {
+    case AV_CODEC_ID_HEVC:
     case AV_CODEC_ID_H264:
         surface_count = 16 + sys->thread_count + 2;
         break;