summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/freedreno
diff options
context:
space:
mode:
authorJonathan Marek <jonathan@marek.ca>2020-07-03 11:34:47 -0400
committerJonathan Marek <jonathan@marek.ca>2020-07-06 08:48:06 -0400
commitb76c6dcbc55d6d2bfdb92950ec5af00430aef943 (patch)
tree7f1790d2f489f89e70a9424af876c7203da800d9 /src/gallium/drivers/freedreno
parent3c5512ce5098eab788158fbb6fc6c04a47727ce7 (diff)
freedreno/ir3: fix/rework tess levels
The previous version assumes tess level outputs will only be written once in the shader, however its not possible to guarantee that. It also assumes all invocations will write all the levels, which is also not guaranteed. This is required to fix the "tesselation" and "terraintessellation" demos with turnip. The comment about nir_lower_io_to_temporaries in lower_tess_ctrl_block is removed because nir_lower_io_to_temporaries specifically skips TESS_CTRL shaders so the comment doesn't make sense. The split load for tess levels workaround is removed, the new version only has scalar access unless if ever gets vectorized. This sets NIR_COMPACT_ARRAYS cap to avoid the glsl tess vec lowering with gallium. It seems this will also disable "LowerCombinedClipCullDistance", which I'm not sure was needed or not. Signed-off-by: Jonathan Marek <jonathan@marek.ca> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5744>
Diffstat (limited to 'src/gallium/drivers/freedreno')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_screen.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c
index 0c7889dcd0b..0ab93801ba8 100644
--- a/src/gallium/drivers/freedreno/freedreno_screen.c
+++ b/src/gallium/drivers/freedreno/freedreno_screen.c
@@ -198,6 +198,8 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
case PIPE_CAP_TEXTURE_BARRIER:
case PIPE_CAP_INVALIDATE_BUFFER:
case PIPE_CAP_RGB_OVERRIDE_DST_ALPHA_BLEND:
+ case PIPE_CAP_GLSL_TESS_LEVELS_AS_INPUTS:
+ case PIPE_CAP_NIR_COMPACT_ARRAYS:
return 1;
case PIPE_CAP_VERTEX_BUFFER_OFFSET_4BYTE_ALIGNED_ONLY: