llvmpipe: set prefer_real_buffer_in_constbuf0 and delete user buffer path
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

this was redundant

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40439>
This commit is contained in:
Mike Blumenkrantz 2025-08-11 11:16:21 -04:00 committed by Marge Bot
parent ad948a8ca6
commit 30ba4bfe63
2 changed files with 3 additions and 10 deletions

View file

@ -212,6 +212,7 @@ llvmpipe_init_screen_caps(struct pipe_screen *screen)
#if defined(HAVE_LIBDRM) && defined(HAVE_LINUX_UDMABUF_H)
caps->native_fence_fd = lscreen->dummy_sync_fd != -1;
#endif
caps->prefer_real_buffer_in_constbuf0 = true;
caps->npot_textures = true;
caps->mixed_framebuffer_sizes = true;
caps->mixed_color_depth_bits = true;

View file

@ -4294,17 +4294,9 @@ llvmpipe_set_constant_buffer(struct pipe_context *pipe,
/* note: reference counting */
util_copy_constant_buffer(&llvmpipe->constants[shader][index], cb);
/* user_buffer is only valid until the next set_constant_buffer (at most,
* possibly until shader deletion), so we need to upload it now to make
* sure it doesn't get updated/freed out from under us.
*/
if (constants->user_buffer) {
u_upload_data_ref(llvmpipe->pipe.const_uploader, 0, constants->buffer_size,
16, constants->user_buffer, &constants->buffer_offset,
&constants->buffer);
}
assert(!constants->user_buffer);
if (constants->buffer) {
if (!(constants->buffer->bind & PIPE_BIND_CONSTANT_BUFFER)) {
if (!(constants->buffer->bind & PIPE_BIND_CONSTANT_BUFFER)) {
debug_printf("Illegal set constant without bind flag\n");
constants->buffer->bind |= PIPE_BIND_CONSTANT_BUFFER;
}