anv: Apply pipe flushes for outstanding PC bits
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

Apply any outstanding accumulated PC bits before we proceed on building
Acceleration Structure.

2 reasons for this :
   - some of the data accessed by the build might need to be flushed
     as a result of a previous barrier
   - the scratch buffer might get reused between builds

Cc: mesa-stable
Closes: #13711
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Tested-by: Caleb Callaway <caleb.callaway@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36951>
This commit is contained in:
Sagar Ghuge 2025-08-28 22:21:22 -07:00 committed by Marge Bot
parent e9cd8ebb16
commit 90daa80d1d

View file

@ -647,6 +647,16 @@ genX(CmdBuildAccelerationStructuresKHR)(
ANV_CMD_SAVED_STATE_DESCRIPTOR_SET_ALL |
ANV_CMD_SAVED_STATE_PUSH_CONSTANTS, &saved);
/* Apply any outstanding accumulated PC bits before we proceed on building
* Acceleration Structure.
*
* 2 reasons for this :
* - some of the data accessed by the build might need to be flushed as a
* result of a previous barrier
* - the scratch buffer might get reused between builds
*/
genX(cmd_buffer_apply_pipe_flushes)(cmd_buffer);
vk_cmd_build_acceleration_structures(commandBuffer, &device->vk,
&device->meta_device, infoCount,
pInfos, ppBuildRangeInfos,