Module: Mesa
Branch: main
Commit: e01f86c67b0bd955758366827cb8322aa1bec263
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=e01f86c67b0bd955758366827cb8322aa1bec263

Author: Pavel Ondračka <[email protected]>
Date:   Sun Apr 24 18:58:14 2022 +0200

r300: set PIPE_BIND_CONSTANT_BUFFER for const_uploader

Fixes constant uploads with nine.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5966
CC: mesa-stable
Signed-off-by: Pavel Ondračka <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16125>

---

 src/gallium/drivers/r300/r300_context.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/r300/r300_context.c 
b/src/gallium/drivers/r300/r300_context.c
index 3eb242798aa..4a8facd7caf 100644
--- a/src/gallium/drivers/r300/r300_context.c
+++ b/src/gallium/drivers/r300/r300_context.c
@@ -441,7 +441,9 @@ struct pipe_context* r300_create_context(struct 
pipe_screen* screen,
                                      PIPE_BIND_CUSTOM, PIPE_USAGE_STREAM, 0);
     r300->context.stream_uploader = u_upload_create(&r300->context, 1024 * 
1024,
                                                     0, PIPE_USAGE_STREAM, 0);
-    r300->context.const_uploader = r300->context.stream_uploader;
+    r300->context.const_uploader = u_upload_create(&r300->context, 1024 * 1024,
+                                                   PIPE_BIND_CONSTANT_BUFFER,
+                                                   PIPE_USAGE_STREAM, 0);
 
     r300->blitter = util_blitter_create(&r300->context);
     if (r300->blitter == NULL)

Reply via email to