Environment:
- OS: Windows 11
- GPU and driver version: RTX 5060, driver version 591.44
- SDK or header version if building from repo: 1.4.335.0
- Options enabled (synchronization, best practices, etc.): GPU Assisted Validation, shader-instrumentation (Safe Mode is disabled).
Describe the Issue
The following Slang code triggers a GPU-assisted-validation internal-error with the comment "FindOffsetInStruct has unexpected non-composite type":
struct Data {
int32_t x;
}
uniform Data* bda;
[numthreads(1,1,1)]
void main() {
bda[0].x = 1;
}
The shader still runs as expected, but we still receive what seems like an incorrect validation error.
Expected behavior
An error is not expected since the offending SPIR-V looks valid:
%59 = OpLoad %_ptr_PhysicalStorageBuffer_Data_natural %58
%60 = OpPtrAccessChain %_ptr_PhysicalStorageBuffer_Data_natural %59 %int_0
%62 = OpAccessChain %_ptr_PhysicalStorageBuffer_int %60 %int_0
OpStore %62 %int_3 Aligned 4