diff options
author | Rob Clark <[email protected]> | 2018-11-09 10:47:14 -0500 |
---|---|---|
committer | Rob Clark <[email protected]> | 2018-11-27 15:44:02 -0500 |
commit | c635703c500928c069023cf1b7371f1ac3124651 (patch) | |
tree | 30c262e3733e25521ae1472344dc9c3b534c4aa0 /src/gallium/drivers/freedreno/a2xx | |
parent | 388aac32ed45cd3905e63a63e3959130af37da21 (diff) |
freedreno: shader_t -> gl_shader_stage
Just massive search/replace for the most part.
Step towards removing ir3 dependency on disasm.h which is shared by
a2xx. One step closer to being able to move ir3 out of gallium.
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/a2xx')
-rw-r--r-- | src/gallium/drivers/freedreno/a2xx/disasm-a2xx.c | 10 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a2xx/fd2_program.c | 16 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a2xx/fd2_program.h | 2 |
3 files changed, 14 insertions, 14 deletions
diff --git a/src/gallium/drivers/freedreno/a2xx/disasm-a2xx.c b/src/gallium/drivers/freedreno/a2xx/disasm-a2xx.c index c3804509250..6f5028c3fb6 100644 --- a/src/gallium/drivers/freedreno/a2xx/disasm-a2xx.c +++ b/src/gallium/drivers/freedreno/a2xx/disasm-a2xx.c @@ -96,17 +96,17 @@ static void print_dstreg(uint32_t num, uint32_t mask, uint32_t dst_exp) } } -static void print_export_comment(uint32_t num, enum shader_t type) +static void print_export_comment(uint32_t num, gl_shader_stage type) { const char *name = NULL; switch (type) { - case SHADER_VERTEX: + case MESA_SHADER_VERTEX: switch (num) { case 62: name = "gl_Position"; break; case 63: name = "gl_PointSize"; break; } break; - case SHADER_FRAGMENT: + case MESA_SHADER_FRAGMENT: switch (num) { case 0: name = "gl_FragColor"; break; } @@ -212,7 +212,7 @@ struct { }; static int disasm_alu(uint32_t *dwords, uint32_t alu_off, - int level, int sync, enum shader_t type) + int level, int sync, gl_shader_stage type) { instr_alu_t *alu = (instr_alu_t *)dwords; @@ -592,7 +592,7 @@ static void print_cf(instr_cf_t *cf, int level) * 2) ALU and FETCH instructions */ -int disasm_a2xx(uint32_t *dwords, int sizedwords, int level, enum shader_t type) +int disasm_a2xx(uint32_t *dwords, int sizedwords, int level, gl_shader_stage type) { instr_cf_t *cfs = (instr_cf_t *)dwords; int idx, max_idx; diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_program.c b/src/gallium/drivers/freedreno/a2xx/fd2_program.c index 9a35e8f9041..56b3ab2aaeb 100644 --- a/src/gallium/drivers/freedreno/a2xx/fd2_program.c +++ b/src/gallium/drivers/freedreno/a2xx/fd2_program.c @@ -40,7 +40,7 @@ #include "fd2_util.h" static struct fd2_shader_stateobj * -create_shader(enum shader_t type) +create_shader(gl_shader_stage type) { struct fd2_shader_stateobj *so = CALLOC_STRUCT(fd2_shader_stateobj); if (!so) @@ -119,7 +119,7 @@ emit(struct fd_ringbuffer *ring, struct fd2_shader_stateobj *so) assemble(so); OUT_PKT3(ring, CP_IM_LOAD_IMMEDIATE, 2 + so->info.sizedwords); - OUT_RING(ring, (so->type == SHADER_VERTEX) ? 0 : 1); + OUT_RING(ring, (so->type == MESA_SHADER_VERTEX) ? 0 : 1); OUT_RING(ring, so->info.sizedwords); for (i = 0; i < so->info.sizedwords; i++) OUT_RING(ring, so->bin[i]); @@ -129,7 +129,7 @@ static void * fd2_fp_state_create(struct pipe_context *pctx, const struct pipe_shader_state *cso) { - struct fd2_shader_stateobj *so = create_shader(SHADER_FRAGMENT); + struct fd2_shader_stateobj *so = create_shader(MESA_SHADER_FRAGMENT); if (!so) return NULL; so->tokens = tgsi_dup_tokens(cso->tokens); @@ -147,7 +147,7 @@ static void * fd2_vp_state_create(struct pipe_context *pctx, const struct pipe_shader_state *cso) { - struct fd2_shader_stateobj *so = create_shader(SHADER_VERTEX); + struct fd2_shader_stateobj *so = create_shader(MESA_SHADER_VERTEX); if (!so) return NULL; so->tokens = tgsi_dup_tokens(cso->tokens); @@ -304,7 +304,7 @@ fd2_program_emit(struct fd_ringbuffer *ring, static struct fd2_shader_stateobj * create_blit_fp(void) { - struct fd2_shader_stateobj *so = create_shader(SHADER_FRAGMENT); + struct fd2_shader_stateobj *so = create_shader(MESA_SHADER_FRAGMENT); struct ir2_instruction *instr; if (!so) @@ -340,7 +340,7 @@ create_blit_fp(void) static struct fd2_shader_stateobj * create_blit_vp(void) { - struct fd2_shader_stateobj *so = create_shader(SHADER_VERTEX); + struct fd2_shader_stateobj *so = create_shader(MESA_SHADER_VERTEX); struct ir2_instruction *instr; if (!so) @@ -379,7 +379,7 @@ create_blit_vp(void) static struct fd2_shader_stateobj * create_solid_fp(void) { - struct fd2_shader_stateobj *so = create_shader(SHADER_FRAGMENT); + struct fd2_shader_stateobj *so = create_shader(MESA_SHADER_FRAGMENT); struct ir2_instruction *instr; if (!so) @@ -408,7 +408,7 @@ create_solid_fp(void) static struct fd2_shader_stateobj * create_solid_vp(void) { - struct fd2_shader_stateobj *so = create_shader(SHADER_VERTEX); + struct fd2_shader_stateobj *so = create_shader(MESA_SHADER_VERTEX); struct ir2_instruction *instr; if (!so) diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_program.h b/src/gallium/drivers/freedreno/a2xx/fd2_program.h index d2df829e075..01e9983555e 100644 --- a/src/gallium/drivers/freedreno/a2xx/fd2_program.h +++ b/src/gallium/drivers/freedreno/a2xx/fd2_program.h @@ -35,7 +35,7 @@ #include "disasm.h" struct fd2_shader_stateobj { - enum shader_t type; + gl_shader_stage type; uint32_t *bin; |