diff options
author | Marek Olšák <[email protected]> | 2012-02-23 23:44:36 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-02-27 02:03:23 +0100 |
commit | 04e324008759282728a95a1394bac2c4c2a1a3f9 (patch) | |
tree | 71691cd97f13431ca8ddb7c902638e5b775eac67 /src/mesa/state_tracker | |
parent | 74d303521e6ba41d1cbeb75edb2f834ebbe8c550 (diff) |
gallium: remove PIPE_SHADER_CAP_OUTPUT_READ
r600g is the only driver which has made use of it. The reason the CAP was
added was to fix some piglit tests when the GLSL pass lower_output_reads
didn't exist.
However, not removing output reads breaks the fallback for glClampColorARB,
which assumes outputs are not readable. The fix would be non-trivial
and my personal preference is to remove the CAP, considering that reading
outputs is uncommon and that we can now use lower_output_reads to fix
the issue that the CAP was supposed to workaround in the first place.
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index f139e95fe39..b0227855c67 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -4746,8 +4746,6 @@ get_mesa_program(struct gl_context *ctx, { glsl_to_tgsi_visitor* v = new glsl_to_tgsi_visitor(); struct gl_program *prog; - struct pipe_screen * screen = st_context(ctx)->pipe->screen; - unsigned pipe_shader_type; GLenum target; const char *target_string; bool progress; @@ -4758,17 +4756,14 @@ get_mesa_program(struct gl_context *ctx, case GL_VERTEX_SHADER: target = GL_VERTEX_PROGRAM_ARB; target_string = "vertex"; - pipe_shader_type = PIPE_SHADER_VERTEX; break; case GL_FRAGMENT_SHADER: target = GL_FRAGMENT_PROGRAM_ARB; target_string = "fragment"; - pipe_shader_type = PIPE_SHADER_FRAGMENT; break; case GL_GEOMETRY_SHADER: target = GL_GEOMETRY_PROGRAM_NV; target_string = "geometry"; - pipe_shader_type = PIPE_SHADER_GEOMETRY; break; default: assert(!"should not be reached"); @@ -4792,12 +4787,8 @@ get_mesa_program(struct gl_context *ctx, _mesa_generate_parameters_list_for_uniforms(shader_program, shader, prog->Parameters); - if (!screen->get_shader_param(screen, pipe_shader_type, - PIPE_SHADER_CAP_OUTPUT_READ)) { - /* Remove reads to output registers, and to varyings in vertex shaders. */ - lower_output_reads(shader->ir); - } - + /* Remove reads from output registers. */ + lower_output_reads(shader->ir); /* Emit intermediate IR for main(). */ visit_exec_list(shader->ir, v); |