GS:GL: Use uvec4 for color vertex input.

For uniformity with VK.
This commit is contained in:
TJnotJT
2026-10-06 23:30:57 +02:00
committed by lightningterror
parent 9fffbdbd59
commit deb23b0d8d
3 changed files with 6 additions and 6 deletions
+4 -4
View File
@@ -46,7 +46,7 @@ const float exp_min32 = exp2(-32.0f);
#if VS_EXPAND == VS_EXPAND_NONE
layout(location = 0) in vec2 i_st;
layout(location = 2) in vec4 i_c;
layout(location = 2) in uvec4 i_c;
layout(location = 3) in float i_q;
layout(location = 4) in uvec2 i_p;
layout(location = 5) in uint i_z;
@@ -95,7 +95,7 @@ void vs_main()
texture_coord();
VSout.c = i_c;
VSout.c = vec4(i_c);
VSout.t_float.z = i_f.x; // pack for with texture
#if VS_POINT_SIZE
@@ -155,7 +155,7 @@ ProcessedVertex load_vertex(uint index)
RawVertex rvtx = vertex_buffer[BaseVertex + index];
vec2 i_st = rvtx.ST;
vec4 i_c = vec4(rvtx.RGBA & 0xFFu, (rvtx.RGBA >> 8) & 0xFFu, (rvtx.RGBA >> 16) & 0xFFu, rvtx.RGBA >> 24);
uvec4 i_c = uvec4(rvtx.RGBA & 0xFFu, (rvtx.RGBA >> 8) & 0xFFu, (rvtx.RGBA >> 16) & 0xFFu, rvtx.RGBA >> 24);
float i_q = rvtx.Q;
uvec2 i_p = uvec2(rvtx.XY & 0xFFFFu, rvtx.XY >> 16);
uint i_z = rvtx.Z;
@@ -189,7 +189,7 @@ ProcessedVertex load_vertex(uint index)
vtx.t_int.zw = st / TextureScale;
#endif
vtx.c = i_c;
vtx.c = vec4(i_c);
vtx.t_float.z = i_f.x;
return vtx;
+1 -1
View File
@@ -437,7 +437,7 @@ bool GSDeviceOGL::Create(GSVSyncMode vsync_mode, bool allow_present_throttle)
glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, sizeof(GSVertexPT1), (const GLvoid*)(0));
glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, sizeof(GSVertexPT1), (const GLvoid*)(16));
glVertexAttribPointer(2, 4, GL_UNSIGNED_BYTE, GL_FALSE, sizeof(GSVertex), (const GLvoid*)(8));
glVertexAttribIPointer(2, 4, GL_UNSIGNED_BYTE, sizeof(GSVertex), (const GLvoid*)(8));
glVertexAttribPointer(3, 1, GL_FLOAT, GL_FALSE, sizeof(GSVertex), (const GLvoid*)(12));
glVertexAttribIPointer(4, 2, GL_UNSIGNED_SHORT, sizeof(GSVertex), (const GLvoid*)(16));
glVertexAttribIPointer(5, 1, GL_UNSIGNED_INT, sizeof(GSVertex), (const GLvoid*)(20));
+1 -1
View File
@@ -3,4 +3,4 @@
/// Version number for GS and other shaders. Increment whenever any of the contents of the
/// shaders change, to invalidate the cache.
static constexpr u32 SHADER_CACHE_VERSION = 118; // Last changed in PR 14987
static constexpr u32 SHADER_CACHE_VERSION = 119; // Last changed in PR 15044