Skip to content

Conversation

@Adrian1066
Copy link
Contributor

Please read the Contributing guide before making a PR.

Checklist for PR maker

  • Have you added a backport label (if needed)? For example, the need-backport-* label. After you backport the PR, the label changes to backported-*.
  • Have you updated the changelog? Each package has a CHANGELOG.md file.
  • Have you updated or added the documentation for your PR? When you add a new feature, change a property name, or change the behavior of a feature, it's best practice to include related documentation changes in the same PR. If you do add documentation, make sure to add the relevant Graphics Docs team member as a reviewer of the PR. If you are not sure which person to add, see the Docs team contacts sheet.
  • Have you added a graphic test for your PR (if needed)? When you add a new feature, or discover a bug that tests don't cover, please add a graphic test.

Purpose of this PR

In Unity, compute buffers do not support typed buffers. Buffers are all created as structured ( with the exception of indirect arguements )
On some DX12 platforms, using RWBuffer in a shader causes a type mismatch and the shader is invalid.

Corrected the RWBuffer usage to RWStructuredBuffer


Testing status

Testing using the VFX URP/HDRP test suites


Comments to reviewers

Notes for the reviewers you have assigned.

@Adrian1066 Adrian1066 marked this pull request as ready for review March 9, 2021 08:19
@julienf-unity
Copy link
Contributor

julienf-unity commented Mar 9, 2021

Thanks for the fix @Adrian1066. Spotlight logged a bug regarding this: https://fogbugz.unity3d.com/f/cases/1318400/
It was transparent on DX11 (well at least with most drivers) but the debug layer was complaining.
Might explain some other logged issues/crashes we have with that experimental feature as well.

@sebastienlagarde sebastienlagarde merged commit e9dc1f7 into master Mar 9, 2021
@sebastienlagarde sebastienlagarde deleted the platform/dx12/vfx-rwbuffer-fix branch March 9, 2021 09:40
sebastienlagarde pushed a commit that referenced this pull request Mar 9, 2021
sebastienlagarde pushed a commit that referenced this pull request Mar 9, 2021
* Use RWStructuredBuffer for strip data

* Update CHANGELOG.md
sebastienlagarde added a commit that referenced this pull request Mar 26, 2021
* Updating raytracing #include files to match the case they are on disk so that these shaders will pass the new pre-commit git hooks.

* Update any #pragma only_renderers that support ps4 to supporting both ps4 and ps5.

* Add PS5 support for GraphicsDeviceType queries.

* Add PS5 support for RuntimePlatform and BuildTarget

* Switch to using separate PS4 and PS5 render pipeline. Docs, changelogs and remaining changes from the master PR.

* Update minimum Unity editor version to 2019.4.23f1 to match the version that PlayStation 5 is added into the enums.

* Update CHANGELOG.md

* [VFX] Fixed Platform/dx12/vfx rwbuffer fix #3797

* Create ValidationExceptions.json

* update screenshots

* Create ValidationExceptions.json.meta

* Update 8101_Opaque.png

Co-authored-by: Sebastien Lagarde <[email protected]>
Co-authored-by: Adrian1066 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants