OSDN Git Service

r600: set up constants needed for txq for buffers and cube maps with tes
authorRoland Scheidegger <sroland@vmware.com>
Mon, 1 Jan 2018 02:04:38 +0000 (03:04 +0100)
committerRoland Scheidegger <sroland@vmware.com>
Wed, 10 Jan 2018 03:59:00 +0000 (04:59 +0100)
We only did this for the other stages, but obviously tess eval/ctrl need it
too.
This fixes the (newly modified) piglit texturing/textureSize test when run
with tes stage and bufferSampler.

Reviewed-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/r600/r600_state_common.c

index 1d9ff7b..4429246 100644 (file)
@@ -1812,6 +1812,22 @@ static bool r600_update_derived_state(struct r600_context *rctx)
                }
        }
 
+       if (rctx->tes_shader) {
+               assert(rctx->b.chip_class >= EVERGREEN);
+               need_buf_const = rctx->tes_shader->current->shader.uses_tex_buffers ||
+                                rctx->tes_shader->current->shader.has_txq_cube_array_z_comp;
+               if (need_buf_const) {
+                       eg_setup_buffer_constants(rctx, PIPE_SHADER_TESS_EVAL);
+               }
+               if (rctx->tcs_shader) {
+                       need_buf_const = rctx->tcs_shader->current->shader.uses_tex_buffers ||
+                                        rctx->tcs_shader->current->shader.has_txq_cube_array_z_comp;
+                       if (need_buf_const) {
+                               eg_setup_buffer_constants(rctx, PIPE_SHADER_TESS_CTRL);
+                       }
+               }
+       }
+
        r600_update_driver_const_buffers(rctx, false);
 
        if (rctx->b.chip_class < EVERGREEN && rctx->ps_shader && rctx->vs_shader) {