winsys/radeon has its own definition.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
#include "util/u_double_list.h"
#include "util/u_inlines.h"
-#define RADEON_CTX_MAX_PM4 (64 * 1024 / 4)
-
#define R600_ERR(fmt, args...) \
fprintf(stderr, "EE %s:%d %s - "fmt, __FILE__, __LINE__, __func__, ##args)
ctx->cs = radeon->ws->cs_create(radeon->ws);
/* allocate cs variables */
- ctx->bo = calloc(RADEON_CTX_MAX_PM4, sizeof(void *));
+ ctx->bo = calloc(RADEON_MAX_CMDBUF_DWORDS, sizeof(void *));
if (ctx->bo == NULL) {
r = -ENOMEM;
goto out_err;
}
- ctx->pm4_ndwords = RADEON_CTX_MAX_PM4;
+ ctx->pm4_ndwords = RADEON_MAX_CMDBUF_DWORDS;
ctx->pm4 = ctx->cs->buf;
r600_init_cs(ctx);
/* update the max dword count to make sure we have enough space
* reserved for flushing the destination caches */
- ctx->pm4_ndwords = RADEON_CTX_MAX_PM4 - ctx->num_dest_buffers * 7 - 16;
+ ctx->pm4_ndwords = RADEON_MAX_CMDBUF_DWORDS - ctx->num_dest_buffers * 7 - 16;
if ((ctx->pm4_dirty_cdwords + ndwords + ctx->pm4_cdwords) > ctx->pm4_ndwords) {
/* need to flush */
ctx->cs = radeon->ws->cs_create(radeon->ws);
/* allocate cs variables */
- ctx->bo = calloc(RADEON_CTX_MAX_PM4, sizeof(void *));
+ ctx->bo = calloc(RADEON_MAX_CMDBUF_DWORDS, sizeof(void *));
if (ctx->bo == NULL) {
r = -ENOMEM;
goto out_err;
}
- ctx->pm4_ndwords = RADEON_CTX_MAX_PM4;
+ ctx->pm4_ndwords = RADEON_MAX_CMDBUF_DWORDS;
ctx->pm4 = ctx->cs->buf;
r600_init_cs(ctx);
/* update the max dword count to make sure we have enough space
* reserved for flushing the destination caches */
- ctx->pm4_ndwords = RADEON_CTX_MAX_PM4 - ctx->num_dest_buffers * 7 - 16;
+ ctx->pm4_ndwords = RADEON_MAX_CMDBUF_DWORDS - ctx->num_dest_buffers * 7 - 16;
if ((ctx->pm4_dirty_cdwords + ndwords + ctx->pm4_cdwords) > ctx->pm4_ndwords) {
/* need to flush */