gallium: add PIPE_CAP_TEXTURE_BARRIER
authorMarek Olšák <maraeo@gmail.com>
Tue, 27 Sep 2011 21:18:17 +0000 (23:18 +0200)
committerMarek Olšák <maraeo@gmail.com>
Fri, 30 Sep 2011 21:19:52 +0000 (23:19 +0200)
Same issue as with conditional_render.

Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/drivers/nv50/nv50_screen.c
src/gallium/drivers/nvc0/nvc0_screen.c
src/gallium/drivers/r300/r300_screen.c
src/gallium/drivers/r600/r600_pipe.c
src/gallium/include/pipe/p_defines.h
src/mesa/state_tracker/st_extensions.c

index d3fdd55664ab31d8fd431cfb3c662334d723180a..c36f3cd4a0455a7545c9ee3ab992f35ff862f68a 100644 (file)
@@ -137,6 +137,7 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR:
    case PIPE_CAP_MIXED_COLORBUFFER_FORMATS:
    case PIPE_CAP_CONDITIONAL_RENDER:
+   case PIPE_CAP_TEXTURE_BARRIER:
       return 1;
    default:
       NOUVEAU_ERR("unknown PIPE_CAP %d\n", param);
index 9b97f243ebf42ba4b326c961150e95c7b7f4de13..cc6e6830af283c6f5c8daa3349c072cace013bce 100644 (file)
@@ -125,6 +125,7 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR:
    case PIPE_CAP_MIXED_COLORBUFFER_FORMATS:
    case PIPE_CAP_CONDITIONAL_RENDER:
+   case PIPE_CAP_TEXTURE_BARRIER:
       return 1;
    default:
       NOUVEAU_ERR("unknown PIPE_CAP %d\n", param);
index 7699ed60b83bf4371497e025b4503b6ca027ebf1..6a64a792d591a56574349c95003f80fd329760ba 100644 (file)
@@ -115,6 +115,7 @@ static int r300_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
         case PIPE_CAP_TGSI_FS_COORD_ORIGIN_UPPER_LEFT:
         case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER:
         case PIPE_CAP_CONDITIONAL_RENDER:
+        case PIPE_CAP_TEXTURE_BARRIER:
             return 1;
 
         /* r300 cannot do swizzling of compressed textures. Supported otherwise. */
index ec0d58a06669b4dd51d037e6e199ee8d49a08110..efe1d5213dc4d84fe45afbd5a9a5cdb64356c625 100644 (file)
@@ -360,6 +360,7 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
        case PIPE_CAP_FRAGMENT_COLOR_CLAMP_CONTROL:
        case PIPE_CAP_PRIMITIVE_RESTART:
        case PIPE_CAP_CONDITIONAL_RENDER:
+       case PIPE_CAP_TEXTURE_BARRIER:
                return 1;
 
        /* Supported except the original R600. */
index d87c1a08240a59aa4902680571fc15c6a35505a4..acae4b1ccbb018cc8bebe9995f5cb992b24bd58a 100644 (file)
@@ -471,7 +471,8 @@ enum pipe_cap {
    PIPE_CAP_SCALED_RESOLVE = 49,
    PIPE_CAP_MIN_TEXEL_OFFSET = 50,
    PIPE_CAP_MAX_TEXEL_OFFSET = 51,
-   PIPE_CAP_CONDITIONAL_RENDER = 52
+   PIPE_CAP_CONDITIONAL_RENDER = 52,
+   PIPE_CAP_TEXTURE_BARRIER = 53
 };
 
 /* Shader caps not specific to any single stage */
index 7be3f4077abf97fba6d0a5c33bfd678220a2c7e1..8865440d9c63e5712d28a6774d91fd2f56e3a46c 100644 (file)
@@ -611,7 +611,7 @@ void st_init_extensions(struct st_context *st)
       ctx->Extensions.ARB_sync = GL_TRUE;
    }
 
-   if (st->pipe->texture_barrier) {
+   if (screen->get_param(screen, PIPE_CAP_TEXTURE_BARRIER)) {
       ctx->Extensions.NV_texture_barrier = GL_TRUE;
    }