summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-01-25docs: Lower Python requirement to 3.6Chad Versace1-1/+1
Issue 7716 bumped the Python requirement from 3.6 to 3.7 for two reasons. They are now non-issues. - Usage of f-strings. But f-strings are a 3.6 feature. - Usage of `from __future__ import annotations`. But the previous commit removes that usage. See: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7716 See: 5cf862fbb9 ("docs: update Python requirement to 3.7") Acked-by: Eric Engestrom <eric@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20237>
2023-01-25util/glsl2spirv: Fix build with Python 3.6Chad Versace1-6/+4
ChromeOS still uses Python 3.6, but the glsl2spirv script uses module '__future__.annotations', introduced in Python 3.7. Fix the build by removing module, but otherwise preserve the type annotations. Fixes: 949c3b55db ("util/glsl2spirv: add type annotations") Acked-by: Eric Engestrom <eric@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20237>
2023-01-03vulkan/runtime: Preserve pNext when upgrading to synchronization2 structsChad Versace1-0/+3
The functions that upgraded VkFooMemoryBarrier to VkFooMemoryBarrier2 dropped the pNext pointers. It loses VkSampleLocationsInfoEXT, and may lose additional structs too if VkFooMemoryBarrier receives further extensions in the future. Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20477>
2022-12-16anv: Use vma_heap for descriptor pool host allocationChad Versace2-49/+37
Pre-patch, anv_descriptor_pool used a free list for host allocations that never merged adjacent free blocks. If the pool only allocated fixed-sized blocks, then this would not be a problem. But the pool allocations are variable-sized, and this caused over half of the pool's memory to be consumed by unusable free blocks in some workloads, causing unnecessary memory footprint. Replacing the free list with util_vma_heap, which does merge adjacent free blocks, fixes the memory explosion in the target workload. Disdavantges of util_vma_heap compared to the free list: - The heap calls malloc() when a new hole is created. - The heap calls free() when a hole disappears or is merged with an adjacent hole. - The Vulkan spec expects descriptor set creation/destruction to be thread-local lockless in the common case. For workloads that create/destroy with high frequency, malloc/free may cause overhead. Profiling is needed. Tested with a ChromeOS internal TensorFlow benchmark, provided by package 'tensorflow', running with its OpenCL backend on clvk. cmdline: benchmark_model --graph=mn2.tflite --use_gpu=true --min_secs=60 gpu: adl memory footprint from start of benchmark: before: init=132.691MB max=227.684MB after: init=134.988MB max=134.988MB Reported-by: Romaric Jodin <rjodin@google.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20289>
2022-12-16util/vma: Track size of free memory in heapChad Versace2-7/+22
This allows users to detect fragmentation on allocation failure. If heap allocation fails but the allocation size is not larger than the total free size, then the allocation failed due to fragmentation. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20289>
2022-10-12venus: Enable Vulkan 1.3Chad Versace2-4/+4
Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Ryan Neph <ryanneph@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19046>
2022-10-12venus: Enable VK_KHR_synchronization2Chad Versace5-2/+475
Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Ryan Neph <ryanneph@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19046>
2022-10-12venus: Refactor vn_command_buffer_builder temp storageChad Versace2-17/+26
Easy refactor. Change the storage type from `VkImageMemoryBarrier *` to `void *`. Prepares for VK_KHR_synchronization2. The patch series is cleaner with this refactor. I promise. Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Ryan Neph <ryanneph@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19046>
2022-10-12venus: Add vn_queue_wait_idle_before_present()Chad Versace1-10/+16
Trivial refactor. Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Ryan Neph <ryanneph@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19046>
2022-10-12venus: Change signature of vn_get_fence_feedback_cmdChad Versace1-7/+6
Trivial refactor. Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Ryan Neph <ryanneph@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19046>
2022-10-12venus/queue: Rename some local varsChad Versace1-4/+5
Reduces noise in following patches. Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Ryan Neph <ryanneph@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19046>
2022-09-14venus: Use VkPhysicalDeviceVulkan13{Features,Properties}Chad Versace3-69/+188
Add the structs to vn_physical_device, just like we do for the 1.1 and 1.2 structs. Prepares for Vulkan 1.3 enablement. No intended change in behavior. Tested with gpu Intel Tigerlake on CrOS device volteer. I tested only a small subset of dEQP because this branch only touches the code for VkPhysicalDevice{Features2,Properties2}. vulkan-cts-1.3.3.0 dEQP-VK.api.info.* dEQP-VK.api.smoke.* pass/skip/fail = 3796/9/0 I tested Dota 2 on borealis on volteer, with non-Proton Vulkan. The game launches and reaches the main menu. Same with Hades with DX on Proton 7. Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18158>
2022-09-14venus: Fix features/properties for unavailable extensionsChad Versace1-23/+40
In vn_physical_device_init_features() and vn_physical_device_init_properties(), we queried many extension structs even if the extension was unavailable. Afterwards we copied the undefined values from the extension structs into the core structs. Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18158>
2022-09-14venus: Add macros VN_SET_CORE_*Chad Versace1-315/+191
Used to refactor vn_physical_device.c. The new code easier to read and has less duplication. Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18158>
2022-09-14venus: Refactor VN_ADD_TO_PNEXTChad Versace1-187/+99
Motivation is easier sorting and readability. - In VN_ADD_TO_PNEXT_OF, re-arrange params to allow sorting. Param1 is invariant in each block. Param2 is sType. - In VN_ADD_EXT_TO_PNEXT_OF, make its initial params match those of VN_ADD_TO_PNEXT_OF. - Then sort the macro calls. Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18158>
2022-09-14venus: Rename some feature/property structsChad Versace2-22/+27
Make the variable name more closely match the type name. This also allows them to sort correctly. argb_4444_formats -> _4444_formats eight_bit_storage -> _8bit_storage sixteen_bit_storage -> _16bit_storage While touching vn_physical_device.[ch], also run clang-format. Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18158>
2022-09-08venus: Enable VK_EXT_pipeline_creation_feedbackChad Versace3-7/+50
Implement natively by always returning invalid feedback. This is a legal (but useless) implementation according to the spec. In the future, I want to return the real feedback values from the host, but that requires changes to the venus protocol. The protocol does not know that the VkPipelineCreationFeedback structs in the VkGraphicsPipelineCreateInfo pNext are output parameters. Before VK_EXT_pipeline_creation_feedback, the pNext chain was input-only. Tested with `dEQP-VK.pipeline.*.creation_feedback.*`. The tests in vulkan-cts-1.3.3.0 are buggy. I submitted a fix to dEQP upstream; see below. Results with the bug: Passed: 0/30 ( 0.0%) Failed: 12/30 (40.0%) Not supported: 18/30 (60.0%) Warnings: 0/30 ( 0.0%) Results with bugfix: Passed: 12/30 (40.0%) Failed: 0/30 ( 0.0%) Not supported: 18/30 (60.0%) Warnings: 0/30 ( 0.0%) See: https://gerrit.khronos.org/c/vk-gl-cts/+/10086 See: https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/909 Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Signed-off-by: Chad Versace <chadversary@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18035>
2022-08-30venus: Document VK_EXT_texture_compression_astc_hdr supportChad Versace1-0/+1
Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Ryan Neph <ryanneph@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18000>
2022-08-30venus: Enable VK_EXT_tooling_infoChad Versace3-0/+8
Implement it locally with the common implementation. Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Ryan Neph <ryanneph@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18000>
2022-08-30venus: Enable VK_EXT_private_dataChad Versace3-1/+22
Implement it as hybrid native/passthrough as a workaround until venus learns how to deep surgery on pNext chains. Eventually, we want to implement it purely natively. For details, see the big code comment. See: https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/908 Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Ryan Neph <ryanneph@google.com> Signed-off-by: Chad Versace <chadversary@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18000>
2022-08-30venus: Enable VK_KHR_format_feature_flags2Chad Versace2-1/+2
Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Ryan Neph <ryanneph@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18000>
2022-08-30venus: Enable VK_EXT_ycbcr_2plane_444_formatsChad Versace3-0/+7
Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Ryan Neph <ryanneph@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18000>
2022-08-30venus: Enable VK_EXT_texel_buffer_alignmentChad Versace3-1/+12
The patch looks asymmetic because the extension was promoted to 1.3 but not its feature struct. Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Ryan Neph <ryanneph@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18000>
2022-08-30venus: Enable VK_EXT_subgroup_size_controlChad Versace3-1/+12
Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Ryan Neph <ryanneph@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18000>
2022-08-30venus: Enable VK_KHR_zero_initialize_workgroup_memoryChad Versace3-1/+8
Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Ryan Neph <ryanneph@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18000>
2022-08-30venus: Enable VK_KHR_shader_terminate_invocationChad Versace3-1/+8
Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Ryan Neph <ryanneph@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18000>
2022-08-30venus: Enable VK_KHR_shader_non_semantic_infoChad Versace2-1/+2
This extension has no Vulkan API, only SPIR-V API. Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Ryan Neph <ryanneph@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18000>
2022-08-30venus: Enable VK_KHR_shader_integer_dot_productChad Versace3-1/+13
Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Ryan Neph <ryanneph@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18000>
2022-08-30venus: Simplify vn_GetPhysicalDeviceProperties2Chad Versace1-274/+54
Reduce approximately 220 lines to 80. Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Ryan Neph <ryanneph@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18000>
2022-08-30venus: Simplify vn_GetPhysicalDeviceFeatures2Chad Versace1-286/+40
Reduce approximately 300 lines to 60. Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Ryan Neph <ryanneph@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18000>
2022-08-30vulkan: Make vk_copy_struct_guts() publicChad Versace2-13/+12
Venus wants to copy struct guts too. Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Ryan Neph <ryanneph@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18000>
2022-08-30venus: Sort passthrough extensionsChad Versace1-3/+3
Only the Vulkan 1.3 extensions were unsorted. Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Ryan Neph <ryanneph@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18000>
2022-08-24venus: Enable VK_EXT_pipeline_creation_cache_controlChad Versace4-9/+78
The extension disrupts assumptions in venus. It gives vkCreateFooPipelines an additional success code, VK_PIPELINE_COMPILE_REQUIRED, which allows some pipelines to succeed creation and others fail. Tested with 'dEQP-VK.*cache_control*' at vulkan-cts-1.3.3.1. pass/fail/skip/warn = 15/0/0/3 Warnings were from long pipeline compiles on a full debug build in host and guest. See: https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/890 Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Ryan Neph <ryanneph@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17847>
2022-08-24venus: Fix failure path on pipeline creationChad Versace1-1/+3
It's not sufficient to vk_free() the pipeline. We must also vn_object_base_fini(). Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Ryan Neph <ryanneph@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17847>
2022-08-24venus: Dedupe pipeline handle creationChad Versace1-35/+34
Refactor the code into new function vn_create_pipeline_handles(). Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Ryan Neph <ryanneph@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17847>
2022-08-10venus/pipeline: Fix ignore rules for VK_EXT_extended_dynamic_stateChad Versace1-5/+14
Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16681>
2022-08-10venus/pipeline: Fix ignore rules for VK_KHR_dynamic_renderingChad Versace1-13/+50
Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16681>
2022-08-10venus/pipeline: Ignore basePipelineHandleChad Versace1-0/+13
Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16681>
2022-08-10venus/pipeline: Ignore pViewportState::pScissorsChad Versace1-5/+34
Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16681>
2022-08-10venus/pipeline: Ignore pViewportState::pViewportsChad Versace1-0/+34
Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16681>
2022-08-10venus/pipeline: Fix ignore rule for pColorBlendStateChad Versace1-14/+13
The ignore logic was too eager. We must inspect the subpass. Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16681>
2022-08-10venus/pipeline: Fix ignore rule for pDepthStencilStateChad Versace1-5/+27
The ignore logic was too eager. We must inspect the subpass. Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16681>
2022-08-10venus/pipeline: Split ignore rules for pViewportState, pMultisampleStateChad Versace1-8/+29
The ignore rules for VkGraphicsPipelineCreateInfo::pViewportState, pMultisampleState, pDepthStencilState, and pColorBlendState, they were all lumped together under a single ignore rule. Split them out because the rules for pDepthStencilState and pColorBlendState should be different. Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16681>
2022-08-10venus/pipeline: Add pipeline state bools for ignore rulesChad Versace1-15/+71
For each pipeline state category, we define a bool. The Vulkan spec (1.3.223) says: The state required for a graphics pipeline is divided into vertex input state, pre-rasterization shader state, fragment shader state, and fragment output state. This patch merely defines the bools and does a minor refactor. It does not add new ignore rules. Without VK_EXT_graphics_pipeline_library, most states are unconditionally included in the pipeline. Despite that, we still reference the state bools in the ignore rules because (a) it makes the ignore condition easier to validate against the text of the relevant VUs; and (b) it makes it easier to enable VK_EXT_graphics_pipeline_library because we won't need to carefully revisit the text of each VU to add the missing pipeline state bools. Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16681>
2022-08-10venus/pipeline: Refactor vn_fix_graphics_pipeline_create_infoChad Versace1-46/+53
- Instead of deferring all fixes until we inspect all pCreateInfos, fix each pCreateInfo immediately after we inspect it. - Do not allocate vn_graphics_pipeline_create_info_fix. - Add a struct to hold the temporary allocation of fixed pCreateInfos. Later commits will place more vk structs here. Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16681>
2022-08-10venus: Track subpass propertiesChad Versace2-4/+32
Needed to fix the ignore rules for VkGraphicsPipelineCreateInfo::pColorBlendState and ::pDepthStencilState. Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16681>
2022-08-10venus: Drop vn_present_src_attachment::acquireChad Versace3-12/+12
The field is redundant. Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16681>
2022-08-10venus: Remove cryptic pointer arithmetic on present attachmentsChad Versace3-47/+78
Each time some code wanted to access in vn_render_pass the present acquire attachments or the present release attachments, it needed to know the memory layout of vn_render_pass and do pointer arithmetic. It's fragile to handroll this layout knowledge and pointer arithmetic throughout the code, so add a pointer in vn_render_pass for each attachment type. The new pointers are: - present_attachments: all present attachments - present_acquire_attachments: a subslice of present_attachments - present_release_attachments: a subslice of present_attachments Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16681>
2022-05-17venus: Don't encode ignored pTessellationStateChad Versace1-0/+20
The spec says that VkGraphicsPipelineCreateInfo::pTessellationState is ignored and may be an invalid pointer in some cases. When ignored, patch the pCreateInfo with `pTessellationState = NULL`, so the encoder doesn't attempt to encode an invalid pointer. Tested in Borealis, with debug build of venus, with a minimal test app that sets `.pTesselationState = 0x17`. Pre-patch, the app crashes; post-patch, the app works. Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16284>
2022-05-17venus: Refactor vn_fix_graphics_pipeline_create_infoChad Versace1-20/+55
We currently do only a single fix. Prepare to do multiple independent fixes. Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16284>