Browse Source

radeonsi: don't send IB dword usage to si_need_cs_space

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
tags/11.1-branchpoint
Marek Olšák 10 years ago
parent
commit
28b34b474e

+ 2
- 3
src/gallium/drivers/radeonsi/si_cp_dma.c View File

@@ -155,8 +155,7 @@ static void si_clear_buffer(struct pipe_context *ctx, struct pipe_resource *dst,
unsigned byte_count = MIN2(size, CP_DMA_MAX_BYTE_COUNT);
unsigned dma_flags = tc_l2_flag;

si_need_cs_space(sctx, 7 + (sctx->b.flags ? sctx->cache_flush.num_dw : 0),
FALSE);
si_need_cs_space(sctx);

/* This must be done after need_cs_space. */
radeon_add_to_buffer_list(&sctx->b, &sctx->b.rings.gfx,
@@ -226,7 +225,7 @@ void si_copy_buffer(struct si_context *sctx,
unsigned sync_flags = tc_l2_flag;
unsigned byte_count = MIN2(size, CP_DMA_MAX_BYTE_COUNT);

si_need_cs_space(sctx, 7 + (sctx->b.flags ? sctx->cache_flush.num_dw : 0), FALSE);
si_need_cs_space(sctx);

/* Flush the caches for the first copy only. Also wait for old CP DMA packets to complete. */
if (sctx->b.flags) {

+ 1
- 2
src/gallium/drivers/radeonsi/si_hw_context.c View File

@@ -27,8 +27,7 @@
#include "si_pipe.h"

/* initialize */
void si_need_cs_space(struct si_context *ctx, unsigned num_dw,
boolean count_draw_in)
void si_need_cs_space(struct si_context *ctx)
{
struct radeon_winsys_cs *cs = ctx->b.rings.gfx.cs;


+ 1
- 1
src/gallium/drivers/radeonsi/si_pipe.h View File

@@ -317,7 +317,7 @@ void si_dma_copy(struct pipe_context *ctx,
void si_context_gfx_flush(void *context, unsigned flags,
struct pipe_fence_handle **fence);
void si_begin_new_cs(struct si_context *ctx);
void si_need_cs_space(struct si_context *ctx, unsigned num_dw, boolean count_draw_in);
void si_need_cs_space(struct si_context *ctx);

/* si_compute.c */
void si_init_compute_functions(struct si_context *sctx);

+ 1
- 1
src/gallium/drivers/radeonsi/si_state.c View File

@@ -3039,7 +3039,7 @@ static void *si_create_blend_custom(struct si_context *sctx, unsigned mode)
static void si_need_gfx_cs_space(struct pipe_context *ctx, unsigned num_dw,
bool include_draw_vbo)
{
si_need_cs_space((struct si_context*)ctx, num_dw, include_draw_vbo);
si_need_cs_space((struct si_context*)ctx);
}

static void si_init_config(struct si_context *sctx);

+ 1
- 1
src/gallium/drivers/radeonsi/si_state_draw.c View File

@@ -818,7 +818,7 @@ void si_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info)
if (sctx->b.flags)
si_mark_atom_dirty(sctx, sctx->atoms.s.cache_flush);

si_need_cs_space(sctx, 0, TRUE);
si_need_cs_space(sctx);

/* Emit states. */
mask = sctx->dirty_atoms;

Loading…
Cancel
Save