Add support for pre and post HLSL qualifier validation

The change makes it possible to define a const variable after the marked
type. Example "float const"
This commit is contained in:
Dawid Lorenz
2023-07-03 15:19:41 +02:00
committed by arcady-lunarg
parent 051f18c0cc
commit 4ae01c5f41
6 changed files with 300 additions and 229 deletions

View File

@@ -21,16 +21,17 @@ void Test1()
const mystruct2 constTest5 = { {8,}, {9,}, {10}, };
constTest5.c;
const float step = 1.f;
float n = 0;
const float3 a[8] = {
normalize(float3(1, 1, 1)) * (n += step),
normalize(float3(-1, -1, -1)) * (n += step),
normalize(float3(-1, -1, 1)) * (n += step),
normalize(float3(-1, 1, -1)) * (n += step),
normalize(float3(-1, 1, 1)) * (n += step),
normalize(float3(1, -1, -1)) * (n += step),
normalize(float3(1, -1, 1)) * (n += step),
float const origStep = 1.0f;
const float step = origStep;
float n = 0;
const float3 a[8] = {
normalize(float3(1, 1, 1)) * (n += step),
normalize(float3(-1, -1, -1)) * (n += step),
normalize(float3(-1, -1, 1)) * (n += step),
normalize(float3(-1, 1, -1)) * (n += step),
normalize(float3(-1, 1, 1)) * (n += step),
normalize(float3(1, -1, -1)) * (n += step),
normalize(float3(1, -1, 1)) * (n += step),
normalize(float3(1, 1, -1)) * (n += step) };
const struct one { float3 a; } oneNonConst = { normalize(float3(-1, 1, 1)) * (n += step) };