mirror of
https://github.com/mborgerson/xemu.git
synced 2025-12-01 16:10:01 +00:00
nv2a/glsl: Fix duplicate inlineValue uniform declaration
This commit is contained in:
committed by
mborgerson
parent
41a4b3f2a3
commit
1dbfc3e21a
@ -432,16 +432,13 @@ MString *pgraph_glsl_gen_vsh(const VshState *state, GenVshGlslOptions opts)
|
|||||||
|
|
||||||
if (opts.vulkan) {
|
if (opts.vulkan) {
|
||||||
// FIXME: Optimize uniforms
|
// FIXME: Optimize uniforms
|
||||||
if (num_uniform_attrs > 0) {
|
if (num_uniform_attrs > 0 &&
|
||||||
if (opts.use_push_constants_for_uniform_attrs) {
|
opts.use_push_constants_for_uniform_attrs) {
|
||||||
mstring_append_fmt(output,
|
mstring_append_fmt(output,
|
||||||
"layout(push_constant) uniform PushConstants {\n"
|
"layout(push_constant) uniform PushConstants {\n"
|
||||||
" vec4 inlineValue[%d];\n"
|
" vec4 inlineValue[%d];\n"
|
||||||
"};\n\n", num_uniform_attrs);
|
"};\n\n",
|
||||||
} else {
|
num_uniform_attrs);
|
||||||
mstring_append_fmt(uniforms, " vec4 inlineValue[%d];\n",
|
|
||||||
NV2A_VERTEXSHADER_ATTRIBUTES);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
mstring_append_fmt(
|
mstring_append_fmt(
|
||||||
output,
|
output,
|
||||||
|
|||||||
Reference in New Issue
Block a user