aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_pm4.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2015-01-08 00:10:18 +0100
committerMarek Olšák <[email protected]>2015-01-08 00:10:36 +0100
commitd7cd9bfc7f4cf6ae63dae7e41086fb4f08f379c0 (patch)
tree483ab90d6053cd4bae6b57f25c6b0022f8fa9a50 /src/gallium/drivers/radeonsi/si_pm4.c
parente28f9d0e60468db429e75a27443f7df52da224a2 (diff)
Revert "radeonsi: reduce the size of si_pm4_state"
This reverts commit 9141d8855555e45a057970e78969e1518ad3617d. It broke OpenCL.
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_pm4.c')
-rw-r--r--src/gallium/drivers/radeonsi/si_pm4.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/si_pm4.c b/src/gallium/drivers/radeonsi/si_pm4.c
index 27293464e5c..5edf15218f6 100644
--- a/src/gallium/drivers/radeonsi/si_pm4.c
+++ b/src/gallium/drivers/radeonsi/si_pm4.c
@@ -145,13 +145,17 @@ unsigned si_pm4_dirty_dw(struct si_context *sctx)
void si_pm4_emit(struct si_context *sctx, struct si_pm4_state *state)
{
struct radeon_winsys_cs *cs = sctx->b.rings.gfx.cs;
-
for (int i = 0; i < state->nbo; ++i) {
r600_context_bo_reloc(&sctx->b, &sctx->b.rings.gfx, state->bo[i],
state->bo_usage[i], state->bo_priority[i]);
}
memcpy(&cs->buf[cs->cdw], state->pm4, state->ndw * 4);
+
+ for (int i = 0; i < state->nrelocs; ++i) {
+ cs->buf[cs->cdw + state->relocs[i]] += cs->cdw << 2;
+ }
+
cs->cdw += state->ndw;
#if SI_TRACE_CS