ir3: Use ir3_shader_variant::type more often

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16147>
This commit is contained in:
Connor Abbott 2022-02-16 18:19:58 +01:00 committed by Marge Bot
parent f45c86dfb7
commit 21e3dd57d3
4 changed files with 7 additions and 7 deletions

View file

@ -571,7 +571,7 @@ ir3_nir_lower_variant(struct ir3_shader_variant *so, nir_shader *s)
bool progress = false;
if (so->key.has_gs || so->key.tessellation) {
switch (so->shader->type) {
switch (so->type) {
case MESA_SHADER_VERTEX:
NIR_PASS_V(s, ir3_nir_lower_to_explicit_output, so,
so->key.tessellation);

View file

@ -233,7 +233,7 @@ assemble_variant(struct ir3_shader_variant *v)
{
v->bin = ir3_shader_assemble(v);
bool dbg_enabled = shader_debug_enabled(v->shader->type);
bool dbg_enabled = shader_debug_enabled(v->type);
if (dbg_enabled || ir3_shader_override_path || v->disasm_info.write_disasm) {
unsigned char sha1[21];
char sha1buf[41];
@ -272,7 +272,7 @@ assemble_variant(struct ir3_shader_variant *v)
"Native code%s for unnamed %s shader %s with sha1 %s:\n",
shader_overridden ? " (overridden)" : "", ir3_shader_stage(v),
v->name, sha1buf);
if (v->shader->type == MESA_SHADER_FRAGMENT)
if (v->type == MESA_SHADER_FRAGMENT)
fprintf(stream, "SIMD0\n");
ir3_shader_disasm(v, v->bin, stream);
fclose(stream);

View file

@ -898,12 +898,12 @@ ir3_max_const(const struct ir3_shader_variant *v)
{
const struct ir3_compiler *compiler = v->shader->compiler;
if ((v->shader->type == MESA_SHADER_COMPUTE) ||
(v->shader->type == MESA_SHADER_KERNEL)) {
if ((v->type == MESA_SHADER_COMPUTE) ||
(v->type == MESA_SHADER_KERNEL)) {
return compiler->max_const_compute;
} else if (v->key.safe_constlen) {
return compiler->max_const_safe;
} else if (v->shader->type == MESA_SHADER_FRAGMENT) {
} else if (v->type == MESA_SHADER_FRAGMENT) {
return compiler->max_const_frag;
} else {
return compiler->max_const_geom;

View file

@ -2393,7 +2393,7 @@ tu_append_executable(struct tu_pipeline *pipeline, struct ir3_shader_variant *va
ralloc_steal(pipeline->executables_mem_ctx, variant->disasm_info.disasm);
struct tu_pipeline_executable exe = {
.stage = variant->shader->type,
.stage = variant->type,
.nir_from_spirv = nir_from_spirv,
.nir_final = variant->disasm_info.nir,
.disasm = variant->disasm_info.disasm,