summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_screen.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2016-07-11 10:55:18 -0700
committerEric Anholt <[email protected]>2016-07-12 17:42:40 -0700
commitab1d40b84a9812d73411f3499274a6cbf3f25373 (patch)
tree8d2ab8a70cf7b29e25d6d76ed9232081d6ebf6d8 /src/gallium/drivers/vc4/vc4_screen.c
parent05bcd9dd960d5658801ab35d429ba9778f67cad0 (diff)
vc4: Add a flag in the screen to track control flow support.
For now it's still always false, but I need it in place for kernel backwards compat support as I extend the backend for control flow.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_screen.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_screen.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/gallium/drivers/vc4/vc4_screen.c b/src/gallium/drivers/vc4/vc4_screen.c
index 609dc913655..f60500ddec3 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();