Lines Matching defs:ivci

41    VkImageViewCreateInfo ivci;
43 memset(&ivci, 0, sizeof(VkImageViewCreateInfo));
44 ivci.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO;
45 ivci.image = res->obj->image;
49 ivci.viewType = res->need_2D ? VK_IMAGE_VIEW_TYPE_2D : VK_IMAGE_VIEW_TYPE_1D;
53 ivci.viewType = res->need_2D ? VK_IMAGE_VIEW_TYPE_2D_ARRAY : VK_IMAGE_VIEW_TYPE_1D_ARRAY;
58 ivci.viewType = VK_IMAGE_VIEW_TYPE_2D;
62 ivci.viewType = VK_IMAGE_VIEW_TYPE_2D_ARRAY;
66 ivci.viewType = VK_IMAGE_VIEW_TYPE_CUBE;
70 ivci.viewType = VK_IMAGE_VIEW_TYPE_CUBE_ARRAY;
74 ivci.viewType = VK_IMAGE_VIEW_TYPE_3D;
81 ivci.format = zink_get_format(screen, templ->format);
82 assert(ivci.format != VK_FORMAT_UNDEFINED);
87 ivci.components.r = zink_component_mapping(zink_clamp_void_swizzle(desc, PIPE_SWIZZLE_X));
88 ivci.components.g = zink_component_mapping(zink_clamp_void_swizzle(desc, PIPE_SWIZZLE_Y));
89 ivci.components.b = zink_component_mapping(zink_clamp_void_swizzle(desc, PIPE_SWIZZLE_Z));
90 ivci.components.a = zink_component_mapping(zink_clamp_void_swizzle(desc, PIPE_SWIZZLE_W));
92 ivci.components.r = VK_COMPONENT_SWIZZLE_R;
93 ivci.components.g = VK_COMPONENT_SWIZZLE_G;
94 ivci.components.b = VK_COMPONENT_SWIZZLE_B;
95 ivci.components.a = VK_COMPONENT_SWIZZLE_A;
97 ivci.subresourceRange.aspectMask = res->aspect;
98 ivci.subresourceRange.baseMipLevel = templ->u.tex.level;
99 ivci.subresourceRange.levelCount = 1;
100 ivci.subresourceRange.baseArrayLayer = templ->u.tex.first_layer;
101 ivci.subresourceRange.layerCount = 1 + templ->u.tex.last_layer - templ->u.tex.first_layer;
102 assert(ivci.viewType != VK_IMAGE_VIEW_TYPE_3D || ivci.subresourceRange.baseArrayLayer == 0);
103 assert(ivci.viewType != VK_IMAGE_VIEW_TYPE_3D || ivci.subresourceRange.layerCount == 1);
104 ivci.viewType = zink_surface_clamp_viewtype(ivci.viewType, templ->u.tex.first_layer, templ->u.tex.last_layer, res->base.b.array_size);
106 return ivci;
110 init_surface_info(struct zink_surface *surface, struct zink_resource *res, VkImageViewCreateInfo *ivci)
112 VkImageViewUsageCreateInfo *usage_info = (VkImageViewUsageCreateInfo *)ivci->pNext;
117 surface->info.layerCount = ivci->subresourceRange.layerCount;
118 surface->info.format[0] = ivci->format;
122 surface->info.format[1] = ivci->format == cdt->formats[0] ? cdt->formats[1] : cdt->formats[0];
131 VkImageViewCreateInfo *ivci,
160 ivci->pNext = &usage_info;
178 init_surface_info(surface, res, ivci);
182 assert(ivci->image);
183 VkResult result = VKSCR(CreateImageView)(screen->dev, ivci, NULL,
201 do_create_surface(struct pipe_context *pctx, struct pipe_resource *pres, const struct pipe_surface *templ, VkImageViewCreateInfo *ivci, uint32_t hash, bool actually)
204 struct zink_surface *surface = create_surface(pctx, pres, templ, ivci, actually);
207 surface->ivci = *ivci;
215 VkImageViewCreateInfo *ivci)
219 uint32_t hash = hash_ivci(ivci);
222 struct hash_entry *entry = _mesa_hash_table_search_pre_hashed(&res->surface_cache, hash, ivci);
226 surface = do_create_surface(&ctx->base, pres, templ, ivci, hash, true);
227 entry = _mesa_hash_table_insert_pre_hashed(&res->surface_cache, hash, &surface->ivci, surface);
263 VkImageViewCreateInfo ivci = create_ivci(zink_screen(pctx->screen), res, templ,
269 struct zink_surface *surface = do_create_surface(pctx, pres, templ, &ivci, 0, false);
275 psurf = zink_get_surface(zink_context(pctx), pres, templ, &ivci);
289 ivci.image = transient->obj->image;
290 csurf->transient = (struct zink_ctx_surface*)wrap_surface(pctx, (struct pipe_surface*)create_surface(pctx, &transient->base.b, templ, &ivci, true));
314 struct hash_entry *he = _mesa_hash_table_search_pre_hashed(&res->surface_cache, surface->hash, &surface->ivci);
354 VkImageViewCreateInfo ivci = surface->ivci;
355 ivci.image = res->obj->image;
356 uint32_t hash = hash_ivci(&ivci);
359 struct hash_entry *new_entry = _mesa_hash_table_search_pre_hashed(&res->surface_cache, hash, &ivci);
371 struct hash_entry *entry = _mesa_hash_table_search_pre_hashed(&res->surface_cache, surface->hash, &surface->ivci);
375 VkResult result = VKSCR(CreateImageView)(screen->dev, &ivci, NULL, &image_view);
382 surface->ivci = ivci;
383 entry = _mesa_hash_table_insert_pre_hashed(&res->surface_cache, surface->hash, &surface->ivci, surface);
451 init_surface_info(surface, res, &surface->ivci);
455 surface->ivci.image = res->obj->image;
456 assert(surface->ivci.image);
457 VKSCR(CreateImageView)(screen->dev, &surface->ivci, NULL, &surface->swapchain[res->obj->dt_idx]);