This function fails if the counter overflows.
CP77 hits this case a lot and we should just warn the specific failure
instead of a random error.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Potentially reduces the size of the query map, and makes each entry
versioned so that we no longer have to clear the entire map for multiple
dispatches even if it is sparsely populated.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
If we need to fallback in both VRS and non-VRS scenarios, we need to key
on it. Fixes segfault in DIRT5 when toggling VRS.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
The ordinals except for D3D12CreateDevice and GetDebugInterface are not
part of the ABI apparently.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
If we don't find a clear association to an entry point,
we can also find it in the hit group.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
parameter_count == NumParameters for local RS since
hoisting is explicitly ignored for those.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
With RTPSOs we might have to create static sampler sets for local root
signatures. In this case we will have to create a compatible pipeline
layout which is equal to global pipeline layout, except for an extra
set.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Useful for test suite since a test can be comprised of several smaller
submissions, and it's easier to debug if we have one trace.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
If we deduce that fallback heap allocation is impossible, we will accept
this, and defer allocation to CreatePlacedResource() instead where we make a committed resource.
This breaks aliasing, but in practice, this situation will only arise for render
targets, and it's not like we have a choice in the matter here on NV :\
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
When allocating dedicated memory, ignore heap_flag requirements we
deduce from memory info. Any memory type is allowed. This is important
on NV when allocating fallback render targets.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
There are situations where we cannot fallback to system memory, so don't
log that we're going to do so.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Don't attempt to enter memory allocation when we can invalidate a heap
allocation up front. Avoids some dumb edge cases later.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Many UE4 games have this broken bloom shader that samples a texture with implicit lod in divergent control flow.
Fixes Bus Simulator 21
Signed-off-by: Joshua Ashton <joshua@froggi.es>
Width + offset must not overflow in SPIR-V. SM 5+ is well-defined here.
It's enough to just clamp the width against 32 - offset in all cases.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Need to use fallback pipeline system here.
Keep track of active masks for PSO and current render target.
The intersection of those sets are the attachments which should be
active in the render pass.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Fix failure in test_create_heap where a TIER_2 host visible heap was
attempted, but failed due to recent DEATHLOOP fixes.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>