gallium: remove PIPE_BIND_TRANSFER_READ/WRITE
authorMarek Olšák <marek.olsak@amd.com>
Wed, 7 Sep 2016 19:24:08 +0000 (21:24 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 8 Sep 2016 20:51:33 +0000 (22:51 +0200)
not used in any useful way

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
29 files changed:
src/gallium/auxiliary/util/u_debug.c
src/gallium/docs/source/screen.rst
src/gallium/drivers/freedreno/a2xx/fd2_screen.c
src/gallium/drivers/freedreno/a3xx/fd3_screen.c
src/gallium/drivers/freedreno/a4xx/fd4_screen.c
src/gallium/drivers/ilo/ilo_resource.c
src/gallium/drivers/ilo/ilo_transfer.c
src/gallium/drivers/nouveau/nv30/nv30_screen.c
src/gallium/drivers/nouveau/nv50/nv50_screen.c
src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
src/gallium/drivers/r300/r300_screen.c
src/gallium/drivers/r600/evergreen_state.c
src/gallium/drivers/r600/r600_state.c
src/gallium/drivers/radeon/r600_buffer_common.c
src/gallium/drivers/radeonsi/si_state.c
src/gallium/drivers/vc4/vc4_screen.c
src/gallium/include/pipe/p_defines.h
src/gallium/state_trackers/clover/core/format.cpp
src/gallium/state_trackers/clover/core/resource.cpp
src/gallium/state_trackers/nine/adapter9.c
src/gallium/state_trackers/nine/buffer9.c
src/gallium/state_trackers/nine/cubetexture9.c
src/gallium/state_trackers/nine/device9.c
src/gallium/state_trackers/nine/nine_pipe.h
src/gallium/state_trackers/nine/swapchain9.c
src/gallium/state_trackers/nine/texture9.c
src/gallium/state_trackers/nine/volumetexture9.c
src/mesa/state_tracker/st_cb_readpixels.c
src/mesa/state_tracker/st_cb_texture.c

index 3a94b75ee335c602b554f2f790a4eb743698aa08..4619526094c0d5f15744c47958cf59f0bdadf686 100644 (file)
@@ -526,8 +526,6 @@ debug_print_bind_flags(const char *msg, unsigned usage)
       DEBUG_NAMED_VALUE(PIPE_BIND_INDEX_BUFFER),
       DEBUG_NAMED_VALUE(PIPE_BIND_CONSTANT_BUFFER),
       DEBUG_NAMED_VALUE(PIPE_BIND_DISPLAY_TARGET),
-      DEBUG_NAMED_VALUE(PIPE_BIND_TRANSFER_WRITE),
-      DEBUG_NAMED_VALUE(PIPE_BIND_TRANSFER_READ),
       DEBUG_NAMED_VALUE(PIPE_BIND_STREAM_OUTPUT),
       DEBUG_NAMED_VALUE(PIPE_BIND_CURSOR),
       DEBUG_NAMED_VALUE(PIPE_BIND_CUSTOM),
index 5a11e7298413b2c536525267b32e05dbd94d6bbe..5dff650fe8d8343067b117a5931d39b3f0c9f327 100644 (file)
@@ -529,8 +529,6 @@ resources might be created and handled quite differently.
 * ``PIPE_BIND_VERTEX_BUFFER``: A vertex buffer.
 * ``PIPE_BIND_INDEX_BUFFER``: An vertex index/element buffer.
 * ``PIPE_BIND_CONSTANT_BUFFER``: A buffer of shader constants.
-* ``PIPE_BIND_TRANSFER_WRITE``: A transfer object which will be written to.
-* ``PIPE_BIND_TRANSFER_READ``: A transfer object which will be read from.
 * ``PIPE_BIND_STREAM_OUTPUT``: A stream output buffer.
 * ``PIPE_BIND_CUSTOM``:
 * ``PIPE_BIND_SCANOUT``: A front color buffer or scanout buffer.
index 007b9e668705a31e7ad740bd63cd462d1d818046..12ab5b4108912493985be42e2037b57b855d9b1b 100644 (file)
@@ -87,11 +87,6 @@ fd2_screen_is_format_supported(struct pipe_screen *pscreen,
                retval |= PIPE_BIND_INDEX_BUFFER;
        }
 
-       if (usage & PIPE_BIND_TRANSFER_READ)
-               retval |= PIPE_BIND_TRANSFER_READ;
-       if (usage & PIPE_BIND_TRANSFER_WRITE)
-               retval |= PIPE_BIND_TRANSFER_WRITE;
-
        if (retval != usage) {
                DBG("not supported: format=%s, target=%d, sample_count=%d, "
                                "usage=%x, retval=%x", util_format_name(format),
index 52a284e04719231f2bdfa20d873d5ea1ae7c95e9..998ec7a0bdbaa076b73ac0e85294bc0550c75436 100644 (file)
@@ -87,11 +87,6 @@ fd3_screen_is_format_supported(struct pipe_screen *pscreen,
                retval |= PIPE_BIND_INDEX_BUFFER;
        }
 
-       if (usage & PIPE_BIND_TRANSFER_READ)
-               retval |= PIPE_BIND_TRANSFER_READ;
-       if (usage & PIPE_BIND_TRANSFER_WRITE)
-               retval |= PIPE_BIND_TRANSFER_WRITE;
-
        if (retval != usage) {
                DBG("not supported: format=%s, target=%d, sample_count=%d, "
                                "usage=%x, retval=%x", util_format_name(format),
index aa60658d7c6700e9ff93e2fd5017669999c496fa..6006bb96b3a8bab788f24b8c07817dc60347d8f5 100644 (file)
@@ -86,11 +86,6 @@ fd4_screen_is_format_supported(struct pipe_screen *pscreen,
                retval |= PIPE_BIND_INDEX_BUFFER;
        }
 
-       if (usage & PIPE_BIND_TRANSFER_READ)
-               retval |= PIPE_BIND_TRANSFER_READ;
-       if (usage & PIPE_BIND_TRANSFER_WRITE)
-               retval |= PIPE_BIND_TRANSFER_WRITE;
-
        if (retval != usage) {
                DBG("not supported: format=%s, target=%d, sample_count=%d, "
                                "usage=%x, retval=%x", util_format_name(format),
index 7961288179dbff6e0fa8c0f59586ff211fc2c60c..5ca7e1b0a5ab7d0818a56de97d4037cb3582439f 100644 (file)
@@ -204,7 +204,7 @@ resource_get_image_info(const struct pipe_resource *templ,
     * images when the image size is greater than one-fourth of the mappable
     * aperture.
     */
-   if (templ->bind & (PIPE_BIND_TRANSFER_WRITE | PIPE_BIND_TRANSFER_READ))
+   if (templ->usage == PIPE_USAGE_STAGING)
       info->prefer_linear_threshold = dev->aperture_mappable / 4;
 
    info->bind_surface_sampler = (templ->bind & PIPE_BIND_SAMPLER_VIEW);
index 87607ebe80dfeb0ef7a933d790a8ee80b8d2bbe5..c0dab31440c386ab006ef934aee31d7aa13b033e 100644 (file)
@@ -180,7 +180,6 @@ xfer_alloc_staging_res(struct ilo_transfer *xfer)
    templ.array_size = box->depth;
    templ.nr_samples = 1;
    templ.usage = PIPE_USAGE_STAGING;
-   templ.bind = PIPE_BIND_TRANSFER_WRITE;
 
    if (xfer->base.usage & PIPE_TRANSFER_FLUSH_EXPLICIT) {
       templ.flags = PIPE_RESOURCE_FLAG_MAP_PERSISTENT |
@@ -1111,7 +1110,7 @@ buf_pwrite(struct ilo_context *ilo, struct pipe_resource *res,
          templ = *res;
          templ.width0 = size;
          templ.usage = PIPE_USAGE_STAGING;
-         templ.bind = PIPE_BIND_TRANSFER_WRITE;
+         templ.bind = 0;
          staging = ilo->base.screen->resource_create(ilo->base.screen, &templ);
          if (staging) {
             const struct ilo_vma *staging_vma = ilo_resource_get_vma(staging);
index ed74c3aa24946889f27f026f7c8a2c29ddcded0c..2ced8f11ef6ef264f2250263cb25f99ed4e07aed 100644 (file)
@@ -374,10 +374,8 @@ nv30_screen_is_format_supported(struct pipe_screen *pscreen,
       return false;
    }
 
-   /* transfers & shared are always supported */
-   bindings &= ~(PIPE_BIND_TRANSFER_READ |
-                 PIPE_BIND_TRANSFER_WRITE |
-                 PIPE_BIND_SHARED);
+   /* shared is always supported */
+   bindings &= ~PIPE_BIND_SHARED;
 
    return (nv30_format_info(pscreen, format)->bindings & bindings) == bindings;
 }
index 57c0c2bca8b688547da760917de5dc54b38e4f6d..1ec791d5163cafed4c3d828db0c05239a90c0be2 100644 (file)
@@ -75,10 +75,8 @@ nv50_screen_is_format_supported(struct pipe_screen *pscreen,
           sample_count > 1)
          return false;
 
-   /* transfers & shared are always supported */
-   bindings &= ~(PIPE_BIND_TRANSFER_READ |
-                 PIPE_BIND_TRANSFER_WRITE |
-                 PIPE_BIND_LINEAR |
+   /* shared is always supported */
+   bindings &= ~(PIPE_BIND_LINEAR |
                  PIPE_BIND_SHARED);
 
    return (( nv50_format_table[format].usage |
index 0627f3df9e7740aa34d260571b82edeef3870403..0103031da66a177d61c41dd6df1e3fc570b61e38 100644 (file)
@@ -84,10 +84,8 @@ nvc0_screen_is_format_supported(struct pipe_screen *pscreen,
        nouveau_screen(pscreen)->class_3d != NVEA_3D_CLASS)
       return false;
 
-   /* transfers & shared are always supported */
-   bindings &= ~(PIPE_BIND_TRANSFER_READ |
-                 PIPE_BIND_TRANSFER_WRITE |
-                 PIPE_BIND_LINEAR |
+   /* shared is always supported */
+   bindings &= ~(PIPE_BIND_LINEAR |
                  PIPE_BIND_SHARED);
 
    if (bindings & PIPE_BIND_SHADER_IMAGE && sample_count > 1 &&
index 509feaebb1d701344e0a468c9f905ff054540570..f6949ce191b4b97d4269af87db7e4c79cbfbc8fb 100644 (file)
@@ -664,12 +664,6 @@ static boolean r300_is_format_supported(struct pipe_screen* screen,
         }
     }
 
-    /* Transfers are always supported. */
-    if (usage & PIPE_BIND_TRANSFER_READ)
-        retval |= PIPE_BIND_TRANSFER_READ;
-    if (usage & PIPE_BIND_TRANSFER_WRITE)
-        retval |= PIPE_BIND_TRANSFER_WRITE;
-
     return retval == usage;
 }
 
index ed385ee9dcec1a0e529b7c2ca74fd44d92a63bc4..d137514326bf11b551dfde8ddd40d2a3f6415f69 100644 (file)
@@ -294,11 +294,6 @@ boolean evergreen_is_format_supported(struct pipe_screen *screen,
                retval |= PIPE_BIND_VERTEX_BUFFER;
        }
 
-       if (usage & PIPE_BIND_TRANSFER_READ)
-               retval |= PIPE_BIND_TRANSFER_READ;
-       if (usage & PIPE_BIND_TRANSFER_WRITE)
-               retval |= PIPE_BIND_TRANSFER_WRITE;
-
        if ((usage & PIPE_BIND_LINEAR) &&
            !util_format_is_compressed(format) &&
            !(usage & PIPE_BIND_DEPTH_STENCIL))
index c55c5322bfed78ded716348ec954246f18f5845c..2b58d982a91027da0b863259aa80e31ef1f96b90 100644 (file)
@@ -235,11 +235,6 @@ boolean r600_is_format_supported(struct pipe_screen *screen,
                retval |= PIPE_BIND_VERTEX_BUFFER;
        }
 
-       if (usage & PIPE_BIND_TRANSFER_READ)
-               retval |= PIPE_BIND_TRANSFER_READ;
-       if (usage & PIPE_BIND_TRANSFER_WRITE)
-               retval |= PIPE_BIND_TRANSFER_WRITE;
-
        if ((usage & PIPE_BIND_LINEAR) &&
            !util_format_is_compressed(format) &&
            !(usage & PIPE_BIND_DEPTH_STENCIL))
index a600793e3e6dbdaaf4170a408a410ddea8e34b9c..2e8b6f44d567df3796311edf6e6125e9602237ec 100644 (file)
@@ -386,7 +386,7 @@ static void *r600_buffer_transfer_map(struct pipe_context *ctx,
                struct r600_resource *staging;
 
                staging = (struct r600_resource*) pipe_buffer_create(
-                               ctx->screen, PIPE_BIND_TRANSFER_READ, PIPE_USAGE_STAGING,
+                               ctx->screen, 0, PIPE_USAGE_STAGING,
                                box->width + (box->x % R600_MAP_BUFFER_ALIGNMENT));
                if (staging) {
                        /* Copy the VRAM buffer to the staging buffer. */
index 280a9f88be5690f14f7221249b3052c9174125f3..0d3de9ab31abdd3a2a30ae92181413c78b62458d 100644 (file)
@@ -1856,11 +1856,6 @@ static boolean si_is_format_supported(struct pipe_screen *screen,
                retval |= PIPE_BIND_VERTEX_BUFFER;
        }
 
-       if (usage & PIPE_BIND_TRANSFER_READ)
-               retval |= PIPE_BIND_TRANSFER_READ;
-       if (usage & PIPE_BIND_TRANSFER_WRITE)
-               retval |= PIPE_BIND_TRANSFER_WRITE;
-
        if ((usage & PIPE_BIND_LINEAR) &&
            !util_format_is_compressed(format) &&
            !(usage & PIPE_BIND_DEPTH_STENCIL))
index 652d9b467424faa20af35d272d1f5f211ece8cb4..3dc85d5e573a700c0cd544e91b8f999a3e4b1cc6 100644 (file)
@@ -494,11 +494,6 @@ vc4_screen_is_format_supported(struct pipe_screen *pscreen,
                 retval |= PIPE_BIND_INDEX_BUFFER;
         }
 
-        if (usage & PIPE_BIND_TRANSFER_READ)
-                retval |= PIPE_BIND_TRANSFER_READ;
-        if (usage & PIPE_BIND_TRANSFER_WRITE)
-                retval |= PIPE_BIND_TRANSFER_WRITE;
-
 #if 0
         if (retval != usage) {
                 fprintf(stderr,
index 5361ed6271481d1936f8c4f2c77c9c7e7e753fcf..88aa050ef7e8a723f1ed2f41731a5d8dbe4c5d83 100644 (file)
@@ -410,8 +410,7 @@ enum pipe_flush_flags
 #define PIPE_BIND_INDEX_BUFFER         (1 << 5) /* draw_elements */
 #define PIPE_BIND_CONSTANT_BUFFER      (1 << 6) /* set_constant_buffer */
 #define PIPE_BIND_DISPLAY_TARGET       (1 << 7) /* flush_front_buffer */
-#define PIPE_BIND_TRANSFER_WRITE       (1 << 8) /* transfer_map */
-#define PIPE_BIND_TRANSFER_READ        (1 << 9) /* transfer_map */
+/* gap */
 #define PIPE_BIND_STREAM_OUTPUT        (1 << 10) /* set_stream_output_buffers */
 #define PIPE_BIND_CURSOR               (1 << 11) /* mouse cursor */
 #define PIPE_BIND_CUSTOM               (1 << 12) /* state-tracker/winsys usages */
index aee1cc9c79d7b296afb7dc2a8d89bf2cb3eeff0c..5701292409817d173a113ac57bf09cbabf4e8c3c 100644 (file)
@@ -147,9 +147,7 @@ namespace clover {
       std::set<cl_image_format> s;
       pipe_texture_target target = translate_target(type);
       unsigned bindings = (PIPE_BIND_SAMPLER_VIEW |
-                           PIPE_BIND_COMPUTE_RESOURCE |
-                           PIPE_BIND_TRANSFER_READ |
-                           PIPE_BIND_TRANSFER_WRITE);
+                           PIPE_BIND_COMPUTE_RESOURCE);
 
       for (auto f : formats) {
          if (all_of([=](const device &dev) {
index 83781d39c01e904934e83b2928c7f1248b4725ce..06fd3f608fa7dd28eb93e8f80c398dd8f3d79241 100644 (file)
@@ -136,9 +136,7 @@ root_resource::root_resource(clover::device &dev, memory_obj &obj,
    info.target = translate_target(obj.type());
    info.bind = (PIPE_BIND_SAMPLER_VIEW |
                 PIPE_BIND_COMPUTE_RESOURCE |
-                PIPE_BIND_GLOBAL |
-                PIPE_BIND_TRANSFER_READ |
-                PIPE_BIND_TRANSFER_WRITE);
+                PIPE_BIND_GLOBAL);
 
    if (obj.flags() & CL_MEM_USE_HOST_PTR && user_ptr_support) {
       // Page alignment is normally required for this, just try, hope for the
index 41140d46f3331294f69731b0553c517a1a625bd8..acf205dc58c791ea2329ced7a3446a144bf7f063 100644 (file)
@@ -388,8 +388,7 @@ NineAdapter9_CheckDeviceMultiSampleType( struct NineAdapter9 *This,
     if (depth_stencil_format(SurfaceFormat))
         bind = d3d9_get_pipe_depth_format_bindings(SurfaceFormat);
     else /* render-target */
-        bind = PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_TRANSFER_READ |
-               PIPE_BIND_TRANSFER_WRITE | PIPE_BIND_RENDER_TARGET;
+        bind = PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET;
 
     pf = d3d9_to_pipe_format_checked(screen, SurfaceFormat, PIPE_TEXTURE_2D,
                                      MultiSampleType, bind, FALSE, FALSE);
index 387fc29878caa0f4c0d737636afaf7d23b9705db..236a3ee66bdc09ec4e76dbe4936f1ea68f542ab8 100644 (file)
@@ -67,7 +67,7 @@ NineBuffer9_ctor( struct NineBuffer9 *This,
 
     /* Note: WRITEONLY is just tip for resource placement, the resource
      * can still be read (but slower). */
-    info->bind = PIPE_BIND_VERTEX_BUFFER | PIPE_BIND_TRANSFER_WRITE | PIPE_BIND_TRANSFER_READ;
+    info->bind = PIPE_BIND_VERTEX_BUFFER;
 
     /* It is hard to find clear information on where to place the buffer in
      * memory depending on the flag.
index 11000942d3ac29858c1a5116dedf7406e3ec5c3d..dd1a43023dcd9705e3b498f94059a9ed7efb7e84 100644 (file)
@@ -101,9 +101,6 @@ NineCubeTexture9_ctor( struct NineCubeTexture9 *This,
 
     if (Usage & D3DUSAGE_DYNAMIC) {
         info->usage = PIPE_USAGE_DYNAMIC;
-        info->bind |=
-            PIPE_BIND_TRANSFER_READ |
-            PIPE_BIND_TRANSFER_WRITE;
     }
     if (Usage & D3DUSAGE_SOFTWAREPROCESSING)
         DBG("Application asked for Software Vertex Processing, "
index 3f6577c076bffc8df2ba228fd5c1638bcc6d493d..230ad0290d74cb9c1c7331174b1e1a27f9f1ba6d 100644 (file)
@@ -254,7 +254,7 @@ NineDevice9_ctor( struct NineDevice9 *This,
         tmpl.last_level = 0;
         tmpl.nr_samples = 0;
         tmpl.usage = PIPE_USAGE_DEFAULT;
-        tmpl.bind = PIPE_BIND_VERTEX_BUFFER | PIPE_BIND_TRANSFER_WRITE;
+        tmpl.bind = PIPE_BIND_VERTEX_BUFFER;
         tmpl.flags = 0;
         This->dummy_vbo = pScreen->resource_create(pScreen, &tmpl);
 
index fe8e91013d8517510f46347abd7f1f9cd225fab4..93e3225247884816d607be3e1c0de3c645eb56d9 100644 (file)
@@ -239,8 +239,7 @@ d3d9_get_pipe_depth_format_bindings(D3DFORMAT format)
     case D3DFMT_D32F_LOCKABLE:
     case D3DFMT_D16_LOCKABLE:
     case D3DFMT_D32_LOCKABLE:
-        return PIPE_BIND_DEPTH_STENCIL | PIPE_BIND_TRANSFER_READ |
-               PIPE_BIND_TRANSFER_WRITE;
+        return PIPE_BIND_DEPTH_STENCIL;
     case D3DFMT_DF16:
     case D3DFMT_DF24:
     case D3DFMT_INTZ:
index bc1c4b108cb6d971f713e3fa8669ee37f97c7a1d..79fba283fb97df74bde86fd2b9a41fceb2317db8 100644 (file)
@@ -301,8 +301,7 @@ NineSwapChain9_Resize( struct NineSwapChain9 *This,
     }
 
     for (i = 0; i < newBufferCount; ++i) {
-        tmplt.bind = PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_TRANSFER_READ |
-                     PIPE_BIND_TRANSFER_WRITE | PIPE_BIND_RENDER_TARGET;
+        tmplt.bind = PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET;
         tmplt.nr_samples = pParams->MultiSampleType;
         if (!has_present_buffers)
             tmplt.bind |= PIPE_BIND_SHARED | PIPE_BIND_SCANOUT | PIPE_BIND_DISPLAY_TARGET;
@@ -547,8 +546,7 @@ create_present_buffer( struct NineSwapChain9 *This,
     tmplt.usage = PIPE_USAGE_DEFAULT;
     tmplt.flags = 0;
     tmplt.format = PIPE_FORMAT_B8G8R8X8_UNORM;
-    tmplt.bind = PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_TRANSFER_READ |
-                 PIPE_BIND_TRANSFER_WRITE | PIPE_BIND_RENDER_TARGET |
+    tmplt.bind = PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET |
                  PIPE_BIND_SHARED | PIPE_BIND_SCANOUT | PIPE_BIND_DISPLAY_TARGET;
     tmplt.nr_samples = 0;
     if (This->actx->linear_framebuffer)
index 9bc8610b291e25303d35b93c1e4fadc8a89c9c44..875620e065c08c45aa86d9c4fbad89ba17ff4ee9 100644 (file)
@@ -142,9 +142,6 @@ NineTexture9_ctor( struct NineTexture9 *This,
 
     if (Usage & D3DUSAGE_DYNAMIC) {
         info->usage = PIPE_USAGE_DYNAMIC;
-        info->bind |=
-            PIPE_BIND_TRANSFER_READ |
-            PIPE_BIND_TRANSFER_WRITE;
     }
 
     if (Usage & D3DUSAGE_SOFTWAREPROCESSING)
index e70f3c12337835698e8318894f402256b433003a..e5db6fc426dadae9448850acae5c30cf545b798a 100644 (file)
@@ -94,9 +94,6 @@ NineVolumeTexture9_ctor( struct NineVolumeTexture9 *This,
 
     if (Usage & D3DUSAGE_DYNAMIC) {
         info->usage = PIPE_USAGE_DYNAMIC;
-        info->bind |=
-            PIPE_BIND_TRANSFER_READ |
-            PIPE_BIND_TRANSFER_WRITE;
     }
     if (Usage & D3DUSAGE_SOFTWAREPROCESSING)
         DBG("Application asked for Software Vertex Processing, "
index 3cfdf78f1905628368abfc557c68fdee002a20de..b79f1062a19b9e657c63773dc1d959d6a2eb5717 100644 (file)
@@ -274,7 +274,6 @@ blit_to_staging(struct st_context *st, struct st_renderbuffer *strb,
    memset(&dst_templ, 0, sizeof(dst_templ));
    dst_templ.target = PIPE_TEXTURE_2D;
    dst_templ.format = dst_format;
-   dst_templ.bind = PIPE_BIND_TRANSFER_READ;
    if (util_format_is_depth_or_stencil(dst_format))
       dst_templ.bind |= PIPE_BIND_DEPTH_STENCIL;
    else
@@ -404,7 +403,7 @@ st_ReadPixels(struct gl_context *ctx, GLint x, GLint y,
    struct pipe_resource *src;
    struct pipe_resource *dst = NULL;
    enum pipe_format dst_format, src_format;
-   unsigned bind = PIPE_BIND_TRANSFER_READ;
+   unsigned bind;
    struct pipe_transfer *tex_xfer;
    ubyte *map = NULL;
    int dst_x, dst_y;
@@ -452,9 +451,9 @@ st_ReadPixels(struct gl_context *ctx, GLint x, GLint y,
    }
 
    if (format == GL_DEPTH_COMPONENT || format == GL_DEPTH_STENCIL)
-      bind |= PIPE_BIND_DEPTH_STENCIL;
+      bind = PIPE_BIND_DEPTH_STENCIL;
    else
-      bind |= PIPE_BIND_RENDER_TARGET;
+      bind = PIPE_BIND_RENDER_TARGET;
 
    /* Choose the destination format by finding the best match
     * for the format+type combo. */
index 62c2900aeb10210d341cfb8d8a6ca9a83a523f17..fa360b9fed41e476ed38f3f0357b7faaad139875 100644 (file)
@@ -1821,7 +1821,7 @@ st_GetTexSubImage(struct gl_context * ctx,
    GLenum gl_target = texImage->TexObject->Target;
    enum pipe_texture_target pipe_target;
    struct pipe_blit_info blit;
-   unsigned bind = PIPE_BIND_TRANSFER_READ;
+   unsigned bind;
    struct pipe_transfer *tex_xfer;
    ubyte *map = NULL;
    boolean done = FALSE;
@@ -1885,9 +1885,9 @@ st_GetTexSubImage(struct gl_context * ctx,
    }
 
    if (format == GL_DEPTH_COMPONENT || format == GL_DEPTH_STENCIL)
-      bind |= PIPE_BIND_DEPTH_STENCIL;
+      bind = PIPE_BIND_DEPTH_STENCIL;
    else
-      bind |= PIPE_BIND_RENDER_TARGET;
+      bind = PIPE_BIND_RENDER_TARGET;
 
    /* GetTexImage only returns a single face for cubemaps. */
    if (gl_target == GL_TEXTURE_CUBE_MAP) {