Mesa (master): freedreno/ir3: remove from_tgsi

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Feb 28 17:12:35 UTC 2020


Module: Mesa
Branch: master
Commit: 141d0d1c25d031df17c7ec1931c2e78cfc04736a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=141d0d1c25d031df17c7ec1931c2e78cfc04736a

Author: Rob Clark <robdclark at chromium.org>
Date:   Mon Feb 24 08:16:34 2020 -0800

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 <robdclark at chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3989>

---

 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 e6765985676..9dd3cb44ae4 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 aa680a3aae6..6eecee3a68b 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);



More information about the mesa-commit mailing list