mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 18:00:10 +01:00
radeonsi: get fs_write_all from tgsi_shader_info directly
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
This commit is contained in:
parent
8908fae243
commit
8860584045
3 changed files with 3 additions and 16 deletions
|
|
@ -1438,11 +1438,6 @@ static void si_llvm_emit_fs_epilogue(struct lp_build_tgsi_context * bld_base)
|
|||
|
||||
tgsi_parse_token(parse);
|
||||
|
||||
if (parse->FullToken.Token.Type == TGSI_TOKEN_TYPE_PROPERTY &&
|
||||
parse->FullToken.FullProperty.Property.PropertyName ==
|
||||
TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS)
|
||||
shader->fs_write_all = TRUE;
|
||||
|
||||
if (parse->FullToken.Token.Type != TGSI_TOKEN_TYPE_DECLARATION)
|
||||
continue;
|
||||
|
||||
|
|
@ -1499,7 +1494,8 @@ static void si_llvm_emit_fs_epilogue(struct lp_build_tgsi_context * bld_base)
|
|||
memcpy(last_args, args, sizeof(args));
|
||||
|
||||
/* Handle FS_COLOR0_WRITES_ALL_CBUFS. */
|
||||
if (shader->fs_write_all && shader->output[i].sid == 0 &&
|
||||
if (shader->selector->info.properties[TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS][0] &&
|
||||
shader->output[i].sid == 0 &&
|
||||
si_shader_ctx->shader->key.ps.nr_cbufs > 1) {
|
||||
for (int c = 1; c < si_shader_ctx->shader->key.ps.nr_cbufs; c++) {
|
||||
si_llvm_init_export_args_load(bld_base,
|
||||
|
|
|
|||
|
|
@ -124,11 +124,6 @@ struct si_shader_selector {
|
|||
|
||||
/* PIPE_SHADER_[VERTEX|FRAGMENT|...] */
|
||||
unsigned type;
|
||||
|
||||
/* 1 when the shader contains
|
||||
* TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS, otherwise it's 0.
|
||||
* Used to determine whether we need to include nr_cbufs in the key */
|
||||
unsigned fs_write_all;
|
||||
};
|
||||
|
||||
union si_shader_key {
|
||||
|
|
@ -184,7 +179,6 @@ struct si_shader {
|
|||
|
||||
unsigned nparam;
|
||||
bool uses_instanceid;
|
||||
bool fs_write_all;
|
||||
bool vs_out_misc_write;
|
||||
bool vs_out_point_size;
|
||||
bool vs_out_edgeflag;
|
||||
|
|
|
|||
|
|
@ -2215,7 +2215,7 @@ static INLINE void si_shader_selector_key(struct pipe_context *ctx,
|
|||
key->vs.gs_used_inputs = sctx->gs_shader->current->gs_used_inputs;
|
||||
}
|
||||
} else if (sel->type == PIPE_SHADER_FRAGMENT) {
|
||||
if (sel->fs_write_all)
|
||||
if (sel->info.properties[TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS][0])
|
||||
key->ps.nr_cbufs = sctx->framebuffer.state.nr_cbufs;
|
||||
key->ps.export_16bpc = sctx->framebuffer.export_16bpc;
|
||||
|
||||
|
|
@ -2312,9 +2312,6 @@ static void *si_create_shader_state(struct pipe_context *ctx,
|
|||
sel->so = state->stream_output;
|
||||
tgsi_scan_shader(state->tokens, &sel->info);
|
||||
|
||||
if (pipe_shader_type == PIPE_SHADER_FRAGMENT)
|
||||
sel->fs_write_all = sel->info.color0_writes_all_cbufs;
|
||||
|
||||
r = si_shader_select(ctx, sel);
|
||||
if (r) {
|
||||
free(sel);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue