mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 20:08:06 +02:00
etnaviv: Extend compiled_shader_state for MRTs
We can have up to 8 MRTs (depending on HALTI) and we need more two uint32_t in total. Just convert PS_OUTPUT_REG to an array and change the code that works with it. This is just prep change for MRT support. Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com> Reviewed-by: Lucas Stach <l.stach@pengutronix.de> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26565>
This commit is contained in:
parent
4e83236ced
commit
035a100246
3 changed files with 3 additions and 3 deletions
|
|
@ -424,7 +424,7 @@ etna_emit_state(struct etna_context *ctx)
|
|||
/*00E08*/ EMIT_STATE(RA_EARLY_DEPTH, etna_zsa_state(ctx->zsa)->RA_DEPTH_CONFIG);
|
||||
}
|
||||
if (unlikely(dirty & (ETNA_DIRTY_SHADER | ETNA_DIRTY_FRAMEBUFFER))) {
|
||||
/*01004*/ EMIT_STATE(PS_OUTPUT_REG, ctx->shader_state.PS_OUTPUT_REG);
|
||||
/*01004*/ EMIT_STATE(PS_OUTPUT_REG, ctx->shader_state.PS_OUTPUT_REG[0]);
|
||||
/*01008*/ EMIT_STATE(PS_INPUT_COUNT,
|
||||
ctx->framebuffer.msaa_mode
|
||||
? ctx->shader_state.PS_INPUT_COUNT_MSAA
|
||||
|
|
|
|||
|
|
@ -227,7 +227,7 @@ struct compiled_shader_state {
|
|||
uint32_t VS_LOAD_BALANCING;
|
||||
uint32_t VS_START_PC;
|
||||
uint32_t PS_END_PC;
|
||||
uint32_t PS_OUTPUT_REG;
|
||||
uint32_t PS_OUTPUT_REG[2];
|
||||
uint32_t PS_INPUT_COUNT;
|
||||
uint32_t PS_INPUT_COUNT_MSAA; /* Adds an input */
|
||||
uint32_t PS_TEMP_REGISTER_CONTROL;
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ etna_link_shaders(struct etna_context *ctx, struct compiled_shader_state *cs,
|
|||
cs->VS_START_PC = 0;
|
||||
|
||||
cs->PS_END_PC = fs->code_size / 4;
|
||||
cs->PS_OUTPUT_REG = fs->ps_color_out_reg;
|
||||
cs->PS_OUTPUT_REG[0] = fs->ps_color_out_reg;
|
||||
cs->PS_INPUT_COUNT =
|
||||
VIVS_PS_INPUT_COUNT_COUNT(link.num_varyings + 1) | /* Number of inputs plus position */
|
||||
VIVS_PS_INPUT_COUNT_UNK8(fs->input_count_unk8);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue