This may be related to or is a duplicate of issues #4315, but the validation errors are different.
The shader below is producing SPIR-V that's the following validation error when compiled with Slang:
VUID-VkShaderModuleCreateInfo-pCode-08737(ERROR / SPEC): msgNum: -1520283006 - Validation Error: [ VUID-VkShaderModuleCreateInfo-pCode-08737 ] | MessageID = 0xa5625282 | vkCreateShaderModule(): pCreateInfo->pCode (spirv-val produced an error):
The Base <id> '19[%19]' in OpAccessChain instruction must be a pointer.
%addr = OpAccessChain %_ptr_Input_T %19 %uint_0
. The Vulkan spec states: If pCode is a pointer to SPIR-V code, pCode must adhere to the validation rules described by the Validation Rules within a Module section of the SPIR-V Environment appendix (https://vulkan.lunarg.com/doc/view/1.3.280.0/windows/1.3-extensions/vkspec.html#VUID-VkShaderModuleCreateInfo-pCode-08737)
Objects: 0
%19 is the result id of an OpLoad for VertexIndex in this struct:
The problem is that GetAttributeAtVertex isn't implemented correctly. Will need to add new IR mechanisms to plumb the true global var declaration through.
This may be related to or is a duplicate of issues #4315, but the validation errors are different.
The shader below is producing SPIR-V that's the following validation error when compiled with Slang:
%19
is the result id of anOpLoad
forVertexIndex
in this struct:Slang compilation command:
The SPIR-V produced by DXC cause the validation error.
Shader Code: