summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRob Clark <Rob Clark [email protected]>2013-04-20 17:31:47 -0400
committerRob Clark <Rob Clark [email protected]>2013-04-20 17:31:47 -0400
commitd8134792ae4a26160e90c6fc87312bf3fe9d4fbf (patch)
tree919347206268c3a41cdf26b241f41a37985f8562 /src
parent85974e5fee152c96239aa87040799a557cd789ab (diff)
freedreno: cleanup some cruft left over from fdre
The standalone shader assembler needed some meta-data to know about attributes/varyings/etc, to do the shader linkage. We don't need these parts with gallium/tgsi, so just get rid of it. Signed-off-by: Rob Clark <Rob Clark [email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/freedreno/ir.c67
-rw-r--r--src/gallium/drivers/freedreno/ir.h67
2 files changed, 1 insertions, 133 deletions
diff --git a/src/gallium/drivers/freedreno/ir.c b/src/gallium/drivers/freedreno/ir.c
index 4c605de9462..9aa931bc9da 100644
--- a/src/gallium/drivers/freedreno/ir.c
+++ b/src/gallium/drivers/freedreno/ir.c
@@ -189,73 +189,6 @@ fail:
}
-struct ir_attribute * ir_attribute_create(struct ir_shader *shader,
- int rstart, int num, const char *name)
-{
- struct ir_attribute *a = ir_alloc(shader, sizeof(struct ir_attribute));
- DEBUG_MSG("R%d-R%d: %s", rstart, rstart + num - 1, name);
- a->name = ir_strdup(shader, name);
- a->rstart = rstart;
- a->num = num;
- assert(shader->attributes_count < ARRAY_SIZE(shader->attributes));
- shader->attributes[shader->attributes_count++] = a;
- return a;
-}
-
-struct ir_const * ir_const_create(struct ir_shader *shader,
- int cstart, float v0, float v1, float v2, float v3)
-{
- struct ir_const *c = ir_alloc(shader, sizeof(struct ir_const));
- DEBUG_MSG("C%d: %f, %f, %f, %f", cstart, v0, v1, v2, v3);
- c->val[0] = v0;
- c->val[1] = v1;
- c->val[2] = v2;
- c->val[3] = v3;
- c->cstart = cstart;
- assert(shader->consts_count < ARRAY_SIZE(shader->consts));
- shader->consts[shader->consts_count++] = c;
- return c;
-}
-
-struct ir_sampler * ir_sampler_create(struct ir_shader *shader,
- int idx, const char *name)
-{
- struct ir_sampler *s = ir_alloc(shader, sizeof(struct ir_sampler));
- DEBUG_MSG("CONST(%d): %s", idx, name);
- s->name = ir_strdup(shader, name);
- s->idx = idx;
- assert(shader->samplers_count < ARRAY_SIZE(shader->samplers));
- shader->samplers[shader->samplers_count++] = s;
- return s;
-}
-
-struct ir_uniform * ir_uniform_create(struct ir_shader *shader,
- int cstart, int num, const char *name)
-{
- struct ir_uniform *u = ir_alloc(shader, sizeof(struct ir_uniform));
- DEBUG_MSG("C%d-C%d: %s", cstart, cstart + num - 1, name);
- u->name = ir_strdup(shader, name);
- u->cstart = cstart;
- u->num = num;
- assert(shader->uniforms_count < ARRAY_SIZE(shader->uniforms));
- shader->uniforms[shader->uniforms_count++] = u;
- return u;
-}
-
-struct ir_varying * ir_varying_create(struct ir_shader *shader,
- int rstart, int num, const char *name)
-{
- struct ir_varying *v = ir_alloc(shader, sizeof(struct ir_varying));
- DEBUG_MSG("R%d-R%d: %s", rstart, rstart + num - 1, name);
- v->name = ir_strdup(shader, name);
- v->rstart = rstart;
- v->num = num;
- assert(shader->varyings_count < ARRAY_SIZE(shader->varyings));
- shader->varyings[shader->varyings_count++] = v;
- return v;
-}
-
-
struct ir_cf * ir_cf_create(struct ir_shader *shader, instr_cf_opc_t cf_type)
{
struct ir_cf *cf = ir_alloc(shader, sizeof(struct ir_cf));
diff --git a/src/gallium/drivers/freedreno/ir.h b/src/gallium/drivers/freedreno/ir.h
index 9e4722c9c96..a6d12193b29 100644
--- a/src/gallium/drivers/freedreno/ir.h
+++ b/src/gallium/drivers/freedreno/ir.h
@@ -29,12 +29,10 @@
#include "instr-a2xx.h"
-/* low level intermediate representation of an adreno shader program */
+/* low level intermediate representation of an adreno a2xx shader program */
struct ir_shader;
-struct ir_shader * fd_asm_parse(const char *src);
-
struct ir_shader_info {
uint16_t sizedwords;
int8_t max_reg; /* highest GPR # used by shader */
@@ -111,41 +109,6 @@ struct ir_cf {
};
};
-/* somewhat arbitrary limits.. */
-#define MAX_ATTRIBUTES 32
-#define MAX_CONSTS 32
-#define MAX_SAMPLERS 32
-#define MAX_UNIFORMS 32
-#define MAX_VARYINGS 32
-
-struct ir_attribute {
- const char *name;
- int rstart; /* first register */
- int num; /* number of registers */
-};
-
-struct ir_const {
- float val[4];
- int cstart; /* first const register */
-};
-
-struct ir_sampler {
- const char *name;
- int idx;
-};
-
-struct ir_uniform {
- const char *name;
- int cstart; /* first const register */
- int num; /* number of const registers */
-};
-
-struct ir_varying {
- const char *name;
- int rstart; /* first register */
- int num; /* number of registers */
-};
-
struct ir_shader {
unsigned cfs_count;
struct ir_cf *cfs[0x56];
@@ -153,23 +116,6 @@ struct ir_shader {
unsigned heap_idx;
enum ir_pred pred; /* pred inherited by newly created instrs */
-
- /* @ headers: */
- uint32_t attributes_count;
- struct ir_attribute *attributes[MAX_ATTRIBUTES];
-
- uint32_t consts_count;
- struct ir_const *consts[MAX_CONSTS];
-
- uint32_t samplers_count;
- struct ir_sampler *samplers[MAX_SAMPLERS];
-
- uint32_t uniforms_count;
- struct ir_uniform *uniforms[MAX_UNIFORMS];
-
- uint32_t varyings_count;
- struct ir_varying *varyings[MAX_VARYINGS];
-
};
struct ir_shader * ir_shader_create(void);
@@ -177,17 +123,6 @@ void ir_shader_destroy(struct ir_shader *shader);
void * ir_shader_assemble(struct ir_shader *shader,
struct ir_shader_info *info);
-struct ir_attribute * ir_attribute_create(struct ir_shader *shader,
- int rstart, int num, const char *name);
-struct ir_const * ir_const_create(struct ir_shader *shader,
- int cstart, float v0, float v1, float v2, float v3);
-struct ir_sampler * ir_sampler_create(struct ir_shader *shader,
- int idx, const char *name);
-struct ir_uniform * ir_uniform_create(struct ir_shader *shader,
- int cstart, int num, const char *name);
-struct ir_varying * ir_varying_create(struct ir_shader *shader,
- int rstart, int num, const char *name);
-
struct ir_cf * ir_cf_create(struct ir_shader *shader, instr_cf_opc_t cf_type);
struct ir_instruction * ir_instr_create(struct ir_cf *cf, int instr_type);