summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/drivers/vc4/vc4_program.c1
-rw-r--r--src/gallium/drivers/vc4/vc4_screen.c13
-rw-r--r--src/gallium/drivers/vc4/vc4_screen.h1
3 files changed, 14 insertions, 1 deletions
diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c
index 0a231b2..dec1445 100644
--- a/src/gallium/drivers/vc4/vc4_program.c
+++ b/src/gallium/drivers/vc4/vc4_program.c
@@ -1765,6 +1765,7 @@ vc4_shader_ntq(struct vc4_context *vc4, enum qstage stage,
{
struct vc4_compile *c = qir_compile_init();
+ c->vc4 = vc4;
c->stage = stage;
c->shader_state = &key->shader_state->base;
c->program_id = key->shader_state->program_id;
diff --git a/src/gallium/drivers/vc4/vc4_screen.c b/src/gallium/drivers/vc4/vc4_screen.c
index 609dc91..f60500d 100644
--- a/src/gallium/drivers/vc4/vc4_screen.c
+++ b/src/gallium/drivers/vc4/vc4_screen.c
@@ -329,8 +329,10 @@ vc4_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader,
case PIPE_SHADER_CAP_MAX_TEX_INSTRUCTIONS:
case PIPE_SHADER_CAP_MAX_TEX_INDIRECTIONS:
return 16384;
+
case PIPE_SHADER_CAP_MAX_CONTROL_FLOW_DEPTH:
- return 0;
+ return vc4_screen(pscreen)->has_control_flow;
+
case PIPE_SHADER_CAP_MAX_INPUTS:
if (shader == PIPE_SHADER_FRAGMENT)
return 8;
@@ -494,6 +496,12 @@ vc4_screen_is_format_supported(struct pipe_screen *pscreen,
return retval == usage;
}
+static bool
+vc4_supports_branches(struct vc4_screen *screen)
+{
+ return false;
+}
+
struct pipe_screen *
vc4_screen_create(int fd)
{
@@ -512,6 +520,9 @@ vc4_screen_create(int fd)
screen->fd = fd;
list_inithead(&screen->bo_cache.time_list);
+ if (vc4_supports_branches(screen))
+ screen->has_control_flow = true;
+
vc4_fence_init(screen);
vc4_debug = debug_get_option_vc4_debug();
diff --git a/src/gallium/drivers/vc4/vc4_screen.h b/src/gallium/drivers/vc4/vc4_screen.h
index 03f76b2..6cecca6 100644
--- a/src/gallium/drivers/vc4/vc4_screen.h
+++ b/src/gallium/drivers/vc4/vc4_screen.h
@@ -75,6 +75,7 @@ struct vc4_screen {
uint32_t bo_size;
uint32_t bo_count;
+ bool has_control_flow;
};
static inline struct vc4_screen *