summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/radeonsi/si_descriptors.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_descriptors.c')
-rw-r--r--src/gallium/drivers/radeonsi/si_descriptors.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c
index 51f35e5963f..030a8115015 100644
--- a/src/gallium/drivers/radeonsi/si_descriptors.c
+++ b/src/gallium/drivers/radeonsi/si_descriptors.c
@@ -1528,8 +1528,7 @@ void si_rebind_buffer(struct si_context *sctx, struct pipe_resource *buf)
/* Vertex buffers. */
if (!buffer) {
- if (num_elems)
- sctx->vertex_buffers_dirty = true;
+ sctx->vertex_buffers_dirty = num_elems > 0;
} else if (buffer->bind_history & PIPE_BIND_VERTEX_BUFFER) {
for (i = 0; i < num_elems; i++) {
int vb = sctx->vertex_elements->vertex_buffer_index[i];
@@ -1540,7 +1539,7 @@ void si_rebind_buffer(struct si_context *sctx, struct pipe_resource *buf)
continue;
if (sctx->vertex_buffer[vb].buffer.resource == buf) {
- sctx->vertex_buffers_dirty = true;
+ sctx->vertex_buffers_dirty = num_elems > 0;
break;
}
}
@@ -1866,7 +1865,9 @@ static void si_mark_shader_pointers_dirty(struct si_context *sctx, unsigned shad
u_bit_consecutive(SI_DESCS_FIRST_SHADER + shader * SI_NUM_SHADER_DESCS, SI_NUM_SHADER_DESCS);
if (shader == PIPE_SHADER_VERTEX) {
- sctx->vertex_buffer_pointer_dirty = sctx->vb_descriptors_buffer != NULL;
+ sctx->vertex_buffer_pointer_dirty = sctx->vb_descriptors_buffer != NULL &&
+ sctx->num_vertex_elements >
+ sctx->screen->num_vbos_in_user_sgprs;
sctx->vertex_buffer_user_sgprs_dirty =
sctx->num_vertex_elements > 0 && sctx->screen->num_vbos_in_user_sgprs;
}
@@ -1877,7 +1878,9 @@ static void si_mark_shader_pointers_dirty(struct si_context *sctx, unsigned shad
void si_shader_pointers_mark_dirty(struct si_context *sctx)
{
sctx->shader_pointers_dirty = u_bit_consecutive(0, SI_NUM_DESCS);
- sctx->vertex_buffer_pointer_dirty = sctx->vb_descriptors_buffer != NULL;
+ sctx->vertex_buffer_pointer_dirty = sctx->vb_descriptors_buffer != NULL &&
+ sctx->num_vertex_elements >
+ sctx->screen->num_vbos_in_user_sgprs;
sctx->vertex_buffer_user_sgprs_dirty =
sctx->num_vertex_elements > 0 && sctx->screen->num_vbos_in_user_sgprs;
si_mark_atom_dirty(sctx, &sctx->atoms.s.shader_pointers);