Draft: VK_EXT_conditional_rendering
The current approach evaluates the value in the buffer and the invert value with a MME macro in CmdBeginConditionalRenderingEXT. The result is stored in a shadow scratch. The MME macros for the relevant Draw/Dispatch/ClearAttachments functions then check the shadow scratch values and exits the macro early if the shadow scratch value is set.
This works well for the calls that are using MME macros. Some things, like the PCAS in CmdDispatchIndirect are not written as macros. For these the current approach does not work. Perhaps these could be moved to a MME macro, but there is no NVA0C0_CALL_MME_MACRO so I am not sure if that can be done.
An alternative is to use SET_RENDER_ENABLE* instead. The problems with this is that we cannot pass the buffer we receive directly to it. We have to account for the invert value, and I think the alignment is also not correct. The buffer we get is 32 bit, and when testing it out without considering the invert I often got errors in DMESG that the address was not valid. If this is they way we want to go then I could use a hint about how I would create a new buffer in CmdBeginConditionalRenderingEXT to store the value in.