Skip to content

nvdec: guard against missing CUDA definition

@robUx4 any idea why I need this workaround to build? master is failing for me with:

make[4]: Entering directory '/big-repos/vlc/modules'
  CC       hw/nvdec/nvdec.lo
hw/nvdec/nvdec.c: In function ‘HandleVideoSequence’:
hw/nvdec/nvdec.c:330:67: error: ‘CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT’ undeclared (first use in this function)
  330 |         ret = CALL_CUDA_DEC(cuDeviceGetAttribute, &tex_alignment, CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT, cuDev);
      |                                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hw/nvdec/nvdec.c:107:118: note: in definition of macro ‘CALL_CUDA_DEC’
  107 | #define CALL_CUDA_DEC(func, ...) CudaCheckErr(VLC_OBJECT(p_dec),  devsys->cudaFunctions, devsys->cudaFunctions->func(__VA_ARGS__), #func)
      |                                                                                                                      ^~~~~~~~~~~
hw/nvdec/nvdec.c:330:67: note: each undeclared identifier is reported only once for each function it appears in
  330 |         ret = CALL_CUDA_DEC(cuDeviceGetAttribute, &tex_alignment, CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT, cuDev);
      |                                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hw/nvdec/nvdec.c:107:118: note: in definition of macro ‘CALL_CUDA_DEC’
  107 | #define CALL_CUDA_DEC(func, ...) CudaCheckErr(VLC_OBJECT(p_dec),  devsys->cudaFunctions, devsys->cudaFunctions->func(__VA_ARGS__), #func)
      |                                                                                                                      ^~~~~~~~~~~
make[4]: *** [Makefile:27080: hw/nvdec/nvdec.lo] Error 1
make[4]: Leaving directory '/big-repos/vlc/modules'
make[3]: *** [Makefile:37093: all-recursive] Error 1
make[3]: Leaving directory '/big-repos/vlc/modules'
make[2]: *** [Makefile:15527: all] Error 2
make[2]: Leaving directory '/big-repos/vlc/modules'
make[1]: *** [Makefile:1614: all-recursive] Error 1
make[1]: Leaving directory '/big-repos/vlc'
make: *** [Makefile:1501: all] Error 2
Edited by Tristan Matthews

Merge request reports

Loading