mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 11:08:03 +02:00
lavapipe: set some basic usage-flags
Setting these avoids a few warnings while running glxgears on Zink on Lavapipe. There's a lot more flags to set here, but this is better than nothing. Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7879>
This commit is contained in:
parent
870724d43b
commit
843a56324a
1 changed files with 10 additions and 0 deletions
|
|
@ -67,6 +67,12 @@ lvp_image_create(VkDevice _device,
|
|||
break;
|
||||
}
|
||||
|
||||
if (pCreateInfo->usage & VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT)
|
||||
template.bind |= PIPE_BIND_RENDER_TARGET;
|
||||
|
||||
if (pCreateInfo->usage & VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT)
|
||||
template.bind |= PIPE_BIND_DEPTH_STENCIL;
|
||||
|
||||
template.format = vk_format_to_pipe(pCreateInfo->format);
|
||||
template.width0 = pCreateInfo->extent.width;
|
||||
template.height0 = pCreateInfo->extent.height;
|
||||
|
|
@ -249,6 +255,10 @@ VkResult lvp_CreateBuffer(
|
|||
{
|
||||
struct pipe_resource template;
|
||||
memset(&template, 0, sizeof(struct pipe_resource));
|
||||
|
||||
if (pCreateInfo->usage & VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT)
|
||||
template.bind |= PIPE_BIND_CONSTANT_BUFFER;
|
||||
|
||||
template.screen = device->pscreen;
|
||||
template.target = PIPE_BUFFER;
|
||||
template.format = PIPE_FORMAT_R8_UNORM;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue