The MAX_MIP_LEVEL field needs the actual number from the image because
it's used to compute the stride between layers. The restrictions on mip
level come entirely from the RES_VIEW fields.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Previously, it was treated as luminance and the depth or stencil
component was broadcast to all channels except alpha. In Vulkan, depth
and stencil textures are treated as red. If we want it treated
differntly by some other API, that driver can do that with a swizzle.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Instead of invoking the meta code, implement it ourselves so we get the
HW clear path. We could probably put these implementations somewhere
common since they only set up a few things and invoke Begin/EndRendering
but there's not that much point for now.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Fixes the following building error:
../src/vulkan/runtime/vk_meta_clear.c:213:42: error: use of GNU empty initializer extension [-Werror,-Wgnu-empty-initializer]
struct vk_meta_clear_push_data push = { };
^
1 error generated.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
KHR_get_memory_requirements2 was enabled but GetImageMemoryRequirem
ents2 was not. This stubs out GetImageMemoryRequirements2 to fix it.
Signed-off-by: Yusuf Khan <yusisamerican@gmail.com>
v2: remove the v1 version of the command as its provided by the
common runtime
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
vulkan spec says:
If the memory object is allocated from a heap with the
VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT bit set, that object’s
backing memory may be provided by the implementation lazily. The
actual committed size of the memory may initially be as small as
zero (or as large as the requested size), and monotonically
increases as additional memory is needed.
As far as I can tell we ignore the bit meaning that we allocate the
requested size so return that as the size.
Signed-off-by: Yusuf Khan <yusisamerican@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
This values was found by trial-and-error poking at the hardware until it
stopped complaining. It's not clear if we need separate values for
compressed vs. not. This appears to work on Turing regardless of what
we set for SET_Z_COMPRESSION.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
The bits are already in the table we copied from the nouveau GL drivers,
we just need to set up some enums and plumb it through. With that,
we're now properly advertising which formats are renderable.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Also, add a helper for depth/stencil formats and use
nil_format_supports_color_targets() helper to compute Vulkan format
features rather than checking for a non-zero color format.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>