summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_context.h
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2016-11-07 09:05:59 -0800
committerEric Anholt <[email protected]>2016-11-09 15:33:56 -0800
commit4d019bd703e7c20d56d5b858577607115b4926a3 (patch)
treecf8f52d1267a6f472247e010d707a1ef86467830 /src/gallium/drivers/vc4/vc4_context.h
parentaaee3daa90578fb711cc89186a65bc3d2c68022f (diff)
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: <[email protected]>
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_context.h')
-rw-r--r--src/gallium/drivers/vc4/vc4_context.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/drivers/vc4/vc4_context.h b/src/gallium/drivers/vc4/vc4_context.h
index 5dd0ba645e5..aebbd81d2bf 100644
--- a/src/gallium/drivers/vc4/vc4_context.h
+++ b/src/gallium/drivers/vc4/vc4_context.h
@@ -157,6 +157,12 @@ struct vc4_compiled_shader {
bool disable_early_z;
+ /* Set if the compile failed, likely due to register allocation
+ * failure. In this case, we have no shader to run and should not try
+ * to do any draws.
+ */
+ bool failed;
+
uint8_t num_inputs;
/* Byte offsets for the start of the vertex attributes 0-7, and the
@@ -462,7 +468,7 @@ void vc4_flush_jobs_reading_resource(struct vc4_context *vc4,
void vc4_emit_state(struct pipe_context *pctx);
void vc4_generate_code(struct vc4_context *vc4, struct vc4_compile *c);
struct qpu_reg *vc4_register_allocate(struct vc4_context *vc4, struct vc4_compile *c);
-void vc4_update_compiled_shaders(struct vc4_context *vc4, uint8_t prim_mode);
+bool vc4_update_compiled_shaders(struct vc4_context *vc4, uint8_t prim_mode);
bool vc4_rt_format_supported(enum pipe_format f);
bool vc4_rt_format_is_565(enum pipe_format f);