mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
zink: add color output bit and/or use linear tiling for sampled images
these need to have some way to get data onto them Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9788>
This commit is contained in:
parent
0a0fb85fbe
commit
7edc3f50c1
1 changed files with 10 additions and 0 deletions
|
|
@ -313,6 +313,16 @@ create_ici(struct zink_screen *screen, const struct pipe_resource *templ, unsign
|
|||
|
||||
if (bind & PIPE_BIND_DEPTH_STENCIL)
|
||||
ici.usage |= VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT;
|
||||
/* this is unlikely to occur and has been included for completeness */
|
||||
else if (bind & PIPE_BIND_SAMPLER_VIEW && !(ici.usage & VK_IMAGE_USAGE_TRANSFER_DST_BIT)) {
|
||||
if (feats & VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT)
|
||||
ici.usage |= VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;
|
||||
else {
|
||||
if (ici.tiling != VK_IMAGE_TILING_LINEAR)
|
||||
/* gotta populate this thing somehow */
|
||||
return create_ici(screen, templ, bind | PIPE_BIND_LINEAR);
|
||||
}
|
||||
}
|
||||
|
||||
if (templ->flags & PIPE_RESOURCE_FLAG_SPARSE)
|
||||
ici.usage |= VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue