summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/ir3
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2016-03-01 17:51:36 -0500
committerRob Clark <[email protected]>2016-03-01 19:21:45 -0500
commitc4ae047cabd8f7ef8ff90add285804635d8e0c50 (patch)
treed39c92f39a242fb59b2d60f3f2073b6653b3a6d9 /src/gallium/drivers/freedreno/ir3
parentc3f2f8cbe47a51087dcc82826bd939786c812366 (diff)
freedreno/ir3: enable shareable shaders
Now that we are no longer using the pctx reference in the shader, drop it and turn on shareable shaders. Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/ir3')
-rw-r--r--src/gallium/drivers/freedreno/ir3/ir3_shader.c5
-rw-r--r--src/gallium/drivers/freedreno/ir3/ir3_shader.h3
2 files changed, 3 insertions, 5 deletions
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_shader.c b/src/gallium/drivers/freedreno/ir3/ir3_shader.c
index d79e05b9fe5..4d0fcca6b92 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3_shader.c
+++ b/src/gallium/drivers/freedreno/ir3/ir3_shader.c
@@ -266,14 +266,13 @@ ir3_shader_destroy(struct ir3_shader *shader)
}
struct ir3_shader *
-ir3_shader_create(struct pipe_context *pctx,
+ir3_shader_create(struct ir3_compiler *compiler,
const struct pipe_shader_state *cso,
enum shader_t type)
{
struct ir3_shader *shader = CALLOC_STRUCT(ir3_shader);
- shader->compiler = fd_context(pctx)->screen->compiler;
+ shader->compiler = compiler;
shader->id = ++shader->compiler->shader_count;
- shader->pctx = pctx;
shader->type = type;
if (fd_mesa_debug & FD_DBG_DISASM) {
DBG("dump tgsi: type=%d", shader->type);
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_shader.h b/src/gallium/drivers/freedreno/ir3/ir3_shader.h
index f3e7c44f3c7..c6819b17761 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3_shader.h
+++ b/src/gallium/drivers/freedreno/ir3/ir3_shader.h
@@ -241,7 +241,6 @@ struct ir3_shader {
struct ir3_compiler *compiler;
- struct pipe_context *pctx; /* TODO replace w/ pipe_screen */
nir_shader *nir;
struct pipe_stream_output_info stream_output;
@@ -250,7 +249,7 @@ struct ir3_shader {
void * ir3_shader_assemble(struct ir3_shader_variant *v, uint32_t gpu_id);
-struct ir3_shader * ir3_shader_create(struct pipe_context *pctx,
+struct ir3_shader * ir3_shader_create(struct ir3_compiler *compiler,
const struct pipe_shader_state *cso, enum shader_t type);
void ir3_shader_destroy(struct ir3_shader *shader);
struct ir3_shader_variant * ir3_shader_variant(struct ir3_shader *shader,