Skip to content

Commit

Permalink
more syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
polymetal0 committed Jan 11, 2025
1 parent bcb11b7 commit 4da74db
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions hw/xbox/nv2a/pgraph/glsl/psh.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,19 +250,19 @@ static MString* get_var(struct PixelShader *ps, int reg, bool is_dest)
break;
case PS_REGISTER_C0:
if (ps->flags & PS_COMBINERCOUNT_UNIQUE_C0 || ps->cur_stage == 8) {
MString *reg_name = mstring_from_fmt("c0_%d", ps->cur_stage);
add_const_ref(ps, mstring_get_str(reg_name));
return reg_name;
MString *reg = mstring_from_fmt("c0_%d", ps->cur_stage);
add_const_ref(ps, mstring_get_str(reg));
return reg;
} else { // Same c0
add_const_ref(ps, "c0_0");
return mstring_from_str("c0_0");
}
break;
case PS_REGISTER_C1:
if (ps->flags & PS_COMBINERCOUNT_UNIQUE_C1 || ps->cur_stage == 8) {
MString *reg_name = mstring_from_fmt("c1_%d", ps->cur_stage);
add_const_ref(ps, mstring_get_str(reg_name));
return reg_name;
MString *reg = mstring_from_fmt("c1_%d", ps->cur_stage);
add_const_ref(ps, mstring_get_str(reg));
return reg;
} else { // Same c1
add_const_ref(ps, "c1_0");
return mstring_from_str("c1_0");
Expand Down Expand Up @@ -726,10 +726,8 @@ static void apply_convolution_filter(const struct PixelShader *ps, MString *vars
"}\n", tex, tex, tex, tex, tex_remap, tex);
}

static MString* psh_convert(struct PixelShader *ps)
static MString *psh_convert(struct PixelShader *ps)
{
int i;

bool z_perspective = ps->state.z_perspective;
bool tex = ps->state.texture_perspective;
const char *u = ps->state.vulkan ? "" : "uniform "; // FIXME: Remove
Expand Down Expand Up @@ -895,7 +893,7 @@ static MString* psh_convert(struct PixelShader *ps)

ps->code = mstring_new();

for (i = 0; i < 4; i++) {
for (int i = 0; i < 4; i++) {

const char *sampler_type = get_sampler_type(ps->tex_modes[i], &ps->state, i);

Expand Down

0 comments on commit 4da74db

Please sign in to comment.