Skip to content

Commit

Permalink
nv2a/glsl: Add swizzled attr check
Browse files Browse the repository at this point in the history
  • Loading branch information
mborgerson committed Jul 30, 2024
1 parent 9c23b40 commit 0ec6375
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hw/xbox/nv2a/pgraph/glsl/vsh.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,11 @@ MString *pgraph_gen_vsh_glsl(const ShaderState *state, bool prefix_outputs)

for (i = 0; i < NV2A_VERTEXSHADER_ATTRIBUTES; i++) {
bool is_uniform = state->uniform_attrs & (1 << i);
bool is_swizzled = state->swizzle_attrs & (1 << i);
bool is_compressed = state->compressed_attrs & (1 << i);

assert(!(is_uniform && is_compressed));
assert(!(is_uniform && is_swizzled));

if (is_uniform) {
mstring_append_fmt(header, "vec4 v%d = inlineValue[%d];\n", i,
Expand Down

0 comments on commit 0ec6375

Please sign in to comment.