summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2014-12-20 11:44:28 -0500
committerRob Clark <[email protected]>2014-12-20 12:08:37 -0500
commit4ee545646d58cda4429f3dcfa4505471e424a4f2 (patch)
tree56162b044a44d4c9241edffc0be9db5e27581436 /src/gallium/drivers/freedreno
parenta5481d6fbba9bcaa0c7d49ae0a3580fee21041a6 (diff)
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 <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno')
-rw-r--r--src/gallium/drivers/freedreno/ir3/ir3_compiler.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_compiler.c b/src/gallium/drivers/freedreno/ir3/ir3_compiler.c
index ade4b1cdc56..896f043de4a 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 {