Mesa (master): freedreno/ir3: hack for standalone compiler
Rob Clark
robclark at kemper.freedesktop.org
Sat Dec 20 17:09:27 UTC 2014
Module: Mesa
Branch: master
Commit: 4ee545646d58cda4429f3dcfa4505471e424a4f2
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4ee545646d58cda4429f3dcfa4505471e424a4f2
Author: Rob Clark <robclark at freedesktop.org>
Date: Sat Dec 20 11:44:28 2014 -0500
freedreno/ir3: hack for standalone compiler
Standalone compiler doesn't have screen or context. We need to come up
with a better way to control the target arch (ie. something that we can
control from cmdline w/ standalone compiler) but for now this hack keeps
it from segfault'ing.
Signed-off-by: Rob Clark <robclark at freedesktop.org>
---
src/gallium/drivers/freedreno/ir3/ir3_compiler.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_compiler.c b/src/gallium/drivers/freedreno/ir3/ir3_compiler.c
index ade4b1c..896f043 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3_compiler.c
+++ b/src/gallium/drivers/freedreno/ir3/ir3_compiler.c
@@ -170,7 +170,11 @@ compile_init(struct ir3_compile_context *ctx, struct ir3_shader_variant *so,
break;
}
- if (ir3_shader_gpuid(so->shader) >= 400) {
+ if (!so->shader) {
+ /* hack for standalone compiler which does not have
+ * screen/context:
+ */
+ } else if (ir3_shader_gpuid(so->shader) >= 400) {
/* a4xx seems to have *no* sam.p */
lconfig.lower_TXP = ~0; /* lower all txp */
} else {
More information about the mesa-commit
mailing list