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
int shaderID;
VkCompareOp depthCompareMode : BITS(VK_COMPARE_OP_END_RANGE);
VkCompareOp alphaCompareMode : BITS(VK_COMPARE_OP_END_RANGE);
bool depthWriteEnable : 1;
bool quadLayoutDepthBuffer : 1;
bool stencilActive : 1;
VkCompareOp stencilCompareMode : BITS(VK_COMPARE_OP_END_RANGE);
VkStencilOp stencilFailOperation : BITS(VK_STENCIL_OP_END_RANGE);
VkStencilOp stencilPassOperation : BITS(VK_STENCIL_OP_END_RANGE);
VkStencilOp stencilZFailOperation : BITS(VK_STENCIL_OP_END_RANGE);
bool noStencilMask : 1;
bool noStencilWriteMask : 1;
bool stencilWriteMasked : 1;
bool twoSidedStencil : 1;
VkCompareOp stencilCompareModeCCW : BITS(VK_COMPARE_OP_END_RANGE);
VkStencilOp stencilFailOperationCCW : BITS(VK_STENCIL_OP_END_RANGE);
VkStencilOp stencilPassOperationCCW : BITS(VK_STENCIL_OP_END_RANGE);
VkStencilOp stencilZFailOperationCCW : BITS(VK_STENCIL_OP_END_RANGE);
bool noStencilMaskCCW : 1;
bool noStencilWriteMaskCCW : 1;
bool stencilWriteMaskedCCW : 1;
bool depthTestActive : 1;
bool occlusionEnabled : 1;
bool perspective : 1;
bool depthClamp : 1;
bool alphaBlendActive : 1;
VkBlendFactor sourceBlendFactor : BITS(VK_BLEND_FACTOR_END_RANGE);
VkBlendFactor destBlendFactor : BITS(VK_BLEND_FACTOR_END_RANGE);
VkBlendOp blendOperation : BITS(VK_BLEND_OP_BLUE_EXT);
VkBlendFactor sourceBlendFactorAlpha : BITS(VK_BLEND_FACTOR_END_RANGE);
VkBlendFactor destBlendFactorAlpha : BITS(VK_BLEND_FACTOR_END_RANGE);
VkBlendOp blendOperationAlpha : BITS(VK_BLEND_OP_BLUE_EXT);
unsigned int colorWriteMask : RENDERTARGETS * 4; // Four component bit masks
VkCompareOp depthCompareMode;
VkCompareOp alphaCompareMode;
bool depthWriteEnable;
bool quadLayoutDepthBuffer;
bool stencilActive;
VkCompareOp stencilCompareMode;
VkStencilOp stencilFailOperation;
VkStencilOp stencilPassOperation;
VkStencilOp stencilZFailOperation;
bool noStencilMask;
bool noStencilWriteMask;
bool stencilWriteMasked;
bool twoSidedStencil;
VkCompareOp stencilCompareModeCCW;
VkStencilOp stencilFailOperationCCW;
VkStencilOp stencilPassOperationCCW;
VkStencilOp stencilZFailOperationCCW;
bool noStencilMaskCCW;
bool noStencilWriteMaskCCW;
bool stencilWriteMaskedCCW;
bool depthTestActive;
bool occlusionEnabled;
bool perspective;
bool depthClamp;
bool alphaBlendActive;
VkBlendFactor sourceBlendFactor;
VkBlendFactor destBlendFactor;
VkBlendOp blendOperation;
VkBlendFactor sourceBlendFactorAlpha;
VkBlendFactor destBlendFactorAlpha;
VkBlendOp blendOperationAlpha;
unsigned int colorWriteMask;
VkFormat targetFormat[RENDERTARGETS];
bool writeSRGB : 1;
unsigned int multiSample : 3;
unsigned int multiSampleMask : 4;
TransparencyAntialiasing transparencyAntialiasing : BITS(TRANSPARENCY_LAST);
bool centroid : 1;
bool frontFaceCCW : 1;
VkLogicOp logicalOperation : BITS(VK_LOGIC_OP_END_RANGE);
bool writeSRGB;
unsigned int multiSample;
unsigned int multiSampleMask;
TransparencyAntialiasing transparencyAntialiasing;
bool centroid;
bool frontFaceCCW;
VkLogicOp logicalOperation;
Sampler::State sampler[TEXTURE_IMAGE_UNITS];
};
......
......@@ -146,23 +146,23 @@ namespace sw
{
State();
TextureType textureType : BITS(TEXTURE_LAST);
VkFormat textureFormat : BITS(VK_FORMAT_END_RANGE);
FilterType textureFilter : BITS(FILTER_LAST);
AddressingMode addressingModeU : BITS(ADDRESSING_LAST);
AddressingMode addressingModeV : BITS(ADDRESSING_LAST);
AddressingMode addressingModeW : BITS(ADDRESSING_LAST);
MipmapType mipmapFilter : BITS(FILTER_LAST);
bool sRGB : 1;
SwizzleType swizzleR : BITS(SWIZZLE_LAST);
SwizzleType swizzleG : BITS(SWIZZLE_LAST);
SwizzleType swizzleB : BITS(SWIZZLE_LAST);
SwizzleType swizzleA : BITS(SWIZZLE_LAST);
bool highPrecisionFiltering : 1;
CompareFunc compare : BITS(COMPARE_LAST);
TextureType textureType;
VkFormat textureFormat;
FilterType textureFilter;
AddressingMode addressingModeU;
AddressingMode addressingModeV;
AddressingMode addressingModeW;
MipmapType mipmapFilter;
bool sRGB;
SwizzleType swizzleR;
SwizzleType swizzleG;
SwizzleType swizzleB;
SwizzleType swizzleA;
bool highPrecisionFiltering;
CompareFunc compare;
#if PERF_PROFILE
bool compressedFormat : 1;
bool compressedFormat;
#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