aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/a5xx/fd5_program.c
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2018-05-11 08:19:22 -0400
committerRob Clark <[email protected]>2018-05-15 08:46:46 -0400
commitf897b67dc1299a4607478fc3792c66f78b6ca8b6 (patch)
treed1a6f05513779d8d655b608f1e61eb716beebbe5 /src/gallium/drivers/freedreno/a5xx/fd5_program.c
parentd48a2404a227193b0e17b94ce10481f36d99430c (diff)
freedreno/a5xx: remove fd5_shader_stateobj
Extra level of indirection that serves no purpose. Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/a5xx/fd5_program.c')
-rw-r--r--src/gallium/drivers/freedreno/a5xx/fd5_program.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_program.c b/src/gallium/drivers/freedreno/a5xx/fd5_program.c
index 81fe7d4b582..c93f257edfa 100644
--- a/src/gallium/drivers/freedreno/a5xx/fd5_program.c
+++ b/src/gallium/drivers/freedreno/a5xx/fd5_program.c
@@ -38,22 +38,13 @@
#include "fd5_texture.h"
#include "fd5_format.h"
-static void
-delete_shader_stateobj(struct fd5_shader_stateobj *so)
-{
- ir3_shader_destroy(so->shader);
- free(so);
-}
-
-static struct fd5_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 fd5_shader_stateobj *so = CALLOC_STRUCT(fd5_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 *
@@ -66,8 +57,8 @@ fd5_fp_state_create(struct pipe_context *pctx,
static void
fd5_fp_state_delete(struct pipe_context *pctx, void *hwcso)
{
- struct fd5_shader_stateobj *so = hwcso;
- delete_shader_stateobj(so);
+ struct ir3_shader *so = hwcso;
+ ir3_shader_destroy(so);
}
static void *
@@ -80,8 +71,8 @@ fd5_vp_state_create(struct pipe_context *pctx,
static void
fd5_vp_state_delete(struct pipe_context *pctx, void *hwcso)
{
- struct fd5_shader_stateobj *so = hwcso;
- delete_shader_stateobj(so);
+ struct ir3_shader *so = hwcso;
+ ir3_shader_destroy(so);
}
void