mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 15:20:10 +01:00
ir3: Use ir3_shader_variant::type more often
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16147>
This commit is contained in:
parent
f45c86dfb7
commit
21e3dd57d3
4 changed files with 7 additions and 7 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue