Commit d66736a8 by Ben Clayton Committed by Ben Clayton

Silence warnings: Remove bit-packing of Vulkan state

This produces a non-silenceable warning about enum fields being too small to store all enum values. Nicolas agreed we can just drop the bitpacking for vulkan state. Bug: b/123933266 Change-Id: Idf09be3ef122fca70da8d877a211368b7fd8a995 Reviewed-on: https://swiftshader-review.googlesource.com/c/25013Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarChris Forbes <chrisforbes@google.com> Tested-by: 's avatarBen Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
parent 226e1c60
...@@ -34,51 +34,51 @@ namespace sw ...@@ -34,51 +34,51 @@ namespace sw
int shaderID; int shaderID;
VkCompareOp depthCompareMode : BITS(VK_COMPARE_OP_END_RANGE); VkCompareOp depthCompareMode;
VkCompareOp alphaCompareMode : BITS(VK_COMPARE_OP_END_RANGE); VkCompareOp alphaCompareMode;
bool depthWriteEnable : 1; bool depthWriteEnable;
bool quadLayoutDepthBuffer : 1; bool quadLayoutDepthBuffer;
bool stencilActive : 1; bool stencilActive;
VkCompareOp stencilCompareMode : BITS(VK_COMPARE_OP_END_RANGE); VkCompareOp stencilCompareMode;
VkStencilOp stencilFailOperation : BITS(VK_STENCIL_OP_END_RANGE); VkStencilOp stencilFailOperation;
VkStencilOp stencilPassOperation : BITS(VK_STENCIL_OP_END_RANGE); VkStencilOp stencilPassOperation;
VkStencilOp stencilZFailOperation : BITS(VK_STENCIL_OP_END_RANGE); VkStencilOp stencilZFailOperation;
bool noStencilMask : 1; bool noStencilMask;
bool noStencilWriteMask : 1; bool noStencilWriteMask;
bool stencilWriteMasked : 1; bool stencilWriteMasked;
bool twoSidedStencil : 1; bool twoSidedStencil;
VkCompareOp stencilCompareModeCCW : BITS(VK_COMPARE_OP_END_RANGE); VkCompareOp stencilCompareModeCCW;
VkStencilOp stencilFailOperationCCW : BITS(VK_STENCIL_OP_END_RANGE); VkStencilOp stencilFailOperationCCW;
VkStencilOp stencilPassOperationCCW : BITS(VK_STENCIL_OP_END_RANGE); VkStencilOp stencilPassOperationCCW;
VkStencilOp stencilZFailOperationCCW : BITS(VK_STENCIL_OP_END_RANGE); VkStencilOp stencilZFailOperationCCW;
bool noStencilMaskCCW : 1; bool noStencilMaskCCW;
bool noStencilWriteMaskCCW : 1; bool noStencilWriteMaskCCW;
bool stencilWriteMaskedCCW : 1; bool stencilWriteMaskedCCW;
bool depthTestActive : 1; bool depthTestActive;
bool occlusionEnabled : 1; bool occlusionEnabled;
bool perspective : 1; bool perspective;
bool depthClamp : 1; bool depthClamp;
bool alphaBlendActive : 1; bool alphaBlendActive;
VkBlendFactor sourceBlendFactor : BITS(VK_BLEND_FACTOR_END_RANGE); VkBlendFactor sourceBlendFactor;
VkBlendFactor destBlendFactor : BITS(VK_BLEND_FACTOR_END_RANGE); VkBlendFactor destBlendFactor;
VkBlendOp blendOperation : BITS(VK_BLEND_OP_BLUE_EXT); VkBlendOp blendOperation;
VkBlendFactor sourceBlendFactorAlpha : BITS(VK_BLEND_FACTOR_END_RANGE); VkBlendFactor sourceBlendFactorAlpha;
VkBlendFactor destBlendFactorAlpha : BITS(VK_BLEND_FACTOR_END_RANGE); VkBlendFactor destBlendFactorAlpha;
VkBlendOp blendOperationAlpha : BITS(VK_BLEND_OP_BLUE_EXT); VkBlendOp blendOperationAlpha;
unsigned int colorWriteMask : RENDERTARGETS * 4; // Four component bit masks unsigned int colorWriteMask;
VkFormat targetFormat[RENDERTARGETS]; VkFormat targetFormat[RENDERTARGETS];
bool writeSRGB : 1; bool writeSRGB;
unsigned int multiSample : 3; unsigned int multiSample;
unsigned int multiSampleMask : 4; unsigned int multiSampleMask;
TransparencyAntialiasing transparencyAntialiasing : BITS(TRANSPARENCY_LAST); TransparencyAntialiasing transparencyAntialiasing;
bool centroid : 1; bool centroid;
bool frontFaceCCW : 1; bool frontFaceCCW;
VkLogicOp logicalOperation : BITS(VK_LOGIC_OP_END_RANGE); VkLogicOp logicalOperation;
Sampler::State sampler[TEXTURE_IMAGE_UNITS]; Sampler::State sampler[TEXTURE_IMAGE_UNITS];
}; };
......
...@@ -146,23 +146,23 @@ namespace sw ...@@ -146,23 +146,23 @@ namespace sw
{ {
State(); State();
TextureType textureType : BITS(TEXTURE_LAST); TextureType textureType;
VkFormat textureFormat : BITS(VK_FORMAT_END_RANGE); VkFormat textureFormat;
FilterType textureFilter : BITS(FILTER_LAST); FilterType textureFilter;
AddressingMode addressingModeU : BITS(ADDRESSING_LAST); AddressingMode addressingModeU;
AddressingMode addressingModeV : BITS(ADDRESSING_LAST); AddressingMode addressingModeV;
AddressingMode addressingModeW : BITS(ADDRESSING_LAST); AddressingMode addressingModeW;
MipmapType mipmapFilter : BITS(FILTER_LAST); MipmapType mipmapFilter;
bool sRGB : 1; bool sRGB;
SwizzleType swizzleR : BITS(SWIZZLE_LAST); SwizzleType swizzleR;
SwizzleType swizzleG : BITS(SWIZZLE_LAST); SwizzleType swizzleG;
SwizzleType swizzleB : BITS(SWIZZLE_LAST); SwizzleType swizzleB;
SwizzleType swizzleA : BITS(SWIZZLE_LAST); SwizzleType swizzleA;
bool highPrecisionFiltering : 1; bool highPrecisionFiltering;
CompareFunc compare : BITS(COMPARE_LAST); CompareFunc compare;
#if PERF_PROFILE #if PERF_PROFILE
bool compressedFormat : 1; bool compressedFormat;
#endif #endif
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment