HLSL: use HLSL parser to parse HLSL intrinsic prototypes, enable int/bool mats
This PR adds a CreateParseContext() fn analogous to CreateBuiltInParseables(), to create a language specific built in parser. (This code was present before but not encapsualted in a fn). This can now be used to create a source language specific parser for builtins. Along with this, the code creating HLSL intrinsic prototypes can now produce them in HLSL syntax, rather than GLSL syntax. This relaxes certain prior restrictions at the parser level. Lower layers (e.g, SPIR-V) may still have such restrictions, such as around Nx1 matrices: this code does not impact that. This PR also fleshes out matrix types for bools and ints, both of which were partially in place before. This was easier than maintaining the restrictions in the HLSL prototype generator to avoid creating protoypes with those types. Many tests change because the result type from intrinsics moves from "global" to "temp". Several new tests are added for the new types.
This commit is contained in:
@@ -8,7 +8,7 @@ gl_FragCoord origin is upper left
|
||||
0:42 Sequence
|
||||
0:42 move second child to first child (temp float)
|
||||
0:42 'r11' (temp float)
|
||||
0:42 textureLodOffset (global float)
|
||||
0:42 textureLodOffset (temp float)
|
||||
0:42 Construct combined texture-sampler (temp sampler1DArrayShadow)
|
||||
0:42 'g_tTex1df4a' (uniform texture1DArray)
|
||||
0:42 'g_sSamp' (layout(binding=0 ) uniform sampler)
|
||||
@@ -25,7 +25,7 @@ gl_FragCoord origin is upper left
|
||||
0:43 Sequence
|
||||
0:43 move second child to first child (temp float)
|
||||
0:43 'r13' (temp float)
|
||||
0:43 textureLodOffset (global float)
|
||||
0:43 textureLodOffset (temp float)
|
||||
0:43 Construct combined texture-sampler (temp isampler1DArrayShadow)
|
||||
0:43 'g_tTex1di4a' (uniform itexture1DArray)
|
||||
0:43 'g_sSamp' (layout(binding=0 ) uniform sampler)
|
||||
@@ -42,7 +42,7 @@ gl_FragCoord origin is upper left
|
||||
0:44 Sequence
|
||||
0:44 move second child to first child (temp float)
|
||||
0:44 'r15' (temp float)
|
||||
0:44 textureLodOffset (global float)
|
||||
0:44 textureLodOffset (temp float)
|
||||
0:44 Construct combined texture-sampler (temp usampler1DArrayShadow)
|
||||
0:44 'g_tTex1du4a' (uniform utexture1DArray)
|
||||
0:44 'g_sSamp' (layout(binding=0 ) uniform sampler)
|
||||
@@ -59,7 +59,7 @@ gl_FragCoord origin is upper left
|
||||
0:47 Sequence
|
||||
0:47 move second child to first child (temp float)
|
||||
0:47 'r31' (temp float)
|
||||
0:47 textureLodOffset (global float)
|
||||
0:47 textureLodOffset (temp float)
|
||||
0:47 Construct combined texture-sampler (temp sampler2DArrayShadow)
|
||||
0:47 'g_tTex2df4a' (uniform texture2DArray)
|
||||
0:47 'g_sSamp' (layout(binding=0 ) uniform sampler)
|
||||
@@ -78,7 +78,7 @@ gl_FragCoord origin is upper left
|
||||
0:48 Sequence
|
||||
0:48 move second child to first child (temp float)
|
||||
0:48 'r33' (temp float)
|
||||
0:48 textureLodOffset (global float)
|
||||
0:48 textureLodOffset (temp float)
|
||||
0:48 Construct combined texture-sampler (temp isampler2DArrayShadow)
|
||||
0:48 'g_tTex2di4a' (uniform itexture2DArray)
|
||||
0:48 'g_sSamp' (layout(binding=0 ) uniform sampler)
|
||||
@@ -97,7 +97,7 @@ gl_FragCoord origin is upper left
|
||||
0:49 Sequence
|
||||
0:49 move second child to first child (temp float)
|
||||
0:49 'r35' (temp float)
|
||||
0:49 textureLodOffset (global float)
|
||||
0:49 textureLodOffset (temp float)
|
||||
0:49 Construct combined texture-sampler (temp usampler2DArrayShadow)
|
||||
0:49 'g_tTex2du4a' (uniform utexture2DArray)
|
||||
0:49 'g_sSamp' (layout(binding=0 ) uniform sampler)
|
||||
@@ -184,7 +184,7 @@ gl_FragCoord origin is upper left
|
||||
0:42 Sequence
|
||||
0:42 move second child to first child (temp float)
|
||||
0:42 'r11' (temp float)
|
||||
0:42 textureLodOffset (global float)
|
||||
0:42 textureLodOffset (temp float)
|
||||
0:42 Construct combined texture-sampler (temp sampler1DArrayShadow)
|
||||
0:42 'g_tTex1df4a' (uniform texture1DArray)
|
||||
0:42 'g_sSamp' (layout(binding=0 ) uniform sampler)
|
||||
@@ -201,7 +201,7 @@ gl_FragCoord origin is upper left
|
||||
0:43 Sequence
|
||||
0:43 move second child to first child (temp float)
|
||||
0:43 'r13' (temp float)
|
||||
0:43 textureLodOffset (global float)
|
||||
0:43 textureLodOffset (temp float)
|
||||
0:43 Construct combined texture-sampler (temp isampler1DArrayShadow)
|
||||
0:43 'g_tTex1di4a' (uniform itexture1DArray)
|
||||
0:43 'g_sSamp' (layout(binding=0 ) uniform sampler)
|
||||
@@ -218,7 +218,7 @@ gl_FragCoord origin is upper left
|
||||
0:44 Sequence
|
||||
0:44 move second child to first child (temp float)
|
||||
0:44 'r15' (temp float)
|
||||
0:44 textureLodOffset (global float)
|
||||
0:44 textureLodOffset (temp float)
|
||||
0:44 Construct combined texture-sampler (temp usampler1DArrayShadow)
|
||||
0:44 'g_tTex1du4a' (uniform utexture1DArray)
|
||||
0:44 'g_sSamp' (layout(binding=0 ) uniform sampler)
|
||||
@@ -235,7 +235,7 @@ gl_FragCoord origin is upper left
|
||||
0:47 Sequence
|
||||
0:47 move second child to first child (temp float)
|
||||
0:47 'r31' (temp float)
|
||||
0:47 textureLodOffset (global float)
|
||||
0:47 textureLodOffset (temp float)
|
||||
0:47 Construct combined texture-sampler (temp sampler2DArrayShadow)
|
||||
0:47 'g_tTex2df4a' (uniform texture2DArray)
|
||||
0:47 'g_sSamp' (layout(binding=0 ) uniform sampler)
|
||||
@@ -254,7 +254,7 @@ gl_FragCoord origin is upper left
|
||||
0:48 Sequence
|
||||
0:48 move second child to first child (temp float)
|
||||
0:48 'r33' (temp float)
|
||||
0:48 textureLodOffset (global float)
|
||||
0:48 textureLodOffset (temp float)
|
||||
0:48 Construct combined texture-sampler (temp isampler2DArrayShadow)
|
||||
0:48 'g_tTex2di4a' (uniform itexture2DArray)
|
||||
0:48 'g_sSamp' (layout(binding=0 ) uniform sampler)
|
||||
@@ -273,7 +273,7 @@ gl_FragCoord origin is upper left
|
||||
0:49 Sequence
|
||||
0:49 move second child to first child (temp float)
|
||||
0:49 'r35' (temp float)
|
||||
0:49 textureLodOffset (global float)
|
||||
0:49 textureLodOffset (temp float)
|
||||
0:49 Construct combined texture-sampler (temp usampler2DArrayShadow)
|
||||
0:49 'g_tTex2du4a' (uniform utexture2DArray)
|
||||
0:49 'g_sSamp' (layout(binding=0 ) uniform sampler)
|
||||
|
||||
Reference in New Issue
Block a user