SkSL: Remove many unused sampler types
More GLSL-isms that weren't used, and weren't really ready for use (most were defined as "Other", not "Sampler"). If/when we need these, it's easy to add them back. In the meantime, we should have a simpler system for reserving keywords that doesn't pollute the type system. Bug: skia:11115 Change-Id: I436c1e4de6e6b92ff14fc99ed1d47e0c5d1e3aff Reviewed-on: https://skia-review.googlesource.com/c/skia/+/347045 Reviewed-by: John Stiles <johnstiles@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
This commit is contained in:
parent
c63f4313b4
commit
0c3536c09a
@ -136,20 +136,12 @@ Compiler::Compiler(const ShaderCapsClass* caps, Flags flags)
|
||||
|
||||
TYPE(Sampler1D), TYPE(Sampler2D), TYPE(Sampler3D),
|
||||
TYPE(SamplerExternalOES),
|
||||
TYPE(SamplerCube),
|
||||
TYPE(Sampler2DRect),
|
||||
TYPE(Sampler1DArray), TYPE(Sampler2DArray), TYPE(SamplerCubeArray),
|
||||
TYPE(SamplerBuffer),
|
||||
TYPE(Sampler2DMS), TYPE(Sampler2DMSArray),
|
||||
|
||||
TYPE(ISampler2D),
|
||||
TYPE(Image2D), TYPE(IImage2D),
|
||||
TYPE(SubpassInput), TYPE(SubpassInputMS),
|
||||
|
||||
TYPE(Sampler1DShadow), TYPE(Sampler2DShadow), TYPE(SamplerCubeShadow),
|
||||
TYPE(Sampler2DRectShadow),
|
||||
TYPE(Sampler1DArrayShadow), TYPE(Sampler2DArrayShadow), TYPE(SamplerCubeArrayShadow),
|
||||
|
||||
TYPE(Sampler),
|
||||
TYPE(Texture2D),
|
||||
};
|
||||
|
@ -131,12 +131,6 @@ public:
|
||||
/*isArrayedTexture=*/false,
|
||||
/*isMultisampled=*/false,
|
||||
/*isSampled=*/true))
|
||||
, fTextureBuffer_Type(Type::MakeTextureType("textureBuffer",
|
||||
SpvDimBuffer,
|
||||
/*isDepth=*/false,
|
||||
/*isArrayedTexture=*/false,
|
||||
/*isMultisampled=*/false,
|
||||
/*isSampled=*/true))
|
||||
, fITexture2D_Type(Type::MakeTextureType("itexture2D",
|
||||
SpvDim2D,
|
||||
/*isDepth=*/false,
|
||||
@ -148,27 +142,11 @@ public:
|
||||
, fSampler3D_Type(Type::MakeSamplerType("sampler3D", *fTexture3D_Type))
|
||||
, fSamplerExternalOES_Type(
|
||||
Type::MakeSamplerType("samplerExternalOES", *fTextureExternalOES_Type))
|
||||
, fSamplerCube_Type(Type::MakeSamplerType("samplerCube", *fTextureCube_Type))
|
||||
, fSampler2DRect_Type(Type::MakeSamplerType("sampler2DRect", *fTexture2DRect_Type))
|
||||
, fSampler1DArray_Type(Type::MakeOtherType("sampler1DArray"))
|
||||
, fSampler2DArray_Type(Type::MakeOtherType("sampler2DArray"))
|
||||
, fSamplerCubeArray_Type(Type::MakeOtherType("samplerCubeArray"))
|
||||
, fSamplerBuffer_Type(Type::MakeSamplerType("samplerBuffer", *fTextureBuffer_Type))
|
||||
, fSampler2DMS_Type(Type::MakeOtherType("sampler2DMS"))
|
||||
, fSampler2DMSArray_Type(Type::MakeOtherType("sampler2DMSArray"))
|
||||
, fSampler1DShadow_Type(Type::MakeOtherType("sampler1DShadow"))
|
||||
, fSampler2DShadow_Type(Type::MakeOtherType("sampler2DShadow"))
|
||||
, fSamplerCubeShadow_Type(Type::MakeOtherType("samplerCubeShadow"))
|
||||
, fSampler2DRectShadow_Type(Type::MakeOtherType("sampler2DRectShadow"))
|
||||
, fSampler1DArrayShadow_Type(Type::MakeOtherType("sampler1DArrayShadow"))
|
||||
, fSampler2DArrayShadow_Type(Type::MakeOtherType("sampler2DArrayShadow"))
|
||||
, fSamplerCubeArrayShadow_Type(Type::MakeOtherType("samplerCubeArrayShadow"))
|
||||
|
||||
// Related to below FIXME, gsampler*s don't currently expand to cover integer case.
|
||||
, fISampler2D_Type(Type::MakeSamplerType("isampler2D", *fITexture2D_Type))
|
||||
|
||||
, fSampler_Type(Type::MakeSimpleType("sampler", Type::TypeKind::kSeparateSampler))
|
||||
// FIXME express these as "gimage2D" that expand to image2D, iimage2D, and uimage2D.
|
||||
, fImage2D_Type(Type::MakeTextureType("image2D",
|
||||
SpvDim2D,
|
||||
/*isDepth=*/false,
|
||||
@ -182,8 +160,6 @@ public:
|
||||
/*isMultisampled=*/false,
|
||||
/*isSampled=*/true))
|
||||
|
||||
// FIXME express these as "gsubpassInput" that expand to subpassInput, isubpassInput,
|
||||
// and usubpassInput.
|
||||
, fSubpassInput_Type(Type::MakeTextureType("subpassInput",
|
||||
SpvDimSubpassData,
|
||||
/*isDepth=*/false,
|
||||
@ -335,28 +311,13 @@ public:
|
||||
const std::unique_ptr<Type> fTextureExternalOES_Type;
|
||||
const std::unique_ptr<Type> fTextureCube_Type;
|
||||
const std::unique_ptr<Type> fTexture2DRect_Type;
|
||||
const std::unique_ptr<Type> fTextureBuffer_Type;
|
||||
const std::unique_ptr<Type> fITexture2D_Type;
|
||||
|
||||
const std::unique_ptr<Type> fSampler1D_Type;
|
||||
const std::unique_ptr<Type> fSampler2D_Type;
|
||||
const std::unique_ptr<Type> fSampler3D_Type;
|
||||
const std::unique_ptr<Type> fSamplerExternalOES_Type;
|
||||
const std::unique_ptr<Type> fSamplerCube_Type;
|
||||
const std::unique_ptr<Type> fSampler2DRect_Type;
|
||||
const std::unique_ptr<Type> fSampler1DArray_Type;
|
||||
const std::unique_ptr<Type> fSampler2DArray_Type;
|
||||
const std::unique_ptr<Type> fSamplerCubeArray_Type;
|
||||
const std::unique_ptr<Type> fSamplerBuffer_Type;
|
||||
const std::unique_ptr<Type> fSampler2DMS_Type;
|
||||
const std::unique_ptr<Type> fSampler2DMSArray_Type;
|
||||
const std::unique_ptr<Type> fSampler1DShadow_Type;
|
||||
const std::unique_ptr<Type> fSampler2DShadow_Type;
|
||||
const std::unique_ptr<Type> fSamplerCubeShadow_Type;
|
||||
const std::unique_ptr<Type> fSampler2DRectShadow_Type;
|
||||
const std::unique_ptr<Type> fSampler1DArrayShadow_Type;
|
||||
const std::unique_ptr<Type> fSampler2DArrayShadow_Type;
|
||||
const std::unique_ptr<Type> fSamplerCubeArrayShadow_Type;
|
||||
|
||||
const std::unique_ptr<Type> fISampler2D_Type;
|
||||
const std::unique_ptr<Type> fSampler_Type;
|
||||
|
Loading…
Reference in New Issue
Block a user