Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2716)

Unified Diff: gpu/command_buffer/service/sampler_manager.h

Issue 1505343003: Updating texture validation to account for sampler objects in ES3 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed issue on devices without TEXTURE_FLOAT_LINEAR Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | gpu/command_buffer/service/sampler_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/sampler_manager.h
diff --git a/gpu/command_buffer/service/sampler_manager.h b/gpu/command_buffer/service/sampler_manager.h
index 840fdaca903bb4c677399d0ff058bd98a139cae7..6dc470ac8d920f9ecb7fbdbac944f95460710c8c 100644
--- a/gpu/command_buffer/service/sampler_manager.h
+++ b/gpu/command_buffer/service/sampler_manager.h
@@ -21,6 +21,20 @@ namespace gles2 {
class SamplerManager;
+struct SamplerState {
+ SamplerState();
+
+ GLenum min_filter;
+ GLenum mag_filter;
+ GLenum wrap_r;
+ GLenum wrap_s;
+ GLenum wrap_t;
+ GLenum compare_func;
+ GLenum compare_mode;
+ GLfloat max_lod;
+ GLfloat min_lod;
+};
+
class GPU_EXPORT Sampler : public base::RefCounted<Sampler> {
public:
Sampler(SamplerManager* manager, GLuint service_id);
@@ -30,41 +44,45 @@ class GPU_EXPORT Sampler : public base::RefCounted<Sampler> {
return service_id_;
}
+ const SamplerState& sampler_state() const {
+ return sampler_state_;
+ }
+
// Sampler parameters
GLenum min_filter() const {
- return min_filter_;
+ return sampler_state_.min_filter;
}
GLenum mag_filter() const {
- return mag_filter_;
+ return sampler_state_.mag_filter;
}
GLenum wrap_r() const {
- return wrap_r_;
+ return sampler_state_.wrap_r;
}
GLenum wrap_s() const {
- return wrap_s_;
+ return sampler_state_.wrap_s;
}
GLenum wrap_t() const {
- return wrap_t_;
+ return sampler_state_.wrap_t;
}
GLenum compare_func() const {
- return compare_func_;
+ return sampler_state_.compare_func;
}
GLenum compare_mode() const {
- return compare_mode_;
+ return sampler_state_.compare_mode;
}
GLfloat max_lod() const {
- return max_lod_;
+ return sampler_state_.max_lod;
}
GLfloat min_lod() const {
- return min_lod_;
+ return sampler_state_.min_lod;
}
bool IsDeleted() const {
@@ -99,16 +117,8 @@ class GPU_EXPORT Sampler : public base::RefCounted<Sampler> {
// The id of the texure
GLuint service_id_;
- // Texture parameters.
- GLenum min_filter_;
- GLenum mag_filter_;
- GLenum wrap_r_;
- GLenum wrap_s_;
- GLenum wrap_t_;
- GLenum compare_func_;
- GLenum compare_mode_;
- GLfloat max_lod_;
- GLfloat min_lod_;
+ // Sampler parameters.
+ SamplerState sampler_state_;
// True if deleted.
bool deleted_;
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | gpu/command_buffer/service/sampler_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698