renderer/vulkan: Emulate custom border colors in shaders when unavailable. (#6878)

This commit is contained in:
Steveice10 2023-08-17 13:22:25 -07:00 committed by GitHub
parent f3d92dd3b8
commit 6ddf4b241f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 322 additions and 195 deletions

View file

@ -67,6 +67,7 @@ layout ({}std140) uniform shader_data {{
vec4 const_color[NUM_TEV_STAGES];
vec4 tev_combiner_buffer_color;
vec3 tex_lod_bias;
vec4 tex_border_color[3];
vec4 clip_coef;
}};
)";

View file

@ -64,10 +64,11 @@ struct UniformData {
alignas(16) Common::Vec4f const_color[6]; // A vec4 color for each of the six tev stages
alignas(16) Common::Vec4f tev_combiner_buffer_color;
alignas(16) Common::Vec3f tex_lod_bias;
alignas(16) Common::Vec4f tex_border_color[3];
alignas(16) Common::Vec4f clip_coef;
};
static_assert(sizeof(UniformData) == 0x500,
static_assert(sizeof(UniformData) == 0x530,
"The size of the UniformData does not match the structure in the shader");
static_assert(sizeof(UniformData) < 16384,
"UniformData structure must be less than 16kb as per the OpenGL spec");