mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 20:58:04 +02:00
glsl: dont try to assign uniform storage for uniform blocks
Fixes a crash in some shaders. Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4050>
This commit is contained in:
parent
576b5ace9e
commit
b1bc24f826
1 changed files with 4 additions and 2 deletions
|
|
@ -132,14 +132,16 @@ nir_setup_uniform_remap_tables(struct gl_context *ctx,
|
|||
|
||||
unsigned num_slots = glsl_get_component_slots(uniform->type);
|
||||
|
||||
uniform->storage = &data[data_pos];
|
||||
if (uniform->block_index == -1)
|
||||
uniform->storage = &data[data_pos];
|
||||
|
||||
/* Set remap table entries point to correct gl_uniform_storage. */
|
||||
for (unsigned j = 0; j < entries; j++) {
|
||||
unsigned element_loc = uniform->remap_location + j;
|
||||
prog->UniformRemapTable[element_loc] = uniform;
|
||||
|
||||
data_pos += num_slots;
|
||||
if (uniform->block_index == -1)
|
||||
data_pos += num_slots;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue