Merge pull request #2700 from ZhiqianXia/u2i

Support Uint to Int implicit conversions at #extension GL_ARB_gpu_shader5.
This commit is contained in:
Greg Fischer
2021-07-29 14:10:40 -06:00
committed by GitHub
5 changed files with 75 additions and 1 deletions

View File

@@ -0,0 +1,11 @@
#version 150
#extension GL_ARB_gpu_shader5 : require
uniform int u1;
uniform int u2;
out vec4 result;
void main()
{
uint v = 0;
v = uint(u2) - u1; // implicit conversions
}

View File

@@ -0,0 +1,57 @@
GL_ARB_gpu_shader5.u2i.vert
WARNING: 0:2: '#extension' : extension is only partially supported: GL_ARB_gpu_shader5
Shader version: 150
Requested GL_ARB_gpu_shader5
0:? Sequence
0:7 Function Definition: main( ( global void)
0:7 Function Parameters:
0:9 Sequence
0:9 Sequence
0:9 move second child to first child ( temp uint)
0:9 'v' ( temp uint)
0:9 Constant:
0:9 0 (const uint)
0:10 move second child to first child ( temp uint)
0:10 'v' ( temp uint)
0:10 subtract ( temp uint)
0:10 Convert int to uint ( temp uint)
0:10 'u2' ( uniform int)
0:10 Convert int to uint ( temp uint)
0:10 'u1' ( uniform int)
0:? Linker Objects
0:? 'u1' ( uniform int)
0:? 'u2' ( uniform int)
0:? 'result' ( smooth out 4-component vector of float)
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
Linked vertex stage:
Shader version: 150
Requested GL_ARB_gpu_shader5
0:? Sequence
0:7 Function Definition: main( ( global void)
0:7 Function Parameters:
0:9 Sequence
0:9 Sequence
0:9 move second child to first child ( temp uint)
0:9 'v' ( temp uint)
0:9 Constant:
0:9 0 (const uint)
0:10 move second child to first child ( temp uint)
0:10 'v' ( temp uint)
0:10 subtract ( temp uint)
0:10 Convert int to uint ( temp uint)
0:10 'u2' ( uniform int)
0:10 Convert int to uint ( temp uint)
0:10 'u1' ( uniform int)
0:? Linker Objects
0:? 'u1' ( uniform int)
0:? 'u2' ( uniform int)
0:? 'result' ( smooth out 4-component vector of float)
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)