Skip to content

[HDRP] Fix AxF carpaint compilation issue on Vulkan #4691

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed a memory leak related to not disposing of the RTAS at the end HDRP's lifecycle.
- Fixed overdraw in custom pass utils blur and Copy functions (case 1333648);
- Fixed invalid pass index 1 in DrawProcedural error.
- Fixed a compilation issue for AxF carpaints on Vulkan (case 1314040).

### Changed
- Changed Window/Render Pipeline/HD Render Pipeline Wizard to Window/Rendering/HDRP Wizard
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,23 @@ struct TextureUVMapping
#endif

#define GETSURFACEANDBUILTINDATA_RAYCONE_PARAM ((RayCone)0)
#define AXF_CALCULATE_TEXTURE2D_LOD(a,b,c,duvdx,duvdy,scales,texelSize,rayCone) CALCULATE_TEXTURE2D_LOD(a,b,c)

#if !defined(SHADER_API_VULKAN)
#define AXF_CALCULATE_TEXTURE2D_LOD(a,b,c,duvdx,duvdy,scales,texelSize,rayCone) CALCULATE_TEXTURE2D_LOD(a,b,c)
#else
// case 1335737: For Vulkan, our HLSLcc is missing an overloaded version when the texture object is a Texture2DArray.
// This won't create a problem anyway if we use gradients instead of LOD sampling, we just make sure the shader is
// configured as such on this platform. We also place a dummy macro since although eventually optimized out, HLSLcc
// will fail before the optimization prunes it out.
#define AXF_CALCULATE_TEXTURE2D_LOD(a,b,c,duvdx,duvdy,scales,texelSize,rayCone) (0)

#ifndef FLAKES_USE_DDXDDY
#define FLAKES_USE_DDXDDY
#endif

#endif // #if !defined(SHADER_API_VULKAN)

#else
//-----------------------------------------------------------------------------
//defined(SHADER_STAGE_RAY_TRACING)

Expand Down