fix SPD_AtomicCounter buffer stride to match with shader src#189
Open
repelliuss wants to merge 1 commit into
Open
fix SPD_AtomicCounter buffer stride to match with shader src#189repelliuss wants to merge 1 commit into
repelliuss wants to merge 1 commit into
Conversation
diff --git a/sdk/src/components/spd/ffx_spd.cpp b/sdk/src/components/spd/ffx_spd.cpp index 323bd44..b5ac5c6 100644 --- a/sdk/src/components/spd/ffx_spd.cpp +++ b/sdk/src/components/spd/ffx_spd.cpp @@ -348,7 +348,7 @@ static FfxErrorCode spdCreate(FfxSpdContext_Private* context, const FfxSpdContex // Create the atomic buffer resource used as a counter in SPD uint32_t atomicInitData[6] = { 0U, 0U, 0U, 0U, 0U, 0U }; const FfxInternalResourceDescription internalSurfaceDesc = { FFX_SPD_RESOURCE_IDENTIFIER_INTERNAL_GLOBAL_ATOMIC, L"SPD_AtomicCounter", FFX_RESOURCE_TYPE_BUFFER, FFX_RESOURCE_USAGE_UAV, - FFX_SURFACE_FORMAT_UNKNOWN, 6 * sizeof(uint32_t), sizeof(uint32_t), 1, FFX_RESOURCE_FLAGS_NONE, sizeof(atomicInitData),& atomicInitData}; + FFX_SURFACE_FORMAT_UNKNOWN, 6 * sizeof(uint32_t), 6 * sizeof(uint32_t), 1, FFX_RESOURCE_FLAGS_NONE, sizeof(atomicInitData),& atomicInitData}; // Clear the SRV resources to NULL. memset(context->srvResources, 0, sizeof(context->srvResources));
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FFX_SPD_BIND_UAV_INTERNAL_GLOBAL_ATOMIC buffer descriptor stride was 4 bytes while it is defined to be 24 bytes in HLSL. The fix removed the validation errors I encountered with D3D.
The reason I opened this PR to release branch is that main branch no longer host the SPD source code for some reason.