Lines Matching refs:bind

162 create_bci(struct zink_screen *screen, const struct pipe_resource *templ, unsigned bind)
186 if (bind & PIPE_BIND_SHADER_IMAGE)
189 if (bind & PIPE_BIND_QUERY_BUFFER)
255 get_image_usage_for_feats(struct zink_screen *screen, VkFormatFeatureFlags feats, const struct pipe_resource *templ, unsigned bind, bool *need_extended)
261 if (bind & ZINK_BIND_TRANSIENT)
272 if ((is_planar || (feats & VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT)) && (bind & PIPE_BIND_SHADER_IMAGE)) {
278 if (bind & PIPE_BIND_RENDER_TARGET) {
281 if ((bind & (PIPE_BIND_LINEAR | PIPE_BIND_SHARED)) != (PIPE_BIND_LINEAR | PIPE_BIND_SHARED))
288 } else if ((bind & PIPE_BIND_SAMPLER_VIEW) && !util_format_is_depth_or_stencil(templ->format)) {
297 if (bind & PIPE_BIND_DEPTH_STENCIL) {
303 } else if (bind & PIPE_BIND_SAMPLER_VIEW && !(usage & VK_IMAGE_USAGE_TRANSFER_DST_BIT)) {
310 if (bind & PIPE_BIND_STREAM_OUTPUT)
353 get_image_usage(struct zink_screen *screen, VkImageCreateInfo *ici, const struct pipe_resource *templ, unsigned bind, unsigned modifiers_count, const uint64_t *modifiers, uint64_t *mod)
371 VkImageUsageFlags usage = get_image_usage_for_feats(screen, feats, templ, bind, &need_extended);
381 VkImageUsageFlags usage = get_image_usage_for_feats(screen, feats, templ, bind, &need_extended);
393 VkImageUsageFlags usage = get_image_usage_for_feats(screen, feats, templ, bind, &need_extended);
397 usage = get_image_usage_for_feats(screen, feats, templ, bind, &need_extended);
407 create_ici(struct zink_screen *screen, VkImageCreateInfo *ici, const struct pipe_resource *templ, bool dmabuf, unsigned bind, unsigned modifiers_count, const uint64_t *modifiers, bool *success)
414 ici->flags = modifiers_count || dmabuf || bind & (PIPE_BIND_SCANOUT | PIPE_BIND_DEPTH_STENCIL) ? 0 : VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT;
461 bind & PIPE_BIND_DEPTH_STENCIL &&
474 bind & (PIPE_BIND_LINEAR | ZINK_BIND_DMABUF) ? VK_IMAGE_TILING_LINEAR : VK_IMAGE_TILING_OPTIMAL;
513 if (bind & PIPE_BIND_LINEAR) {
534 ici->usage = get_image_usage(screen, ici, templ, bind, modifiers_count, modifiers, &mod);
541 if (get_image_usage(screen, ici, templ, bind, modifiers_count, modifiers, &mod) != ici->usage)
572 bool shared = templ->bind & PIPE_BIND_SHARED;
585 bool needs_export = (templ->bind & (ZINK_BIND_VIDEO | ZINK_BIND_DMABUF)) != 0;
616 VkBufferCreateInfo bci = create_bci(screen, templ, templ->bind);
623 if (!(templ->bind & PIPE_BIND_SHADER_IMAGE)) {
685 templ->bind, ici_modifier_count, ici_modifiers, &success);
908 if (templ->bind & ZINK_BIND_TRANSIENT)
947 if ((templ->bind & ZINK_BIND_VIDEO) || ((templ->bind & PIPE_BIND_SHARED) && shared) || (templ->bind & ZINK_BIND_DMABUF)) {
1052 if (templ->bind & ZINK_BIND_VIDEO) {
1117 templ2.bind |= PIPE_BIND_SHADER_IMAGE;
1132 res->base.b.bind |= PIPE_BIND_SHADER_IMAGE;
1145 res->base.b.bind |= PIPE_BIND_SHADER_IMAGE;
1164 if (templ->bind & PIPE_BIND_DISPLAY_TARGET) {
1167 res->base.b.bind,
1188 res->base.b.bind |= PIPE_BIND_DISPLAY_TARGET;
1203 res->base.b.bind |= ZINK_BIND_DMABUF;
1230 add_resource_bind(struct zink_context *ctx, struct zink_resource *res, unsigned bind)
1233 assert((res->base.b.bind & bind) == 0);
1235 res->base.b.bind |= bind;
1237 if (bind & ZINK_BIND_DMABUF && !res->modifiers_count && screen->info.have_EXT_image_drm_format_modifier) {
1246 res->base.b.bind &= ~bind;
1414 unsigned bind = ZINK_BIND_DMABUF;
1415 if (!(res->base.b.bind & PIPE_BIND_SHARED))
1416 bind |= PIPE_BIND_SHARED;
1417 if (!add_resource_bind(screen->copy_context, res, bind))
1943 templ.bind = PIPE_BIND_LINEAR;
2161 if (res->base.b.bind & PIPE_BIND_SHADER_IMAGE)