Mesa (master): zink: clamp PIPE_SHADER_CAP_MAX_SHADER_BUFFERS to PIPE_MAX_SHADER_BUFFERS

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Aug 3 14:31:26 UTC 2020


Module: Mesa
Branch: master
Commit: 99b44536bf2335989cad6ef33d148115fd4316cf
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=99b44536bf2335989cad6ef33d148115fd4316cf

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Thu Jul  2 15:41:51 2020 -0400

zink: clamp PIPE_SHADER_CAP_MAX_SHADER_BUFFERS to PIPE_MAX_SHADER_BUFFERS

this value gets split between ssbos and abos, so clamping to 8 here causes
a number of tests to fail just because there's not enough buffers available

other gallium drivers return 32 here, so this seems pretty safe

Reviewed-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5913>

---

 src/gallium/drivers/zink/zink_screen.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c
index ad46d60b097..248c7efc650 100644
--- a/src/gallium/drivers/zink/zink_screen.c
+++ b/src/gallium/drivers/zink/zink_screen.c
@@ -458,7 +458,7 @@ zink_get_shader_param(struct pipe_screen *pscreen,
 
    case PIPE_SHADER_CAP_MAX_SHADER_BUFFERS:
       /* TODO: this limitation is dumb, and will need some fixes in mesa */
-      return MIN2(screen->props.limits.maxPerStageDescriptorStorageBuffers, 8);
+      return MIN2(screen->props.limits.maxPerStageDescriptorStorageBuffers, PIPE_MAX_SHADER_BUFFERS);
 
    case PIPE_SHADER_CAP_SUPPORTED_IRS:
       return (1 << PIPE_SHADER_IR_NIR) | (1 << PIPE_SHADER_IR_TGSI);



More information about the mesa-commit mailing list