freedreno/a6xx: remove fd6_shader_stateobj
[mesa.git] / src / gallium / drivers / freedreno / a6xx / fd6_program.c
index b2354de7e30f960a539b04d33ed00692c079c914..cbb561a3b8dd1dceb1db86917979bddb2c125f39 100644 (file)
 #include "fd6_texture.h"
 #include "fd6_format.h"
 
-static void
-delete_shader_stateobj(struct fd6_shader_stateobj *so)
-{
-       ir3_shader_destroy(so->shader);
-       free(so);
-}
-
-static struct fd6_shader_stateobj *
+static struct ir3_shader *
 create_shader_stateobj(struct pipe_context *pctx, const struct pipe_shader_state *cso,
                enum shader_t type)
 {
        struct fd_context *ctx = fd_context(pctx);
        struct ir3_compiler *compiler = ctx->screen->compiler;
-       struct fd6_shader_stateobj *so = CALLOC_STRUCT(fd6_shader_stateobj);
-       so->shader = ir3_shader_create(compiler, cso, type, &ctx->debug);
-       return so;
+       return ir3_shader_create(compiler, cso, type, &ctx->debug);
 }
 
 static void *
@@ -67,8 +58,8 @@ fd6_fp_state_create(struct pipe_context *pctx,
 static void
 fd6_fp_state_delete(struct pipe_context *pctx, void *hwcso)
 {
-       struct fd6_shader_stateobj *so = hwcso;
-       delete_shader_stateobj(so);
+       struct ir3_shader *so = hwcso;
+       ir3_shader_destroy(so);
 }
 
 static void *
@@ -81,8 +72,8 @@ fd6_vp_state_create(struct pipe_context *pctx,
 static void
 fd6_vp_state_delete(struct pipe_context *pctx, void *hwcso)
 {
-       struct fd6_shader_stateobj *so = hwcso;
-       delete_shader_stateobj(so);
+       struct ir3_shader *so = hwcso;
+       ir3_shader_destroy(so);
 }
 
 void
@@ -310,7 +301,7 @@ fd6_program_emit(struct fd_context *ctx, struct fd_ringbuffer *ring,
 
        setup_stages(emit, s);
 
-       fssz = (s[FS].i->max_reg >= 24) ? TWO_QUADS : FOUR_QUADS;
+       fssz = FOUR_QUADS;
 
        pos_regid = ir3_find_output_regid(s[VS].v, VARYING_SLOT_POS);
        psize_regid = ir3_find_output_regid(s[VS].v, VARYING_SLOT_PSIZ);