Error out writes to shaderRecordNV buffer blocks.

This commit is contained in:
Ashwin Lele
2019-03-04 11:05:55 -08:00
parent d90d548161
commit afa5671fef
7 changed files with 72 additions and 89 deletions

View File

@@ -4,8 +4,8 @@ layout(binding = 0, set = 0) uniform accelerationStructureNV accNV;
layout(location = 0) rayPayloadNV vec4 payload;
layout(shaderRecordNV) buffer block
{
float arr[4];
vec4 pad;
vec3 dir;
vec3 origin;
};
void main()
{
@@ -13,7 +13,5 @@ void main()
uint ly = gl_LaunchIDNV.y;
uint sx = gl_LaunchSizeNV.x;
uint sy = gl_LaunchSizeNV.y;
traceNV(accNV, lx, ly, sx, sy, 0u, vec3(0.0f), 0.5f, vec3(1.0f), 0.75f, 1);
arr[3] = 1.0f;
pad = payload;
traceNV(accNV, lx, ly, sx, sy, 0u, origin, 0.5f, dir, 0.75f, 1);
}