r600g: drop use_mem_constant.
authorDave Airlie <airlied@redhat.com>
Tue, 5 Oct 2010 06:00:23 +0000 (16:00 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 5 Oct 2010 06:00:23 +0000 (16:00 +1000)
since we plan on using dx10 constant buffers everywhere.

src/gallium/drivers/r600/evergreen_state.c
src/gallium/drivers/r600/r600_asm.c
src/gallium/drivers/r600/r600_asm.h
src/gallium/drivers/r600/r600_shader.c
src/gallium/drivers/r600/r600_shader.h
src/gallium/drivers/r600/r600_state.c
src/gallium/winsys/r600/drm/evergreen_hw_context.c
src/gallium/winsys/r600/drm/r600_hw_context.c
src/gallium/winsys/r600/drm/r600_priv.h

index 06cdd5f..147d4f3 100644 (file)
@@ -971,7 +971,6 @@ static void *evergreen_create_shader_state(struct pipe_context *ctx,
        struct r600_pipe_shader *shader =  CALLOC_STRUCT(r600_pipe_shader);
        int r;
 
-       shader->shader.use_mem_constant = TRUE;
        r =  r600_pipe_shader_create(ctx, shader, state->tokens);
        if (r) {
                return NULL;
index f07af81..d13da0e 100644 (file)
@@ -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->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 */
        if (alu->last) {
index dba60af..bebc7c1 100644 (file)
@@ -165,7 +165,6 @@ struct r600_cf_callstack {
 struct r600_bc {
        enum radeon_family              family;
        int                             chiprev; /* 0 - r600, 1 - r700, 2 - evergreen */
-       unsigned                        use_mem_constant; 
        struct list_head                cf;
        struct r600_bc_cf               *cf_last;
        unsigned                        ndw;
index d7edf6a..016e75b 100644 (file)
@@ -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);
        if (r)
                return r;
-       ctx.bc->use_mem_constant = shader->use_mem_constant;
        ctx.tokens = tokens;
        tgsi_scan_shader(tokens, &ctx.info);
        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.file_offset[TGSI_FILE_TEMPORARY] = ctx.file_offset[TGSI_FILE_OUTPUT] +
                                                ctx.info.file_count[TGSI_FILE_OUTPUT];
-       if (ctx.shader->use_mem_constant)
-               ctx.file_offset[TGSI_FILE_CONSTANT] = 128;
-       else
-               ctx.file_offset[TGSI_FILE_CONSTANT] = 256;
+
+       ctx.file_offset[TGSI_FILE_CONSTANT] = 128;
 
        ctx.file_offset[TGSI_FILE_IMMEDIATE] = 253;
        ctx.temp_reg = ctx.file_offset[TGSI_FILE_TEMPORARY] +
index 06dd650..6e2620f 100644 (file)
@@ -43,7 +43,6 @@ struct r600_shader {
        struct r600_shader_io   output[32];
        enum radeon_family      family;
        boolean                 uses_kill;
-       boolean                 use_mem_constant;
 };
 
 int r600_shader_from_tgsi(const struct tgsi_token *tokens, struct r600_shader *shader);
index f7c77cd..b55c345 100644 (file)
@@ -1185,7 +1185,6 @@ static void *r600_create_shader_state(struct pipe_context *ctx,
        struct r600_pipe_shader *shader =  CALLOC_STRUCT(r600_pipe_shader);
        int r;
 
-       shader->shader.use_mem_constant = TRUE;
        r =  r600_pipe_shader_create(ctx, shader, state->tokens);
        if (r) {
                return NULL;
index ff2c48e..e51725a 100644 (file)
@@ -511,7 +511,6 @@ int evergreen_context_init(struct r600_context *ctx, struct radeon *radeon)
        int r;
 
        memset(ctx, 0, sizeof(struct r600_context));
-       radeon->use_mem_constant = TRUE;
        ctx->radeon = radeon;
        LIST_INITHEAD(&ctx->query_list);
 
index 822b65f..bee0446 100644 (file)
@@ -587,7 +587,6 @@ int r600_context_init(struct r600_context *ctx, struct radeon *radeon)
        int r;
 
        memset(ctx, 0, sizeof(struct r600_context));
-       radeon->use_mem_constant = TRUE;
        ctx->radeon = radeon;
        LIST_INITHEAD(&ctx->query_list);
 
index 07e7342..ee48754 100644 (file)
@@ -40,7 +40,6 @@ struct radeon {
        unsigned                        device;
        unsigned                        family;
        enum chip_class                 chip_class;
-       boolean                         use_mem_constant; /* true for evergreen */
        struct pb_manager *kman; /* kernel bo manager */
        struct pb_manager *cman; /* cached bo manager */
 };