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

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

Issue 2503403003: ES3 sampler types and their corresponding textures should be initialized before being sampled. (Closed)
Patch Set: Created 4 years, 1 month 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 | « no previous file | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/context_state.h
diff --git a/gpu/command_buffer/service/context_state.h b/gpu/command_buffer/service/context_state.h
index e22faa61d0c881a3d315416c1b813c519ac94cc9..d4505cf92173dbd4ac18e2dbad9e2e21f15fddd1 100644
--- a/gpu/command_buffer/service/context_state.h
+++ b/gpu/command_buffer/service/context_state.h
@@ -68,21 +68,32 @@ struct GPU_EXPORT TextureUnit {
GLenum type) {
switch (type) {
case GL_SAMPLER_2D:
+ case GL_SAMPLER_2D_SHADOW:
+ case GL_INT_SAMPLER_2D:
+ case GL_UNSIGNED_INT_SAMPLER_2D:
return bound_texture_2d;
case GL_SAMPLER_CUBE:
+ case GL_SAMPLER_CUBE_SHADOW:
+ case GL_INT_SAMPLER_CUBE:
+ case GL_UNSIGNED_INT_SAMPLER_CUBE:
return bound_texture_cube_map;
case GL_SAMPLER_EXTERNAL_OES:
return bound_texture_external_oes;
case GL_SAMPLER_2D_RECT_ARB:
return bound_texture_rectangle_arb;
case GL_SAMPLER_3D:
+ case GL_INT_SAMPLER_3D:
+ case GL_UNSIGNED_INT_SAMPLER_3D:
return bound_texture_3d;
case GL_SAMPLER_2D_ARRAY:
+ case GL_SAMPLER_2D_ARRAY_SHADOW:
+ case GL_INT_SAMPLER_2D_ARRAY:
+ case GL_UNSIGNED_INT_SAMPLER_2D_ARRAY:
return bound_texture_2d_array;
}
NOTREACHED();
- return NULL;
+ return nullptr;
}
scoped_refptr<TextureRef>& GetInfoForTarget(GLenum target) {
@@ -362,4 +373,3 @@ struct GPU_EXPORT ContextState {
} // namespace gpu
#endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_H_
-
« no previous file with comments | « no previous file | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698