freedreno/a6xx: remove fd6_shader_stateobj
Earlier gen's already got this cleanup, but a6xx was still off on a branch then. Signed-off-by: Rob Clark <robdclark@gmail.com>
This commit is contained in:
parent
1bb1c03d61
commit
d5bd3ce89c
|
@ -76,8 +76,8 @@ static inline const struct ir3_shader_variant *
|
||||||
fd6_emit_get_vp(struct fd6_emit *emit)
|
fd6_emit_get_vp(struct fd6_emit *emit)
|
||||||
{
|
{
|
||||||
if (!emit->vp) {
|
if (!emit->vp) {
|
||||||
struct fd6_shader_stateobj *so = emit->prog->vp;
|
struct ir3_shader *shader = emit->prog->vp;
|
||||||
emit->vp = ir3_shader_variant(so->shader, emit->key, emit->debug);
|
emit->vp = ir3_shader_variant(shader, emit->key, emit->debug);
|
||||||
}
|
}
|
||||||
return emit->vp;
|
return emit->vp;
|
||||||
}
|
}
|
||||||
|
@ -91,8 +91,8 @@ fd6_emit_get_fp(struct fd6_emit *emit)
|
||||||
static const struct ir3_shader_variant binning_fp = {};
|
static const struct ir3_shader_variant binning_fp = {};
|
||||||
emit->fp = &binning_fp;
|
emit->fp = &binning_fp;
|
||||||
} else {
|
} else {
|
||||||
struct fd6_shader_stateobj *so = emit->prog->fp;
|
struct ir3_shader *shader = emit->prog->fp;
|
||||||
emit->fp = ir3_shader_variant(so->shader, emit->key, emit->debug);
|
emit->fp = ir3_shader_variant(shader, emit->key,emit->debug);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return emit->fp;
|
return emit->fp;
|
||||||
|
|
|
@ -39,22 +39,13 @@
|
||||||
#include "fd6_texture.h"
|
#include "fd6_texture.h"
|
||||||
#include "fd6_format.h"
|
#include "fd6_format.h"
|
||||||
|
|
||||||
static void
|
static struct ir3_shader *
|
||||||
delete_shader_stateobj(struct fd6_shader_stateobj *so)
|
|
||||||
{
|
|
||||||
ir3_shader_destroy(so->shader);
|
|
||||||
free(so);
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct fd6_shader_stateobj *
|
|
||||||
create_shader_stateobj(struct pipe_context *pctx, const struct pipe_shader_state *cso,
|
create_shader_stateobj(struct pipe_context *pctx, const struct pipe_shader_state *cso,
|
||||||
enum shader_t type)
|
enum shader_t type)
|
||||||
{
|
{
|
||||||
struct fd_context *ctx = fd_context(pctx);
|
struct fd_context *ctx = fd_context(pctx);
|
||||||
struct ir3_compiler *compiler = ctx->screen->compiler;
|
struct ir3_compiler *compiler = ctx->screen->compiler;
|
||||||
struct fd6_shader_stateobj *so = CALLOC_STRUCT(fd6_shader_stateobj);
|
return ir3_shader_create(compiler, cso, type, &ctx->debug);
|
||||||
so->shader = ir3_shader_create(compiler, cso, type, &ctx->debug);
|
|
||||||
return so;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *
|
static void *
|
||||||
|
@ -67,8 +58,8 @@ fd6_fp_state_create(struct pipe_context *pctx,
|
||||||
static void
|
static void
|
||||||
fd6_fp_state_delete(struct pipe_context *pctx, void *hwcso)
|
fd6_fp_state_delete(struct pipe_context *pctx, void *hwcso)
|
||||||
{
|
{
|
||||||
struct fd6_shader_stateobj *so = hwcso;
|
struct ir3_shader *so = hwcso;
|
||||||
delete_shader_stateobj(so);
|
ir3_shader_destroy(so);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *
|
static void *
|
||||||
|
@ -81,8 +72,8 @@ fd6_vp_state_create(struct pipe_context *pctx,
|
||||||
static void
|
static void
|
||||||
fd6_vp_state_delete(struct pipe_context *pctx, void *hwcso)
|
fd6_vp_state_delete(struct pipe_context *pctx, void *hwcso)
|
||||||
{
|
{
|
||||||
struct fd6_shader_stateobj *so = hwcso;
|
struct ir3_shader *so = hwcso;
|
||||||
delete_shader_stateobj(so);
|
ir3_shader_destroy(so);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -32,10 +32,6 @@
|
||||||
#include "freedreno_context.h"
|
#include "freedreno_context.h"
|
||||||
#include "ir3_shader.h"
|
#include "ir3_shader.h"
|
||||||
|
|
||||||
struct fd6_shader_stateobj {
|
|
||||||
struct ir3_shader *shader;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct fd6_emit;
|
struct fd6_emit;
|
||||||
|
|
||||||
void fd6_emit_shader(struct fd_ringbuffer *ring, const struct ir3_shader_variant *so);
|
void fd6_emit_shader(struct fd_ringbuffer *ring, const struct ir3_shader_variant *so);
|
||||||
|
|
Loading…
Reference in New Issue