Revert "radeonsi: reduce the size of si_pm4_state"

This reverts commit 9141d88555.

It broke OpenCL.
This commit is contained in:
Marek Olšák 2015-01-08 00:10:18 +01:00
parent e28f9d0e60
commit d7cd9bfc7f
2 changed files with 12 additions and 3 deletions

View File

@ -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

View File

@ -29,8 +29,9 @@
#include "radeon/drm/radeon_winsys.h"
#define SI_PM4_MAX_DW 140
#define SI_PM4_MAX_BO 4
#define SI_PM4_MAX_DW 256
#define SI_PM4_MAX_BO 32
#define SI_PM4_MAX_RELOCS 4
// forward defines
struct si_context;
@ -53,6 +54,10 @@ struct si_pm4_state
enum radeon_bo_usage bo_usage[SI_PM4_MAX_BO];
enum radeon_bo_priority bo_priority[SI_PM4_MAX_BO];
/* relocs for shader data */
unsigned nrelocs;
unsigned relocs[SI_PM4_MAX_RELOCS];
bool compute_pkt;
};