There's an intermittent flushing problem with VkEvent that we need to
root cause. For now, using the snooping feature keeps the memory pools
up to date with GPU writes and fixes the problem.
We can't use the more fine-grained load and store fence commands (lfence
and mfence), since clflush is only guaranteed to be ordered with respect
to mfence.
The attachments should be const, but the driver's function signatures
are generally not const-friendly.
Drop the const because it conflicts with upcoming
anv_cmd_buffer_resolve_subpass().
SKL has a workaround which requires either some weird programming of buffer 3,
OR, just never using buffer 0. Since we don't actually use multiple constant
buffers, it's easier to just not use 0.
Only SKL requires this workaround, but there is no harm in applying it to all
platforms. The big change here is that buffer #0 is relative to dynamic state
base normally (depending upon ISTPM), where buffer 1-3 is a GPU virtual address.
Remove all the fine-grained cleanup in
anv_device_init_meta_clear_state(). Instead, if anything fails during
initialization, simply call anv_device_finish_meta_clear_state() and let
it clean up the partially initialized anv_meta_state::clear.
This handles multisample color images that have a floating-point or
normalized format and have a single array layer.
This does not yet handle integer formats nor multisample array images.
As far as I can tell, this patch sets all pipeline multisample state
except:
- alpha to coverage
- alpha to one
- the dispatch count for per-sample dispatch
The extent previously was supposed to match the mip at a given level
under the assumption that the base address would be that of the mip
as well.
Now however, the base address only matches the offset of the
containing tile. Therefore, enlarge the extent to match that of
phys_slice0, so that we don't draw/fetch in out of bounds territory.
This solution isn't perfect because the base adress isn't always at
the first tile, therefore the assumed valid memory region by the HW
contains some number of invalid tiles on two edges.
Use a custom VkBufferImageCopy with the user-provided struct as
the base. A few fields are modified when the iview is uncompressed
and the underlying image is compressed.
When creating an uncompressed ImageView on an compressed Image, the
SurfaceFormat is updated to match the ImageView's. The surface
dimensions must also change so that the HW sees the same size image
instead of a 4x larger one.
Fixes the following error which results from running many VulkanCTS
compressed tests in one shot:
ResourceError (vk.queueSubmit(queue, 1, &submitInfo, *m_fence):
VK_ERROR_OUT_OF_DEVICE_MEMORY at
vktPipelineImageSamplingInstance.cpp:921)
Makes all compressed format tests with a height > 1 pass.