summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_qpu_emit.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2016-11-07 09:05:59 -0800
committerEmil Velikov <emil.l.velikov@gmail.com>2016-11-23 13:07:00 +0000
commit9a4206379b0e36d440481ae89b98467ed53dc86b (patch)
tree6d9b1420beb64122d90d2e73b77c154dd9e97add /src/gallium/drivers/vc4/vc4_qpu_emit.c
parent4685a724f5894a3426419b9b3d4f0ec129493ad1 (diff)
downloadexternal_mesa3d-9a4206379b0e36d440481ae89b98467ed53dc86b.zip
external_mesa3d-9a4206379b0e36d440481ae89b98467ed53dc86b.tar.gz
external_mesa3d-9a4206379b0e36d440481ae89b98467ed53dc86b.tar.bz2
vc4: Don't abort when a shader compile fails.
It's much better to just skip the draw call entirely. Getting this information out of register allocation will also be useful for implementing threaded fragment shaders, which will need to retry non-threaded if RA fails. Cc: <mesa-stable@lists.freedesktop.org> (cherry picked from commit 4d019bd703e7c20d56d5b858577607115b4926a3)
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_qpu_emit.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_qpu_emit.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/vc4/vc4_qpu_emit.c b/src/gallium/drivers/vc4/vc4_qpu_emit.c
index 4d371c0..eedee55 100644
--- a/src/gallium/drivers/vc4/vc4_qpu_emit.c
+++ b/src/gallium/drivers/vc4/vc4_qpu_emit.c
@@ -565,10 +565,13 @@ vc4_generate_code_block(struct vc4_compile *c,
void
vc4_generate_code(struct vc4_context *vc4, struct vc4_compile *c)
{
- struct qpu_reg *temp_registers = vc4_register_allocate(vc4, c);
struct qblock *start_block = list_first_entry(&c->blocks,
struct qblock, link);
+ struct qpu_reg *temp_registers = vc4_register_allocate(vc4, c);
+ if (!temp_registers)
+ return;
+
switch (c->stage) {
case QSTAGE_VERT:
case QSTAGE_COORD: