aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/a3xx/fd3_program.c
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2018-05-11 08:11:01 -0400
committerRob Clark <[email protected]>2018-05-15 08:46:46 -0400
commit2c40f2ba32ec2b5476f389b65f48fca7fa331683 (patch)
treebb1bf87ea75b18e984a81adb0febfccf77329601 /src/gallium/drivers/freedreno/a3xx/fd3_program.c
parent273f7d84049ad3c204571206b060d403e1ff2f94 (diff)
freedreno/a3xx: remove fd3_shader_stateobj
Extra level of indirection that serves no purpose. Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/a3xx/fd3_program.c')
-rw-r--r--src/gallium/drivers/freedreno/a3xx/fd3_program.c25
1 files changed, 8 insertions, 17 deletions
diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_program.c b/src/gallium/drivers/freedreno/a3xx/fd3_program.c
index f43d5c47ce0..64eeb106e53 100644
--- a/src/gallium/drivers/freedreno/a3xx/fd3_program.c
+++ b/src/gallium/drivers/freedreno/a3xx/fd3_program.c
@@ -40,22 +40,13 @@
#include "fd3_texture.h"
#include "fd3_format.h"
-static void
-delete_shader_stateobj(struct fd3_shader_stateobj *so)
-{
- ir3_shader_destroy(so->shader);
- free(so);
-}
-
-static struct fd3_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 fd3_shader_stateobj *so = CALLOC_STRUCT(fd3_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 *
@@ -68,8 +59,8 @@ fd3_fp_state_create(struct pipe_context *pctx,
static void
fd3_fp_state_delete(struct pipe_context *pctx, void *hwcso)
{
- struct fd3_shader_stateobj *so = hwcso;
- delete_shader_stateobj(so);
+ struct ir3_shader *so = hwcso;
+ ir3_shader_destroy(so);
}
static void *
@@ -82,15 +73,15 @@ fd3_vp_state_create(struct pipe_context *pctx,
static void
fd3_vp_state_delete(struct pipe_context *pctx, void *hwcso)
{
- struct fd3_shader_stateobj *so = hwcso;
- delete_shader_stateobj(so);
+ struct ir3_shader *so = hwcso;
+ ir3_shader_destroy(so);
}
bool
-fd3_needs_manual_clipping(const struct fd3_shader_stateobj *so,
+fd3_needs_manual_clipping(const struct ir3_shader *shader,
const struct pipe_rasterizer_state *rast)
{
- uint64_t outputs = ir3_shader_outputs(so->shader);
+ uint64_t outputs = ir3_shader_outputs(shader);
return (!rast->depth_clip ||
util_bitcount(rast->clip_plane_enable) > 6 ||