diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2017-08-14 09:45:54 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2017-08-14 09:45:54 +0000 |
commit | 4c58069f5013f0a621503525f7d5193bfe9976b3 (patch) | |
tree | bd8f8a08b889e9a8b99c9de01ae12459d527ea6d /lib/mesa/src/gallium/drivers/radeonsi/si_pm4.c | |
parent | 5caa025e6b62d0456faad86c89f239a14d1eaadb (diff) |
Import Mesa 17.1.6
Diffstat (limited to 'lib/mesa/src/gallium/drivers/radeonsi/si_pm4.c')
-rw-r--r-- | lib/mesa/src/gallium/drivers/radeonsi/si_pm4.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/lib/mesa/src/gallium/drivers/radeonsi/si_pm4.c b/lib/mesa/src/gallium/drivers/radeonsi/si_pm4.c index 386d0935e..bf923ec1e 100644 --- a/lib/mesa/src/gallium/drivers/radeonsi/si_pm4.c +++ b/lib/mesa/src/gallium/drivers/radeonsi/si_pm4.c @@ -29,8 +29,6 @@ #include "si_pipe.h" #include "sid.h" -#define NUMBER_OF_STATES (sizeof(union si_state) / sizeof(struct si_pm4_state *)) - void si_pm4_cmd_begin(struct si_pm4_state *state, unsigned opcode) { state->last_opcode = opcode; @@ -152,27 +150,15 @@ void si_pm4_emit(struct si_context *sctx, struct si_pm4_state *state) radeon_emit(cs, PKT3(PKT3_INDIRECT_BUFFER_CIK, 2, 0)); radeon_emit(cs, ib->gpu_address); - radeon_emit(cs, (ib->gpu_address >> 32) & 0xffff); + radeon_emit(cs, ib->gpu_address >> 32); radeon_emit(cs, (ib->b.b.width0 >> 2) & 0xfffff); } } -void si_pm4_emit_dirty(struct si_context *sctx) -{ - for (int i = 0; i < NUMBER_OF_STATES; ++i) { - struct si_pm4_state *state = sctx->queued.array[i]; - - if (!state || sctx->emitted.array[i] == state) - continue; - - si_pm4_emit(sctx, state); - sctx->emitted.array[i] = state; - } -} - void si_pm4_reset_emitted(struct si_context *sctx) { memset(&sctx->emitted, 0, sizeof(sctx->emitted)); + sctx->dirty_states |= u_bit_consecutive(0, SI_NUM_STATES); } void si_pm4_upload_indirect_buffer(struct si_context *sctx, @@ -190,7 +176,7 @@ void si_pm4_upload_indirect_buffer(struct si_context *sctx, r600_resource_reference(&state->indirect_buffer, NULL); state->indirect_buffer = (struct r600_resource*) - pipe_buffer_create(screen, PIPE_BIND_CUSTOM, + pipe_buffer_create(screen, 0, PIPE_USAGE_DEFAULT, aligned_ndw * 4); if (!state->indirect_buffer) return; |