Skip to content

Commit

Permalink
Check argument constness with SparseTextureOffset functions
Browse files Browse the repository at this point in the history
There are a few checks that were missing for sparse variants of these
functions.
  • Loading branch information
rg3igalia committed Oct 29, 2024
1 parent e8bce4d commit 6fb8abf
Show file tree
Hide file tree
Showing 6 changed files with 600 additions and 7 deletions.
251 changes: 251 additions & 0 deletions Test/baseResults/sparsetextureoffset_non_const.vert.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,251 @@
sparsetextureoffset_non_const.vert
Shader version: 450
Requested GL_ARB_sparse_texture2
Requested GL_EXT_texture_offset_non_const
0:? Sequence
0:19 Function Definition: main( ( global void)
0:19 Function Parameters:
0:21 Sequence
0:21 move second child to first child ( temp 4-component vector of float)
0:21 gl_Position: direct index for structure ( gl_Position 4-component vector of float Position)
0:21 'anon@2' ( out block{ gl_Position 4-component vector of float Position gl_Position})
0:21 Constant:
0:21 0 (const uint)
0:21 'a_position' (layout( location=0) in 4-component vector of float)
0:27 Sequence
0:27 move second child to first child ( temp int)
0:27 'ret0' ( temp int)
0:27 sparseTextureOffset ( global int)
0:27 'u_sampler' (layout( set=0 binding=0) uniform sampler2D)
0:27 'a_in0' (layout( location=4) in 2-component vector of float)
0:27 'offsetValue' (layout( location=10) in 2-component vector of int)
0:27 'aux0' ( temp 4-component vector of float)
0:28 Sequence
0:28 move second child to first child ( temp int)
0:28 'ret1' ( temp int)
0:28 sparseTexelFetchOffset ( global int)
0:28 'u_sampler' (layout( set=0 binding=0) uniform sampler2D)
0:28 Convert float to int ( temp 2-component vector of int)
0:28 'a_in0' (layout( location=4) in 2-component vector of float)
0:28 Convert float to int ( temp int)
0:28 'a_in1' (layout( location=5) in float)
0:28 'offsetValue' (layout( location=10) in 2-component vector of int)
0:28 'aux1' ( temp 4-component vector of float)
0:29 Sequence
0:29 move second child to first child ( temp int)
0:29 'ret2' ( temp int)
0:29 sparseTextureLodOffset ( global int)
0:29 'u_sampler' (layout( set=0 binding=0) uniform sampler2D)
0:29 'a_in0' (layout( location=4) in 2-component vector of float)
0:29 'a_in1' (layout( location=5) in float)
0:29 'offsetValue' (layout( location=10) in 2-component vector of int)
0:29 'aux2' ( temp 4-component vector of float)
0:30 Sequence
0:30 move second child to first child ( temp int)
0:30 'ret3' ( temp int)
0:30 sparseTextureGradOffset ( global int)
0:30 'u_sampler' (layout( set=0 binding=0) uniform sampler2D)
0:30 'a_in0' (layout( location=4) in 2-component vector of float)
0:30 Construct vec2 ( temp 2-component vector of float)
0:30 'a_in1' (layout( location=5) in float)
0:30 'a_in1' (layout( location=5) in float)
0:30 Construct vec2 ( temp 2-component vector of float)
0:30 'a_in1' (layout( location=5) in float)
0:30 'a_in1' (layout( location=5) in float)
0:30 'offsetValue' (layout( location=10) in 2-component vector of int)
0:30 'aux3' ( temp 4-component vector of float)
0:32 move second child to first child ( temp 4-component vector of float)
0:32 'v_color0' (layout( location=0) smooth out 4-component vector of float)
0:32 add ( temp 4-component vector of float)
0:32 component-wise multiply ( temp 4-component vector of float)
0:32 'aux0' ( temp 4-component vector of float)
0:32 u_scale: direct index for structure (layout( column_major shared) uniform 4-component vector of float)
0:32 'anon@0' (layout( set=0 binding=1 column_major shared) uniform block{layout( column_major shared) uniform 4-component vector of float u_scale})
0:32 Constant:
0:32 0 (const uint)
0:32 u_bias: direct index for structure (layout( column_major shared) uniform 4-component vector of float)
0:32 'anon@1' (layout( set=0 binding=2 column_major shared) uniform block{layout( column_major shared) uniform 4-component vector of float u_bias})
0:32 Constant:
0:32 0 (const uint)
0:33 move second child to first child ( temp 4-component vector of float)
0:33 'v_color1' (layout( location=1) smooth out 4-component vector of float)
0:33 add ( temp 4-component vector of float)
0:33 component-wise multiply ( temp 4-component vector of float)
0:33 'aux1' ( temp 4-component vector of float)
0:33 u_scale: direct index for structure (layout( column_major shared) uniform 4-component vector of float)
0:33 'anon@0' (layout( set=0 binding=1 column_major shared) uniform block{layout( column_major shared) uniform 4-component vector of float u_scale})
0:33 Constant:
0:33 0 (const uint)
0:33 u_bias: direct index for structure (layout( column_major shared) uniform 4-component vector of float)
0:33 'anon@1' (layout( set=0 binding=2 column_major shared) uniform block{layout( column_major shared) uniform 4-component vector of float u_bias})
0:33 Constant:
0:33 0 (const uint)
0:34 move second child to first child ( temp 4-component vector of float)
0:34 'v_color2' (layout( location=2) smooth out 4-component vector of float)
0:34 add ( temp 4-component vector of float)
0:34 component-wise multiply ( temp 4-component vector of float)
0:34 'aux2' ( temp 4-component vector of float)
0:34 u_scale: direct index for structure (layout( column_major shared) uniform 4-component vector of float)
0:34 'anon@0' (layout( set=0 binding=1 column_major shared) uniform block{layout( column_major shared) uniform 4-component vector of float u_scale})
0:34 Constant:
0:34 0 (const uint)
0:34 u_bias: direct index for structure (layout( column_major shared) uniform 4-component vector of float)
0:34 'anon@1' (layout( set=0 binding=2 column_major shared) uniform block{layout( column_major shared) uniform 4-component vector of float u_bias})
0:34 Constant:
0:34 0 (const uint)
0:35 move second child to first child ( temp 4-component vector of float)
0:35 'v_color3' (layout( location=3) smooth out 4-component vector of float)
0:35 add ( temp 4-component vector of float)
0:35 component-wise multiply ( temp 4-component vector of float)
0:35 'aux3' ( temp 4-component vector of float)
0:35 u_scale: direct index for structure (layout( column_major shared) uniform 4-component vector of float)
0:35 'anon@0' (layout( set=0 binding=1 column_major shared) uniform block{layout( column_major shared) uniform 4-component vector of float u_scale})
0:35 Constant:
0:35 0 (const uint)
0:35 u_bias: direct index for structure (layout( column_major shared) uniform 4-component vector of float)
0:35 'anon@1' (layout( set=0 binding=2 column_major shared) uniform block{layout( column_major shared) uniform 4-component vector of float u_bias})
0:35 Constant:
0:35 0 (const uint)
0:? Linker Objects
0:? 'a_position' (layout( location=0) in 4-component vector of float)
0:? 'a_in0' (layout( location=4) in 2-component vector of float)
0:? 'a_in1' (layout( location=5) in float)
0:? 'offsetValue' (layout( location=10) in 2-component vector of int)
0:? 'v_color0' (layout( location=0) smooth out 4-component vector of float)
0:? 'v_color1' (layout( location=1) smooth out 4-component vector of float)
0:? 'v_color2' (layout( location=2) smooth out 4-component vector of float)
0:? 'v_color3' (layout( location=3) smooth out 4-component vector of float)
0:? 'u_sampler' (layout( set=0 binding=0) uniform sampler2D)
0:? 'anon@0' (layout( set=0 binding=1 column_major shared) uniform block{layout( column_major shared) uniform 4-component vector of float u_scale})
0:? 'anon@1' (layout( set=0 binding=2 column_major shared) uniform block{layout( column_major shared) uniform 4-component vector of float u_bias})
0:? 'anon@2' ( out block{ gl_Position 4-component vector of float Position gl_Position})
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)


