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),
* ``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.
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),
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),
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),
* 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);
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 |
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);
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;
}
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 |
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 &&
}
}
- /* 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;
}
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))
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))
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. */
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))
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,
#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 */
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) {
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
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);
/* 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.
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, "
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);
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:
}
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;
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)
if (Usage & D3DUSAGE_DYNAMIC) {
info->usage = PIPE_USAGE_DYNAMIC;
- info->bind |=
- PIPE_BIND_TRANSFER_READ |
- PIPE_BIND_TRANSFER_WRITE;
}
if (Usage & D3DUSAGE_SOFTWAREPROCESSING)
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, "
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
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;
}
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. */
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;
}
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) {