diff options
Diffstat (limited to 'lib/mesa/src/gallium/drivers/vc4/kernel/vc4_validate.c')
-rw-r--r-- | lib/mesa/src/gallium/drivers/vc4/kernel/vc4_validate.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/mesa/src/gallium/drivers/vc4/kernel/vc4_validate.c b/lib/mesa/src/gallium/drivers/vc4/kernel/vc4_validate.c index c9e3934ab..4ef01108b 100644 --- a/lib/mesa/src/gallium/drivers/vc4/kernel/vc4_validate.c +++ b/lib/mesa/src/gallium/drivers/vc4/kernel/vc4_validate.c @@ -800,7 +800,7 @@ validate_gl_shader_rec(struct drm_device *dev, uint32_t src_offset = *(uint32_t *)(pkt_u + o); uint32_t *texture_handles_u; void *uniform_data_u; - uint32_t tex; + uint32_t tex, uni; *(uint32_t *)(pkt_v + o) = bo[i]->paddr + src_offset; @@ -838,6 +838,17 @@ validate_gl_shader_rec(struct drm_device *dev, } } + /* Fill in the uniform slots that need this shader's + * start-of-uniforms address (used for resetting the uniform + * stream in the presence of control flow). + */ + for (uni = 0; + uni < validated_shader->num_uniform_addr_offsets; + uni++) { + uint32_t o = validated_shader->uniform_addr_offsets[uni]; + ((uint32_t *)exec->uniforms_v)[o] = exec->uniforms_p; + } + *(uint32_t *)(pkt_v + o + 4) = exec->uniforms_p; exec->uniforms_u += validated_shader->uniforms_src_size; |