Revert "Move sampler validation to the GL layer."
Probably causing failures in the dEQP-GLES2 GL back-end tests:
dEQP-GLES2.functional.uniform_api.info_query.basic.sampler2D_both
BUG=angleproject:1123
This reverts commit 6fa156b66da2090c98f1a044a948694c7ac83324.
Change-Id: I3cc993c34aae4a108037ce81709b71d16ece814e
Reviewed-on: https://chromium-review.googlesource.com/301580
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/renderer/d3d/ProgramD3D.h b/src/libANGLE/renderer/d3d/ProgramD3D.h
index 5a1b640..5e86516 100644
--- a/src/libANGLE/renderer/d3d/ProgramD3D.h
+++ b/src/libANGLE/renderer/d3d/ProgramD3D.h
@@ -12,6 +12,7 @@
#include <string>
#include <vector>
+#include "common/Optional.h"
#include "compiler/translator/blocklayoutHLSL.h"
#include "libANGLE/Constants.h"
#include "libANGLE/formatutils.h"
@@ -83,6 +84,7 @@
GLenum getSamplerTextureType(gl::SamplerType type, unsigned int samplerIndex) const;
GLint getUsedSamplerRange(gl::SamplerType type) const;
void updateSamplerMapping();
+ bool validateSamplers(gl::InfoLog *infoLog, const gl::Caps &caps);
bool usesPointSize() const { return mUsesPointSize; }
bool usesPointSpriteEmulation() const;
@@ -196,18 +198,14 @@
GLenum textureType;
};
- typedef std::map<std::string, D3DUniform *> D3DUniformMap;
typedef std::map<std::string, sh::BlockMemberInfo> BlockInfoMap;
- void defineUniformsAndAssignRegisters();
- void defineUniformBase(const ShaderD3D *shader,
- const sh::Uniform &uniform,
- D3DUniformMap *uniformMap);
- void defineUniform(const ShaderD3D *shader,
- const sh::ShaderVariable &uniform,
- const std::string &fullName,
- sh::HLSLBlockEncoder *encoder,
- D3DUniformMap *uniformMap);
+ void assignUniformRegisters();
+ void assignUniformRegistersBase(const ShaderD3D *shader, const sh::Uniform &uniform);
+ void assignUniformRegisters(const ShaderD3D *shader,
+ const sh::ShaderVariable &uniform,
+ const std::string &fullName,
+ sh::HLSLBlockEncoder *encoder);
void assignAllSamplerRegisters();
void assignSamplerRegisters(const D3DUniform *d3dUniform);
@@ -264,6 +262,9 @@
GLuint mUsedPixelSamplerRange;
bool mDirtySamplerMapping;
+ // Cache for validateSamplers
+ std::vector<GLenum> mTextureUnitTypesCache;
+
// Cache for getPixelExecutableForFramebuffer
std::vector<GLenum> mPixelShaderOutputFormatCache;
@@ -274,6 +275,8 @@
unsigned int mSerial;
+ Optional<bool> mCachedValidateSamplersResult;
+
std::vector<GLint> mVertexUBOCache;
std::vector<GLint> mFragmentUBOCache;
VertexExecutable::Signature mCachedVertexSignature;