Linked vertex stage:


Shader version: 450
Requested GL_ARB_sparse_texture2
Requested GL_EXT_texture_offset_non_const
0:? Sequence
0:19 Function Definition: main( ( global void)
0:19 Function Parameters:
0:21 Sequence
0:21 move second child to first child ( temp 4-component vector of float)
0:21 gl_Position: direct index for structure ( gl_Position 4-component vector of float Position)
0:21 'anon@2' ( out block{ gl_Position 4-component vector of float Position gl_Position})
0:21 Constant:
0:21 0 (const uint)
0:21 'a_position' (layout( location=0) in 4-component vector of float)
0:27 Sequence
0:27 move second child to first child ( temp int)
0:27 'ret0' ( temp int)
0:27 sparseTextureOffset ( global int)
0:27 'u_sampler' (layout( set=0 binding=0) uniform sampler2D)
0:27 'a_in0' (layout( location=4) in 2-component vector of float)
0:27 'offsetValue' (layout( location=10) in 2-component vector of int)
0:27 'aux0' ( temp 4-component vector of float)
0:28 Sequence
0:28 move second child to first child ( temp int)
0:28 'ret1' ( temp int)
0:28 sparseTexelFetchOffset ( global int)
0:28 'u_sampler' (layout( set=0 binding=0) uniform sampler2D)
0:28 Convert float to int ( temp 2-component vector of int)
0:28 'a_in0' (layout( location=4) in 2-component vector of float)
0:28 Convert float to int ( temp int)
0:28 'a_in1' (layout( location=5) in float)
0:28 'offsetValue' (layout( location=10) in 2-component vector of int)
0:28 'aux1' ( temp 4-component vector of float)
0:29 Sequence
0:29 move second child to first child ( temp int)
0:29 'ret2' ( temp int)
0:29 sparseTextureLodOffset ( global int)
0:29 'u_sampler' (layout( set=0 binding=0) uniform sampler2D)
0:29 'a_in0' (layout( location=4) in 2-component vector of float)
0:29 'a_in1' (layout( location=5) in float)
0:29 'offsetValue' (layout( location=10) in 2-component vector of int)
0:29 'aux2' ( temp 4-component vector of float)
0:30 Sequence
0:30 move second child to first child ( temp int)
0:30 'ret3' ( temp int)
0:30 sparseTextureGradOffset ( global int)
0:30 'u_sampler' (layout( set=0 binding=0) uniform sampler2D)
0:30 'a_in0' (layout( location=4) in 2-component vector of float)
0:30 Construct vec2 ( temp 2-component vector of float)
0:30 'a_in1' (layout( location=5) in float)
0:30 'a_in1' (layout( location=5) in float)
0:30 Construct vec2 ( temp 2-component vector of float)
0:30 'a_in1' (layout( location=5) in float)
0:30 'a_in1' (layout( location=5) in float)
0:30 'offsetValue' (layout( location=10) in 2-component vector of int)
0:30 'aux3' ( temp 4-component vector of float)
0:32 move second child to first child ( temp 4-component vector of float)
0:32 'v_color0' (layout( location=0) smooth out 4-component vector of float)
0:32 add ( temp 4-component vector of float)
0:32 component-wise multiply ( temp 4-component vector of float)
0:32 'aux0' ( temp 4-component vector of float)
0:32 u_scale: direct index for structure (layout( column_major shared) uniform 4-component vector of float)
0:32 'anon@0' (layout( set=0 binding=1 column_major shared) uniform block{layout( column_major shared) uniform 4-component vector of float u_scale})
0:32 Constant:
0:32 0 (const uint)
0:32 u_bias: direct index for structure (layout( column_major shared) uniform 4-component vector of float)
0:32 'anon@1' (layout( set=0 binding=2 column_major shared) uniform block{layout( column_major shared) uniform 4-component vector of float u_bias})
0:32 Constant:
0:32 0 (const uint)
0:33 move second child to first child ( temp 4-component vector of float)
0:33 'v_color1' (layout( location=1) smooth out 4-component vector of float)
0:33 add ( temp 4-component vector of float)
0:33 component-wise multiply ( temp 4-component vector of float)
0:33 'aux1' ( temp 4-component vector of float)
0:33 u_scale: direct index for structure (layout( column_major shared) uniform 4-component vector of float)
0:33 'anon@0' (layout( set=0 binding=1 column_major shared) uniform block{layout( column_major shared) uniform 4-component vector of float u_scale})
0:33 Constant:
0:33 0 (const uint)
0:33 u_bias: direct index for structure (layout( column_major shared) uniform 4-component vector of float)
0:33 'anon@1' (layout( set=0 binding=2 column_major shared) uniform block{layout( column_major shared) uniform 4-component vector of float u_bias})
0:33 Constant:
0:33 0 (const uint)
0:34 move second child to first child ( temp 4-component vector of float)
0:34 'v_color2' (layout( location=2) smooth out 4-component vector of float)
0:34 add ( temp 4-component vector of float)
0:34 component-wise multiply ( temp 4-component vector of float)
0:34 'aux2' ( temp 4-component vector of float)
0:34 u_scale: direct index for structure (layout( column_major shared) uniform 4-component vector of float)
0:34 'anon@0' (layout( set=0 binding=1 column_major shared) uniform block{layout( column_major shared) uniform 4-component vector of float u_scale})
0:34 Constant:
0:34 0 (const uint)
0:34 u_bias: direct index for structure (layout( column_major shared) uniform 4-component vector of float)
0:34 'anon@1' (layout( set=0 binding=2 column_major shared) uniform block{layout( column_major shared) uniform 4-component vector of float u_bias})
0:34 Constant:
0:34 0 (const uint)
0:35 move second child to first child ( temp 4-component vector of float)
0:35 'v_color3' (layout( location=3) smooth out 4-component vector of float)
0:35 add ( temp 4-component vector of float)
0:35 component-wise multiply ( temp 4-component vector of float)
0:35 'aux3' ( temp 4-component vector of float)
0:35 u_scale: direct index for structure (layout( column_major shared) uniform 4-component vector of float)
0:35 'anon@0' (layout( set=0 binding=1 column_major shared) uniform block{layout( column_major shared) uniform 4-component vector of float u_scale})
0:35 Constant:
0:35 0 (const uint)
0:35 u_bias: direct index for structure (layout( column_major shared) uniform 4-component vector of float)
0:35 'anon@1' (layout( set=0 binding=2 column_major shared) uniform block{layout( column_major shared) uniform 4-component vector of float u_bias})
0:35 Constant:
0:35 0 (const uint)
0:? Linker Objects
0:? 'a_position' (layout( location=0) in 4-component vector of float)
0:? 'a_in0' (layout( location=4) in 2-component vector of float)
0:? 'a_in1' (layout( location=5) in float)
0:? 'offsetValue' (layout( location=10) in 2-component vector of int)
0:? 'v_color0' (layout( location=0) smooth out 4-component vector of float)
0:? 'v_color1' (layout( location=1) smooth out 4-component vector of float)
0:? 'v_color2' (layout( location=2) smooth out 4-component vector of float)
0:? 'v_color3' (layout( location=3) smooth out 4-component vector of float)
0:? 'u_sampler' (layout( set=0 binding=0) uniform sampler2D)
0:? 'anon@0' (layout( set=0 binding=1 column_major shared) uniform block{layout( column_major shared) uniform 4-component vector of float u_scale})
0:? 'anon@1' (layout( set=0 binding=2 column_major shared) uniform block{layout( column_major shared) uniform 4-component vector of float u_bias})
0:? 'anon@2' ( out block{ gl_Position 4-component vector of float Position gl_Position})
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)

Loading

0 comments on commit 6fb8abf

Please sign in to comment.