r600g: drop use_mem_constant.
since we plan on using dx10 constant buffers everywhere.
This commit is contained in:
@@ -971,7 +971,6 @@ static void *evergreen_create_shader_state(struct pipe_context *ctx,
|
|||||||
struct r600_pipe_shader *shader = CALLOC_STRUCT(r600_pipe_shader);
|
struct r600_pipe_shader *shader = CALLOC_STRUCT(r600_pipe_shader);
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
shader->shader.use_mem_constant = TRUE;
|
|
||||||
r = r600_pipe_shader_create(ctx, shader, state->tokens);
|
r = r600_pipe_shader_create(ctx, shader, state->tokens);
|
||||||
if (r) {
|
if (r) {
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@@ -465,8 +465,7 @@ int r600_bc_add_alu_type(struct r600_bc *bc, const struct r600_bc_alu *alu, int
|
|||||||
bc->cf_last->ndw += 2;
|
bc->cf_last->ndw += 2;
|
||||||
bc->ndw += 2;
|
bc->ndw += 2;
|
||||||
|
|
||||||
if (bc->use_mem_constant)
|
bc->cf_last->kcache0_mode = 2;
|
||||||
bc->cf_last->kcache0_mode = 2;
|
|
||||||
|
|
||||||
/* process cur ALU instructions for bank swizzle */
|
/* process cur ALU instructions for bank swizzle */
|
||||||
if (alu->last) {
|
if (alu->last) {
|
||||||
|
@@ -165,7 +165,6 @@ struct r600_cf_callstack {
|
|||||||
struct r600_bc {
|
struct r600_bc {
|
||||||
enum radeon_family family;
|
enum radeon_family family;
|
||||||
int chiprev; /* 0 - r600, 1 - r700, 2 - evergreen */
|
int chiprev; /* 0 - r600, 1 - r700, 2 - evergreen */
|
||||||
unsigned use_mem_constant;
|
|
||||||
struct list_head cf;
|
struct list_head cf;
|
||||||
struct r600_bc_cf *cf_last;
|
struct r600_bc_cf *cf_last;
|
||||||
unsigned ndw;
|
unsigned ndw;
|
||||||
|
@@ -498,7 +498,6 @@ int r600_shader_from_tgsi(const struct tgsi_token *tokens, struct r600_shader *s
|
|||||||
r = r600_bc_init(ctx.bc, shader->family);
|
r = r600_bc_init(ctx.bc, shader->family);
|
||||||
if (r)
|
if (r)
|
||||||
return r;
|
return r;
|
||||||
ctx.bc->use_mem_constant = shader->use_mem_constant;
|
|
||||||
ctx.tokens = tokens;
|
ctx.tokens = tokens;
|
||||||
tgsi_scan_shader(tokens, &ctx.info);
|
tgsi_scan_shader(tokens, &ctx.info);
|
||||||
tgsi_parse_init(&ctx.parse, tokens);
|
tgsi_parse_init(&ctx.parse, tokens);
|
||||||
@@ -534,10 +533,8 @@ int r600_shader_from_tgsi(const struct tgsi_token *tokens, struct r600_shader *s
|
|||||||
ctx.info.file_count[TGSI_FILE_INPUT];
|
ctx.info.file_count[TGSI_FILE_INPUT];
|
||||||
ctx.file_offset[TGSI_FILE_TEMPORARY] = ctx.file_offset[TGSI_FILE_OUTPUT] +
|
ctx.file_offset[TGSI_FILE_TEMPORARY] = ctx.file_offset[TGSI_FILE_OUTPUT] +
|
||||||
ctx.info.file_count[TGSI_FILE_OUTPUT];
|
ctx.info.file_count[TGSI_FILE_OUTPUT];
|
||||||
if (ctx.shader->use_mem_constant)
|
|
||||||
ctx.file_offset[TGSI_FILE_CONSTANT] = 128;
|
ctx.file_offset[TGSI_FILE_CONSTANT] = 128;
|
||||||
else
|
|
||||||
ctx.file_offset[TGSI_FILE_CONSTANT] = 256;
|
|
||||||
|
|
||||||
ctx.file_offset[TGSI_FILE_IMMEDIATE] = 253;
|
ctx.file_offset[TGSI_FILE_IMMEDIATE] = 253;
|
||||||
ctx.temp_reg = ctx.file_offset[TGSI_FILE_TEMPORARY] +
|
ctx.temp_reg = ctx.file_offset[TGSI_FILE_TEMPORARY] +
|
||||||
|
@@ -43,7 +43,6 @@ struct r600_shader {
|
|||||||
struct r600_shader_io output[32];
|
struct r600_shader_io output[32];
|
||||||
enum radeon_family family;
|
enum radeon_family family;
|
||||||
boolean uses_kill;
|
boolean uses_kill;
|
||||||
boolean use_mem_constant;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
int r600_shader_from_tgsi(const struct tgsi_token *tokens, struct r600_shader *shader);
|
int r600_shader_from_tgsi(const struct tgsi_token *tokens, struct r600_shader *shader);
|
||||||
|
@@ -1185,7 +1185,6 @@ static void *r600_create_shader_state(struct pipe_context *ctx,
|
|||||||
struct r600_pipe_shader *shader = CALLOC_STRUCT(r600_pipe_shader);
|
struct r600_pipe_shader *shader = CALLOC_STRUCT(r600_pipe_shader);
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
shader->shader.use_mem_constant = TRUE;
|
|
||||||
r = r600_pipe_shader_create(ctx, shader, state->tokens);
|
r = r600_pipe_shader_create(ctx, shader, state->tokens);
|
||||||
if (r) {
|
if (r) {
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@@ -511,7 +511,6 @@ int evergreen_context_init(struct r600_context *ctx, struct radeon *radeon)
|
|||||||
int r;
|
int r;
|
||||||
|
|
||||||
memset(ctx, 0, sizeof(struct r600_context));
|
memset(ctx, 0, sizeof(struct r600_context));
|
||||||
radeon->use_mem_constant = TRUE;
|
|
||||||
ctx->radeon = radeon;
|
ctx->radeon = radeon;
|
||||||
LIST_INITHEAD(&ctx->query_list);
|
LIST_INITHEAD(&ctx->query_list);
|
||||||
|
|
||||||
|
@@ -587,7 +587,6 @@ int r600_context_init(struct r600_context *ctx, struct radeon *radeon)
|
|||||||
int r;
|
int r;
|
||||||
|
|
||||||
memset(ctx, 0, sizeof(struct r600_context));
|
memset(ctx, 0, sizeof(struct r600_context));
|
||||||
radeon->use_mem_constant = TRUE;
|
|
||||||
ctx->radeon = radeon;
|
ctx->radeon = radeon;
|
||||||
LIST_INITHEAD(&ctx->query_list);
|
LIST_INITHEAD(&ctx->query_list);
|
||||||
|
|
||||||
|
@@ -40,7 +40,6 @@ struct radeon {
|
|||||||
unsigned device;
|
unsigned device;
|
||||||
unsigned family;
|
unsigned family;
|
||||||
enum chip_class chip_class;
|
enum chip_class chip_class;
|
||||||
boolean use_mem_constant; /* true for evergreen */
|
|
||||||
struct pb_manager *kman; /* kernel bo manager */
|
struct pb_manager *kman; /* kernel bo manager */
|
||||||
struct pb_manager *cman; /* cached bo manager */
|
struct pb_manager *cman; /* cached bo manager */
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user