From 141d0d1c25d031df17c7ec1931c2e78cfc04736a Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Mon, 24 Feb 2020 08:16:34 -0800 Subject: [PATCH] freedreno/ir3: remove from_tgsi No longer used, other than in ir3 cmdline compiler, where it can be replaced with a local variable. Signed-off-by: Rob Clark Part-of: --- src/freedreno/ir3/ir3_shader.h | 3 --- src/gallium/drivers/freedreno/ir3/ir3_cmdline.c | 11 ++++++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/freedreno/ir3/ir3_shader.h b/src/freedreno/ir3/ir3_shader.h index e676598..9dd3cb4 100644 --- a/src/freedreno/ir3/ir3_shader.h +++ b/src/freedreno/ir3/ir3_shader.h @@ -628,9 +628,6 @@ struct ir3_shader { uint32_t id; uint32_t variant_count; - /* so we know when we can disable TGSI related hacks: */ - bool from_tgsi; - struct ir3_compiler *compiler; struct ir3_ubo_analysis_state ubo_state; diff --git a/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c b/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c index aa680a3..6eecee3 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c +++ b/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c @@ -290,6 +290,7 @@ int main(int argc, char **argv) const char *entry; void *ptr; bool from_spirv = false; + bool from_tgsi = false; size_t size; memset(&s, 0, sizeof(s)); @@ -406,7 +407,7 @@ int main(int argc, char **argv) if (strcmp(ext, ".tgsi") == 0) { if (num_files != 0) errx(1, "in TGSI mode, only a single file may be specified"); - s.from_tgsi = true; + from_tgsi = true; } else if (strcmp(ext, ".spv") == 0) { if (num_files != 0) errx(1, "in SPIR-V mode, only a single file may be specified"); @@ -419,19 +420,19 @@ int main(int argc, char **argv) entry = argv[n]; n++; } else if (strcmp(ext, ".comp") == 0) { - if (s.from_tgsi || from_spirv) + if (from_tgsi || from_spirv) errx(1, "cannot mix GLSL/TGSI/SPIRV"); if (num_files >= ARRAY_SIZE(filenames)) errx(1, "too many GLSL files"); stage = MESA_SHADER_COMPUTE; } else if (strcmp(ext, ".frag") == 0) { - if (s.from_tgsi || from_spirv) + if (from_tgsi || from_spirv) errx(1, "cannot mix GLSL/TGSI/SPIRV"); if (num_files >= ARRAY_SIZE(filenames)) errx(1, "too many GLSL files"); stage = MESA_SHADER_FRAGMENT; } else if (strcmp(ext, ".vert") == 0) { - if (s.from_tgsi) + if (from_tgsi) errx(1, "cannot mix GLSL and TGSI"); if (num_files >= ARRAY_SIZE(filenames)) errx(1, "too many GLSL files"); @@ -450,7 +451,7 @@ int main(int argc, char **argv) compiler = ir3_compiler_create(NULL, gpu_id); - if (s.from_tgsi) { + if (from_tgsi) { struct tgsi_token toks[65536]; const nir_shader_compiler_options *nir_options = ir3_get_compiler_options(compiler); -- 2.7.4