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;
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,
/* 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 {
unsigned nparam;
bool uses_instanceid;
- bool fs_write_all;
bool vs_out_misc_write;
bool vs_out_point_size;
bool vs_out_edgeflag;
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;
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);