Open jkwak-work opened 6 days ago
I wonder if we should add a stub for CheckAccessFullyMapped() so code that uses status
can compile (status
is useless without CheckAccessFullyMapped()
, so these functions appear in pairs)?
I wonder if we should add a stub for CheckAccessFullyMapped() so code that uses
status
can compile (status
is useless withoutCheckAccessFullyMapped()
, so these functions appear in pairs)?
After looking into what status
means across platforms, CheckAccessFullyMapped()
must be added for tiled/sparse memory accesses to work properly since they signify if the access done was undefined behavior (not all memory is resident with sparse allocations) or not.
HLSL: CheckAccessFullyMapped()
GLSL: sparseTexelsResidentARB()
with extension GL_ARB_sparse_texture2
SPIRV: OpImageSparseTexelsResident
with capability OpCapability SparseResidency
Thanks to Ariel. I didn't realize that the status is for the partial resident texture. That is a very important feature that many of triple A games make use of. We definitely should consider supporting it fully.
I think we need a new issue for fully supporting the partial resident texture feature.
This PR is to address the missing status
for Gather functions.
I think we need a new issue for fully supporting the partial resident texture feature. This PR is to address the missing status for Gather functions.
If we haven't meaningfully implemented status for Vulkan, we should make it a capability error instead of silently implement it in an incorrect way, that will make it hard for users to identify the problem.
I pushed a change to apply the capability check so that only HLSL will be allowed to use the status variant. However, it seems that there is a bug that VK can still run the function with no problem. I asked @ArielG-NV to take a look.
I pushed a change to apply the capability check so that only HLSL will be allowed to use the status variant. However, it seems that there is a bug that VK can still run the function with no problem. I asked @ArielG-NV to take a look.
I looked into it, looks like there are 2 issues causing this bug (so far from what I see):
texture_gather
has incorrect capabilities (missing hlsl
due to joining an any_target
with a spirv | glsl | metal
)validateAttribute
of RequireCapabilityAttribute
never checks if the capability produced is invalid or not. This should be an error.What happens in this scenario is: texture_gather
is missing hlsl
, so [require(hlsl, texure_gather)]
resolves into Invalid
, which is not supposed to be possible, causing problems.
I will make an issue for this.
@jkwak-work do you want the fix to be in a separate PR or apart of your jkwak-work:feature/support_GatherAlpha_with_status_argument
branch (I can make a PR to your branch)?
Seems there is a third issue(?): __target_switch
never compares case:
capabilities to the parent [require(...)]
This means incorrect capabilities may be labeled by a user for a function
@jkwak-work do you want the fix to be in a separate PR or apart of your
jkwak-work:feature/support_GatherAlpha_with_status_argument
branch (I can make a PR to your branch)?
I think your PR #4510 will have the fix, right? I will wait for your PR to be merged first and make sure CI goes all green with my PR. Thanks for fixing the issue so promptly.
This commit adds an argument to all texture GatherXXX functions. The new argument is for "status" as described in SM5.0 definision.
Close #4466