r600g: properly propogate clip dist write value
authorDave Airlie <airlied@redhat.com>
Tue, 4 Feb 2014 00:48:42 +0000 (10:48 +1000)
committerDave Airlie <airlied@redhat.com>
Wed, 5 Feb 2014 00:49:43 +0000 (10:49 +1000)
This moves the value from the GS shader to the copy shader so the registers
are setup correctly.

fixes tests/spec/glsl-1.50/execution/geometry/clip-distance-out-values.shader_test

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
src/gallium/drivers/r600/r600_shader.c

index 213b1c9db817853e002445c7487c958f25413ef7..755fa91f8aef6fd1a0054ffcde3a816d378415cc 100644 (file)
@@ -1287,6 +1287,7 @@ static int generate_gs_copy_shader(struct r600_context *rctx,
                case TGSI_SEMANTIC_CLIPDIST:
                        /* spi_sid is 0 for clipdistance outputs that were generated
                         * for clipvertex - we don't need to pass them to PS */
+                       ctx.shader->clip_dist_write = gs->shader.clip_dist_write;
                        if (out->spi_sid) {
                                /* duplicate it as PARAM to pass to the pixel shader */
                                output.array_base = next_param++;