diff options
author | Marek Olšák <[email protected]> | 2012-09-17 23:22:00 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-09-22 00:31:58 +0200 |
commit | b6521801070d52bdd5908824e82c1ce2dde16e8e (patch) | |
tree | 56cfb77d5f4a750ccc4c3aaf4c33dba0b0f125b2 /src/gallium/drivers/r600/r600_pipe.h | |
parent | eb1d87fb945783448cc40ad43c9cd4d98002d424 (diff) |
r600g: don't snoop context state while building shaders
Let's use the shader key describing the state.
Reviewed-by: Alex Deucher <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_pipe.h')
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h index a60a498c9f9..99c9e144da8 100644 --- a/src/gallium/drivers/r600/r600_pipe.h +++ b/src/gallium/drivers/r600/r600_pipe.h @@ -254,6 +254,13 @@ struct r600_pipe_shader_selector { unsigned nr_ps_max_color_exports; }; +struct r600_shader_key { + unsigned color_two_side:1; + unsigned alpha_to_one:1; + unsigned dual_src_blend:1; + unsigned nr_cbufs:4; +}; + struct r600_pipe_shader { struct r600_pipe_shader_selector *selector; struct r600_pipe_shader *next_variant; @@ -266,7 +273,7 @@ struct r600_pipe_shader { unsigned flatshade; unsigned pa_cl_vs_out_cntl; unsigned nr_ps_color_outputs; - unsigned key; + struct r600_shader_key key; unsigned db_shader_control; unsigned ps_depth_export; }; @@ -567,7 +574,9 @@ void r600_resume_timer_queries(struct r600_context *ctx); void r600_init_context_resource_functions(struct r600_context *r600); /* r600_shader.c */ -int r600_pipe_shader_create(struct pipe_context *ctx, struct r600_pipe_shader *shader); +int r600_pipe_shader_create(struct pipe_context *ctx, + struct r600_pipe_shader *shader, + struct r600_shader_key key); #ifdef HAVE_OPENCL int r600_compute_shader_create(struct pipe_context * ctx, LLVMModuleRef mod, struct r600_bytecode * bytecode); |