freedreno: few caps fixes
authorRob Clark <robclark@freedesktop.org>
Sat, 24 May 2014 14:07:13 +0000 (10:07 -0400)
committerRob Clark <robclark@freedesktop.org>
Mon, 26 May 2014 12:56:27 +0000 (08:56 -0400)
Signed-off-by: Rob Clark <robclark@freedesktop.org>
src/gallium/drivers/freedreno/freedreno_resource.c
src/gallium/drivers/freedreno/freedreno_screen.c

index 289f3653e12eb10939ba402498411558db630de9..ebc134a3bb0e116eaa78e2bd379296b3e2ad7834 100644 (file)
@@ -48,6 +48,10 @@ realloc_bo(struct fd_resource *rsc, uint32_t size)
        uint32_t flags = DRM_FREEDRENO_GEM_CACHE_WCOMBINE |
                        DRM_FREEDRENO_GEM_TYPE_KMEM; /* TODO */
 
+       /* if we start using things other than write-combine,
+        * be sure to check for PIPE_RESOURCE_FLAG_MAP_COHERENT
+        */
+
        if (rsc->bo)
                fd_bo_del(rsc->bo);
 
index 6b6ecdeafcee0b209ae8d93d09c8eec9ae3e4f65..362fb807814ae2834d812a1fceac9037b75237d3 100644 (file)
@@ -163,9 +163,7 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
        case PIPE_CAP_MIXED_COLORBUFFER_FORMATS:
        case PIPE_CAP_TGSI_FS_COORD_ORIGIN_UPPER_LEFT:
        case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER:
-       case PIPE_CAP_SM3:
        case PIPE_CAP_SEAMLESS_CUBE_MAP:
-       case PIPE_CAP_TEXTURE_BARRIER:
        case PIPE_CAP_VERTEX_COLOR_UNCLAMPED:
        case PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION:
        case PIPE_CAP_TGSI_INSTANCEID:
@@ -175,8 +173,8 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
        case PIPE_CAP_COMPUTE:
        case PIPE_CAP_START_INSTANCE:
        case PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS:
-       case PIPE_CAP_TEXTURE_MULTISAMPLE:
        case PIPE_CAP_USER_CONSTANT_BUFFERS:
+       case PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENT:
                return 1;
 
        case PIPE_CAP_SHADER_STENCIL_EXPORT:
@@ -184,6 +182,9 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
        case PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER:
        case PIPE_CAP_CONDITIONAL_RENDER:
        case PIPE_CAP_PRIMITIVE_RESTART:
+       case PIPE_CAP_TEXTURE_MULTISAMPLE:
+       case PIPE_CAP_TEXTURE_BARRIER:
+       case PIPE_CAP_SM3:
                return 0;
 
        case PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENT:
@@ -209,7 +210,6 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
        case PIPE_CAP_TGSI_VS_LAYER:
        case PIPE_CAP_MAX_TEXTURE_GATHER_COMPONENTS:
        case PIPE_CAP_TEXTURE_GATHER_SM5:
-       case PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENT:
        case PIPE_CAP_FAKE_SW_MSAA:
        case PIPE_CAP_TEXTURE_QUERY_LOD:
        case PIPE_CAP_SAMPLE_SHADING: