llvm/softpipe: Enable cull_distance as draw supports it.
authorTobias Klausmann <tobias.johannes.klausmann@mni.thm.de>
Sun, 8 May 2016 20:44:10 +0000 (22:44 +0200)
committerDave Airlie <airlied@redhat.com>
Mon, 23 May 2016 01:04:37 +0000 (11:04 +1000)
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Tobias Klausmann <tobias.johannes.klausmann@mni.thm.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/llvmpipe/lp_screen.c
src/gallium/drivers/softpipe/sp_screen.c

index c6c18ee711796bc81b3b209e311dc67172f3959e..6aef5c97fd872a2a34297821a057fabc5f99564c 100644 (file)
@@ -291,6 +291,8 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_TEXTURE_FLOAT_LINEAR:
    case PIPE_CAP_TEXTURE_HALF_FLOAT_LINEAR:
       return 1;
+   case PIPE_CAP_CULL_DISTANCE:
+      return 1;
    case PIPE_CAP_MULTISAMPLE_Z_RESOLVE:
    case PIPE_CAP_RESOURCE_FROM_USER_MEMORY:
    case PIPE_CAP_DEVICE_RESET_STATUS_QUERY:
@@ -321,7 +323,6 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_PCI_FUNCTION:
    case PIPE_CAP_FRAMEBUFFER_NO_ATTACHMENT:
    case PIPE_CAP_ROBUST_BUFFER_ACCESS_BEHAVIOR:
-   case PIPE_CAP_CULL_DISTANCE:
       return 0;
    }
    /* should only get here on unhandled cases */
index 103e665e882ca25541d94fd3693ce6eb6bf233ea..e7e89a4ea7f454fc6b5787d0e49d0339ee10184c 100644 (file)
@@ -240,6 +240,7 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_TEXTURE_HALF_FLOAT_LINEAR:
       return 1;
    case PIPE_CAP_FRAMEBUFFER_NO_ATTACHMENT:
+   case PIPE_CAP_CULL_DISTANCE:
       return 1;
    case PIPE_CAP_VERTEXID_NOBASE:
       return 0;
@@ -272,7 +273,6 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_PCI_DEVICE:
    case PIPE_CAP_PCI_FUNCTION:
    case PIPE_CAP_ROBUST_BUFFER_ACCESS_BEHAVIOR:
-   case PIPE_CAP_CULL_DISTANCE:
       return 0;
    case PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT:
       return 4;