fd5_emit_get_vp(struct fd5_emit *emit)
{
if (!emit->vp) {
- struct fd5_shader_stateobj *so = emit->prog->vp;
- emit->vp = ir3_shader_variant(so->shader, emit->key, emit->debug);
+ struct ir3_shader *shader = emit->prog->vp;
+ emit->vp = ir3_shader_variant(shader, emit->key, emit->debug);
}
return emit->vp;
}
static const struct ir3_shader_variant binning_fp = {};
emit->fp = &binning_fp;
} else {
- struct fd5_shader_stateobj *so = emit->prog->fp;
- emit->fp = ir3_shader_variant(so->shader, emit->key, emit->debug);
+ struct ir3_shader *shader = emit->prog->fp;
+ emit->fp = ir3_shader_variant(shader, emit->key, emit->debug);
}
}
return emit->fp;
#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 *
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 *
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