Browse Source

r600g: cs init fixes

- all asics need to emit CONTEXT_CONTROL
- all r6xx asics need to emit 3D_START_CMDBUF

The ddx and r600c already do this. r600g should as well.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
tags/mesa-7.11-rc1
Alex Deucher 14 years ago
parent
commit
b5518834e3

+ 2
- 0
src/gallium/winsys/r600/drm/evergreen_hw_context.c View File

r = -ENOMEM; r = -ENOMEM;
goto out_err; goto out_err;
} }

r600_init_cs(ctx);
/* save 16dwords space for fence mecanism */ /* save 16dwords space for fence mecanism */
ctx->pm4_ndwords -= 16; ctx->pm4_ndwords -= 16;



+ 9
- 5
src/gallium/winsys/r600/drm/r600_hw_context.c View File



#define GROUP_FORCE_NEW_BLOCK 0 #define GROUP_FORCE_NEW_BLOCK 0


static void r600_init_cs(struct r600_context *ctx)
void r600_init_cs(struct r600_context *ctx)
{ {
/* R6xx requires this packet at the start of each command buffer */
if (ctx->radeon->family < CHIP_RV770) {
ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_START_3D_CMDBUF, 0, 0);
ctx->pm4[ctx->pm4_cdwords++] = 0x00000000;
}
/* All asics require this one */
ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_CONTEXT_CONTROL, 1, 0); ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_CONTEXT_CONTROL, 1, 0);
ctx->pm4[ctx->pm4_cdwords++] = 0x80000000; ctx->pm4[ctx->pm4_cdwords++] = 0x80000000;
ctx->pm4[ctx->pm4_cdwords++] = 0x80000000; ctx->pm4[ctx->pm4_cdwords++] = 0x80000000;
goto out_err; goto out_err;
} }


if (ctx->radeon->family == CHIP_R600)
r600_init_cs(ctx);
r600_init_cs(ctx);
/* save 16dwords space for fence mecanism */ /* save 16dwords space for fence mecanism */
ctx->pm4_ndwords -= 16; ctx->pm4_ndwords -= 16;


ctx->pm4_cdwords = 0; ctx->pm4_cdwords = 0;
ctx->flags = 0; ctx->flags = 0;


if (ctx->radeon->family == CHIP_R600)
r600_init_cs(ctx);
r600_init_cs(ctx);


/* resume queries */ /* resume queries */
r600_context_queries_resume(ctx); r600_context_queries_resume(ctx);

+ 1
- 0
src/gallium/winsys/r600/drm/r600_priv.h View File

void r600_context_reg(struct r600_context *ctx, void r600_context_reg(struct r600_context *ctx,
unsigned offset, unsigned value, unsigned offset, unsigned value,
unsigned mask); unsigned mask);
void r600_init_cs(struct r600_context *ctx);
/* /*
* r600_bo.c * r600_bo.c
*/ */

Loading…
Cancel
Save