r600: enable tessellation for evergreen/cayman (v2)
authorDave Airlie <airlied@redhat.com>
Mon, 30 Nov 2015 06:01:31 +0000 (16:01 +1000)
committerDave Airlie <airlied@redhat.com>
Sun, 6 Dec 2015 23:59:02 +0000 (09:59 +1000)
This enables tessellation for evergreen/cayman,

This will need changes before committing depending
on what hw works etc.
working are CAYMAN/REDWOOD/BARTS/TURKS/SUMO/CAICOS

v2: only enable on evergreen and above.

src/gallium/drivers/r600/r600_pipe.c

index 3bebd03..bc1a29d 100644 (file)
@@ -343,7 +343,6 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
        case PIPE_CAP_USER_VERTEX_BUFFERS:
        case PIPE_CAP_TEXTURE_GATHER_OFFSETS:
        case PIPE_CAP_VERTEXID_NOBASE:
-       case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS:
        case PIPE_CAP_DEPTH_BOUNDS_TEST:
        case PIPE_CAP_FORCE_PERSAMPLE_INTERP:
        case PIPE_CAP_SHAREABLE_SHADERS:
@@ -351,6 +350,11 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
        case PIPE_CAP_CLEAR_TEXTURE:
                return 0;
 
+       case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS:
+               if (family >= CHIP_CEDAR)
+                       return 30;
+               else
+                       return 0;
        /* Stream output. */
        case PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS:
                return rscreen->b.has_streamout ? 4 : 0;
@@ -446,6 +450,10 @@ static int r600_get_shader_param(struct pipe_screen* pscreen, unsigned shader, e
                if (rscreen->b.info.drm_minor >= 37)
                        break;
                return 0;
+       case PIPE_SHADER_TESS_CTRL:
+       case PIPE_SHADER_TESS_EVAL:
+               if (rscreen->b.family >= CHIP_CEDAR)
+                       break;
        default:
                /* XXX: support tessellation on Evergreen */
                return 0;