From 9fb3564410d9e996f089197a9cf834dbbb133296 Mon Sep 17 00:00:00 2001 From: Vlad Sytchenko Date: Thu, 23 Apr 2020 16:38:32 -0400 Subject: [PATCH] Make sure to zero out all the unset texture fields These might contain garbage causing the runtime to incorrectly parse the state of the texture references. Change-Id: I93c726fa30b580b3e14c50ac939f3c71b0d1c8d9 [ROCm/clr commit: bfa363d00c8a6d51221bfd9dc32b13e9791831b8] --- .../clr/hipamd/include/hip/hcc_detail/hip_texture_types.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/projects/clr/hipamd/include/hip/hcc_detail/hip_texture_types.h b/projects/clr/hipamd/include/hip/hcc_detail/hip_texture_types.h index e92babfd5a..7c3a0138c1 100644 --- a/projects/clr/hipamd/include/hip/hcc_detail/hip_texture_types.h +++ b/projects/clr/hipamd/include/hip/hcc_detail/hip_texture_types.h @@ -65,6 +65,10 @@ struct __HIP_TEXTURE_ATTRIB texture : public textureReference { channelDesc = hipCreateChannelDesc(); sRGB = 0; textureObject = nullptr; + maxAnisotropy = 0; + mipmapLevelBias = 0; + minMipmapLevelClamp = 0; + maxMipmapLevelClamp = 0; } texture(int norm, enum hipTextureFilterMode fMode, enum hipTextureAddressMode aMode, @@ -78,6 +82,10 @@ struct __HIP_TEXTURE_ATTRIB texture : public textureReference { channelDesc = desc; sRGB = 0; textureObject = nullptr; + maxAnisotropy = 0; + mipmapLevelBias = 0; + minMipmapLevelClamp = 0; + maxMipmapLevelClamp = 0; } };