GLSL: Implement XFB for redeclared built-in blocks.

This commit is contained in:
John Kessenich
2017-12-15 04:41:28 -07:00
parent 04f4566f28
commit be3842f6ae
8 changed files with 133 additions and 47 deletions

View File

@@ -46,51 +46,52 @@ ERROR: 0:166: 'xfb_buffer' : buffer is too large: gl_MaxTransformFeedbackBuffers
ERROR: 0:169: 'xfb_buffer' : buffer is too large: gl_MaxTransformFeedbackBuffers is 4
ERROR: 0:169: 'xfb_stride' : 1/4 stride is too large: gl_MaxTransformFeedbackInterleavedComponents is 64
ERROR: 0:171: 'xfb_buffer' : buffer is too large: gl_MaxTransformFeedbackBuffers is 4
ERROR: 0:179: 'gl_BaseVertexARB' : required extension not requested: GL_ARB_shader_draw_parameters
ERROR: 0:179: 'gl_BaseInstanceARB' : required extension not requested: GL_ARB_shader_draw_parameters
ERROR: 0:179: 'gl_DrawIDARB' : required extension not requested: GL_ARB_shader_draw_parameters
ERROR: 0:187: 'assign' : l-value required "gl_BaseVertexARB" (can't modify shader input)
ERROR: 0:188: 'assign' : l-value required "gl_BaseInstanceARB" (can't modify shader input)
ERROR: 0:189: 'assign' : l-value required "gl_DrawIDARB" (can't modify shader input)
ERROR: 0:190: 'glBaseInstanceARB' : undeclared identifier
ERROR: 54 compilation errors. No code generated.
ERROR: 0:179: 'xfb_buffer' : member cannot contradict block (or what block inherited from global)
ERROR: 0:185: 'gl_BaseVertexARB' : required extension not requested: GL_ARB_shader_draw_parameters
ERROR: 0:185: 'gl_BaseInstanceARB' : required extension not requested: GL_ARB_shader_draw_parameters
ERROR: 0:185: 'gl_DrawIDARB' : required extension not requested: GL_ARB_shader_draw_parameters
ERROR: 0:193: 'assign' : l-value required "gl_BaseVertexARB" (can't modify shader input)
ERROR: 0:194: 'assign' : l-value required "gl_BaseInstanceARB" (can't modify shader input)
ERROR: 0:195: 'assign' : l-value required "gl_DrawIDARB" (can't modify shader input)
ERROR: 0:196: 'glBaseInstanceARB' : undeclared identifier
ERROR: 55 compilation errors. No code generated.
Shader version: 440
Requested GL_ARB_shader_draw_parameters
in xfb mode
ERROR: node is still EOpNull!
0:177 Function Definition: drawParamsBad( ( global int)
0:177 Function Parameters:
0:179 Sequence
0:179 Branch: Return with expression
0:179 add ( temp int)
0:179 add ( temp int)
0:179 'gl_BaseVertexARB' ( in int BaseVertex)
0:179 'gl_BaseInstanceARB' ( in int BaseInstance)
0:179 'gl_DrawIDARB' ( in int DrawId)
0:184 Function Definition: drawParams( ( global int)
0:184 Function Parameters:
0:186 Sequence
0:186 Branch: Return with expression
0:186 add ( temp int)
0:186 add ( temp int)
0:186 'gl_BaseVertexARB' ( in int BaseVertex)
0:186 'gl_BaseInstanceARB' ( in int BaseInstance)
0:186 'gl_DrawIDARB' ( in int DrawId)
0:187 move second child to first child ( temp int)
0:187 'gl_BaseVertexARB' ( in int BaseVertex)
0:187 Constant:
0:187 3 (const int)
0:188 move second child to first child ( temp int)
0:188 'gl_BaseInstanceARB' ( in int BaseInstance)
0:188 Constant:
0:188 3 (const int)
0:189 move second child to first child ( temp int)
0:189 'gl_DrawIDARB' ( in int DrawId)
0:189 Constant:
0:189 3 (const int)
0:190 'glBaseInstanceARB' ( temp float)
0:183 Function Definition: drawParamsBad( ( global int)
0:183 Function Parameters:
0:185 Sequence
0:185 Branch: Return with expression
0:185 add ( temp int)
0:185 add ( temp int)
0:185 'gl_BaseVertexARB' ( in int BaseVertex)
0:185 'gl_BaseInstanceARB' ( in int BaseInstance)
0:185 'gl_DrawIDARB' ( in int DrawId)
0:190 Function Definition: drawParams( ( global int)
0:190 Function Parameters:
0:192 Sequence
0:192 Branch: Return with expression
0:192 add ( temp int)
0:192 add ( temp int)
0:192 'gl_BaseVertexARB' ( in int BaseVertex)
0:192 'gl_BaseInstanceARB' ( in int BaseInstance)
0:192 'gl_DrawIDARB' ( in int DrawId)
0:193 move second child to first child ( temp int)
0:193 'gl_BaseVertexARB' ( in int BaseVertex)
0:193 Constant:
0:193 3 (const int)
0:194 move second child to first child ( temp int)
0:194 'gl_BaseInstanceARB' ( in int BaseInstance)
0:194 Constant:
0:194 3 (const int)
0:195 move second child to first child ( temp int)
0:195 'gl_DrawIDARB' ( in int DrawId)
0:195 Constant:
0:195 3 (const int)
0:196 'glBaseInstanceARB' ( temp float)
0:? Linker Objects
0:? 'a' (layout( location=2 component=2) in 2-component vector of float)
0:? 'b' (layout( location=2 component=1) in float)
@@ -153,6 +154,7 @@ ERROR: node is still EOpNull!
0:? 'bbinst9' ( out block{layout( xfb_buffer=4 xfb_offset=1) out bool b, layout( xfb_buffer=4 xfb_offset=12) out structure{ global bool b, global structure{ global int i, global double d, global float f} s, global 2-component vector of float v2} t, layout( xfb_buffer=4 xfb_offset=52) out 3X3 matrix of float m3, layout( xfb_buffer=4 xfb_offset=90) out int i, layout( xfb_buffer=4 xfb_offset=98) out double d, layout( xfb_buffer=4 xfb_offset=108) out structure{ global int a} s})
0:? 'bm' (layout( xfb_buffer=5 xfb_offset=0) smooth out float)
0:? 'bbinst10' ( out block{layout( xfb_buffer=7 xfb_offset=0) out 4X4 matrix of double m1, layout( xfb_buffer=7 xfb_offset=128) out 4X4 matrix of double m2, layout( xfb_buffer=7 xfb_offset=256) out float f})
0:? 'anon@0' ( out block{layout( xfb_buffer=0 xfb_offset=36) gl_Position 4-component vector of float Position gl_Position, layout( xfb_buffer=0 xfb_offset=32) gl_PointSize float PointSize gl_PointSize, })
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
@@ -235,6 +237,7 @@ ERROR: node is still EOpNull!
0:? 'bbinst9' ( out block{layout( xfb_buffer=4 xfb_offset=1) out bool b, layout( xfb_buffer=4 xfb_offset=12) out structure{ global bool b, global structure{ global int i, global double d, global float f} s, global 2-component vector of float v2} t, layout( xfb_buffer=4 xfb_offset=52) out 3X3 matrix of float m3, layout( xfb_buffer=4 xfb_offset=90) out int i, layout( xfb_buffer=4 xfb_offset=98) out double d, layout( xfb_buffer=4 xfb_offset=108) out structure{ global int a} s})
0:? 'bm' (layout( xfb_buffer=5 xfb_offset=0) smooth out float)
0:? 'bbinst10' ( out block{layout( xfb_buffer=7 xfb_offset=0) out 4X4 matrix of double m1, layout( xfb_buffer=7 xfb_offset=128) out 4X4 matrix of double m2, layout( xfb_buffer=7 xfb_offset=256) out float f})
0:? 'anon@0' ( out block{layout( xfb_buffer=0 xfb_offset=36) gl_Position 4-component vector of float Position gl_Position, layout( xfb_buffer=0 xfb_offset=32) gl_PointSize float PointSize gl_PointSize, })
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)