-
Notifications
You must be signed in to change notification settings - Fork 726
Open
Labels
Description
Environment
Operating System: Windows 11
Version / Commit SHA: v12.1.1 (e3a9b1c)
Other: DirectXShaderCompiler 1.8.2403.2 (11e1318)
Describe the bug
When PNanoVDB.h is included in the HLSL shader and the PNANOVDB_HLSL define is set as the only define the DXC compiler reports a bunch of errors related to the fact that PNANOVDB_GRID_TYPE_CAP is set to 32, while it seems it should be 28. Manually editing the file and changing the value to 28 fixes the issue.
data/shader/common/PNanoVDB.h:1153:106: error: too few elements in vector initialization (expected 32 elements, have 28)
PNANOVDB_STATIC_CONST pnanovdb_uint32_t pnanovdb_grid_type_value_strides_bits[PNANOVDB_GRID_TYPE_CAP] = { 0, 32, 64, 16, 32, 64, 96, 192, 0, 16, 32, 1, 32, 4, 8, 16, 0, 128, 256, 0, 0, 0, 0, 16, 24, 48, 8, 0 };
^
data/shader/common/PNanoVDB.h:1155:106: error: too few elements in vector initialization (expected 32 elements, have 28)
PNANOVDB_STATIC_CONST pnanovdb_uint32_t pnanovdb_grid_type_table_strides_bits[PNANOVDB_GRID_TYPE_CAP] = { 64, 64, 64, 64, 64, 64, 128, 192, 64, 64, 64, 64, 64, 64, 64, 64, 64, 128, 256, 64, 64, 64, 64, 64, 64, 64, 64, 64 };
^
data/shader/common/PNanoVDB.h:1157:106: error: too few elements in vector initialization (expected 32 elements, have 28)
PNANOVDB_STATIC_CONST pnanovdb_uint32_t pnanovdb_grid_type_minmax_strides_bits[PNANOVDB_GRID_TYPE_CAP] = { 0, 32, 64, 16, 32, 64, 96, 192, 8, 16, 32, 8, 32, 32, 32, 32, 32, 128, 256, 64, 64, 64, 64, 64, 24, 48, 8, 0 };
^
data/shader/common/PNanoVDB.h:1159:106: error: too few elements in vector initialization (expected 32 elements, have 28)
PNANOVDB_STATIC_CONST pnanovdb_uint32_t pnanovdb_grid_type_minmax_aligns_bits[PNANOVDB_GRID_TYPE_CAP] = { 0, 32, 64, 16, 32, 64, 32, 64, 8, 16, 32, 8, 32, 32, 32, 32, 32, 32, 64, 64, 64, 64, 64, 64, 8, 16, 8, 0 };
^
data/shader/common/PNanoVDB.h:1161:106: error: too few elements in vector initialization (expected 32 elements, have 28)
PNANOVDB_STATIC_CONST pnanovdb_uint32_t pnanovdb_grid_type_stat_strides_bits[PNANOVDB_GRID_TYPE_CAP] = { 0, 32, 64, 32, 32, 64, 32, 64, 8, 32, 32, 8, 32, 32, 32, 32, 32, 32, 64, 64, 64, 64, 64, 64, 32, 32, 32, 0 };
^
data/shader/common/PNanoVDB.h:1163:106: error: too few elements in vector initialization (expected 32 elements, have 28)
PNANOVDB_STATIC_CONST pnanovdb_uint32_t pnanovdb_grid_type_leaf_type[PNANOVDB_GRID_TYPE_CAP] = { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 2, 2, 2, 2, 0, 0, 3, 3, 4, 4, 5, 0, 0, 0, 0 };
To Reproduce
Steps to reproduce the behavior:
- Build any HLSL shader with DXC compiler that defines
PNANOVDB_HLSLand includes thePNanoVDB.hheader - See error
Expected behavior
No error.
Additional context
N/A