mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-19 10:38:30 +02:00
iris: Fix constant buffer sizes for non-UBOs
Since the system value refactor, we've accidentally only been setting cbuf->buffer_size in the UBO case, and not in the uploaded-constants case. We use cbuf->buffer_size to fill out the SURFACE_STATE entry, so it needs to be initialized in both cases. Fixes:3b6d787e40("iris: move sysvals to their own constant buffer") (cherry picked from commit077a1952cc)
This commit is contained in:
parent
97792279e4
commit
4eabbc04f2
1 changed files with 4 additions and 3 deletions
|
|
@ -2676,11 +2676,12 @@ iris_set_constant_buffer(struct pipe_context *ctx,
|
|||
pipe_resource_reference(&cbuf->buffer, input->buffer);
|
||||
|
||||
cbuf->buffer_offset = input->buffer_offset;
|
||||
cbuf->buffer_size =
|
||||
MIN2(input->buffer_size,
|
||||
iris_resource_bo(cbuf->buffer)->size - cbuf->buffer_offset);
|
||||
}
|
||||
|
||||
cbuf->buffer_size =
|
||||
MIN2(input->buffer_size,
|
||||
iris_resource_bo(cbuf->buffer)->size - cbuf->buffer_offset);
|
||||
|
||||
struct iris_resource *res = (void *) cbuf->buffer;
|
||||
res->bind_history |= PIPE_BIND_CONSTANT_BUFFER;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue