radeonsi: remove vs.ucps_enabled from the shader key
authorMarek Olšák <marek.olsak@amd.com>
Sat, 4 Oct 2014 18:41:03 +0000 (20:41 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Sun, 12 Oct 2014 21:52:02 +0000 (23:52 +0200)
Written CLIPDIST outputs are simply disabled in PA_CL_VS_OUT_CNTL.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
src/gallium/drivers/radeonsi/si_shader.c
src/gallium/drivers/radeonsi/si_shader.h
src/gallium/drivers/radeonsi/si_state.c

index e21cb76d9f970d4c128e2d654c3b675a8b3425dd..c9e67922c3b2e059075108d2de57540c5c276e4e 100644 (file)
@@ -870,9 +870,6 @@ static void si_llvm_emit_clipvertex(struct lp_build_tgsi_context * bld_base,
        for (reg_index = 0; reg_index < 2; reg_index ++) {
                LLVMValueRef *args = pos[2 + reg_index];
 
-               if (!(shader->key.vs.ucps_enabled & (1 << reg_index)))
-                       continue;
-
                shader->clip_dist_write |= 0xf << (4 * reg_index);
 
                args[5] =
@@ -1175,9 +1172,6 @@ handle_semantic:
                        param_count++;
                        break;
                case TGSI_SEMANTIC_CLIPDIST:
-                       if (!(si_shader_ctx->shader->key.vs.ucps_enabled &
-                             (1 << semantic_index)))
-                               continue;
                        shader->clip_dist_write |=
                                0xf << (semantic_index * 4);
                        target = V_008DFC_SQ_EXP_POS + 2 + semantic_index;
index 43a4e65aa72c24611beec5c475598b2120071036..76c29fe0f3650a53f591aa14d54b269b081977fb 100644 (file)
@@ -145,7 +145,6 @@ union si_shader_key {
                /* The mask of "get_unique_index" bits, needed for ES,
                 * it describes how the ES->GS ring buffer is laid out. */
                uint64_t        gs_used_inputs;
-               unsigned        ucps_enabled:2;
                unsigned        as_es:1;
        } vs;
 };
index 0166798c0e2b587359bbe48375b096720c1fbc18..6eec88eb483fb1bb6fc4ed5fd08ec0763048778d 100644 (file)
@@ -2193,14 +2193,6 @@ static INLINE void si_shader_selector_key(struct pipe_context *ctx,
        struct si_context *sctx = (struct si_context *)ctx;
        memset(key, 0, sizeof(*key));
 
-       if ((sel->type == PIPE_SHADER_VERTEX || sel->type == PIPE_SHADER_GEOMETRY) &&
-           sctx->queued.named.rasterizer) {
-               if (sctx->queued.named.rasterizer->clip_plane_enable & 0xf0)
-                       key->vs.ucps_enabled |= 0x2;
-               if (sctx->queued.named.rasterizer->clip_plane_enable & 0xf)
-                       key->vs.ucps_enabled |= 0x1;
-       }
-
        if (sel->type == PIPE_SHADER_VERTEX) {
                unsigned i;
                if (!sctx->vertex_elements)