uint32_t count;
};
-struct vc4_shader_state {
- struct pipe_shader_state base;
-};
-
struct vc4_compiled_shader {
struct vc4_bo *bo;
};
struct vc4_program_stateobj {
- struct vc4_shader_state *bind_vs, *bind_fs;
+ struct pipe_shader_state *bind_vs, *bind_fs;
struct vc4_compiled_shader *vs, *fs;
uint32_t dirty;
uint8_t num_exports;
struct qreg *consts;
uint32_t num_consts;
- struct vc4_shader_state *shader_state;
+ struct pipe_shader_state *shader_state;
struct vc4_fs_key *fs_key;
struct vc4_vs_key *vs_key;
};
struct vc4_key {
- struct vc4_shader_state *shader_state;
+ struct pipe_shader_state *shader_state;
};
struct vc4_fs_key {
trans->shader_state = key->shader_state;
trans->c = c;
- ret = tgsi_parse_init(&trans->parser, trans->shader_state->base.tokens);
+ ret = tgsi_parse_init(&trans->parser, trans->shader_state->tokens);
assert(ret == TGSI_PARSE_OK);
if (vc4_debug & VC4_DEBUG_TGSI) {
fprintf(stderr, "TGSI:\n");
- tgsi_dump(trans->shader_state->base.tokens, 0);
+ tgsi_dump(trans->shader_state->tokens, 0);
}
switch (stage) {
vc4_shader_state_create(struct pipe_context *pctx,
const struct pipe_shader_state *cso)
{
- struct vc4_shader_state *so = CALLOC_STRUCT(vc4_shader_state);
+ struct pipe_shader_state *so = CALLOC_STRUCT(pipe_shader_state);
if (!so)
return NULL;
- so->base.tokens = tgsi_dup_tokens(cso->tokens);
+ so->tokens = tgsi_dup_tokens(cso->tokens);
return so;
}
struct delete_state {
struct vc4_context *vc4;
- struct vc4_shader_state *shader_state;
+ struct pipe_shader_state *shader_state;
};
static enum pipe_error
vc4_shader_state_delete(struct pipe_context *pctx, void *hwcso)
{
struct vc4_context *vc4 = vc4_context(pctx);
- struct vc4_shader_state *so = hwcso;
+ struct pipe_shader_state *so = hwcso;
struct delete_state del;
del.vc4 = vc4;
util_hash_table_foreach(vc4->fs_cache, fs_delete_from_cache, &del);
util_hash_table_foreach(vc4->vs_cache, vs_delete_from_cache, &del);
- free((void *)so->base.tokens);
+ free((void *)so->tokens);
free(so);
}