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

Unified Diff: gpu/command_buffer/service/feature_info.cc

Issue 5626008: Exposed support for dynamically enabling extensions in command buffer... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years 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/common/gles2_cmd_ids_autogen.h ('k') | 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/feature_info.cc
===================================================================
--- gpu/command_buffer/service/feature_info.cc (revision 68245)
+++ gpu/command_buffer/service/feature_info.cc (working copy)
@@ -215,21 +215,32 @@
bool enable_texture_float_linear = false;
bool enable_texture_half_float = false;
bool enable_texture_half_float_linear = false;
- if (ext.HaveAndDesire("GL_ARB_texture_float")) {
+
+ bool have_arb_texture_float = ext.Have("GL_ARB_texture_float");
+
+ if (have_arb_texture_float && ext.Desire("GL_ARB_texture_float")) {
enable_texture_float = true;
enable_texture_float_linear = true;
enable_texture_half_float = true;
enable_texture_half_float_linear = true;
} else {
- if (ext.HaveAndDesire("GL_OES_texture_float")) {
+ if (ext.HaveAndDesire("GL_OES_texture_float") ||
+ (have_arb_texture_float &&
+ ext.Desire("GL_OES_texture_float"))) {
enable_texture_float = true;
- if (ext.HaveAndDesire("GL_OES_texture_float_linear")) {
+ if (ext.HaveAndDesire("GL_OES_texture_float_linear") ||
+ (have_arb_texture_float &&
+ ext.Desire("GL_OES_texture_float_linear"))) {
enable_texture_float_linear = true;
}
}
- if (ext.HaveAndDesire("GL_OES_texture_half_float")) {
+ if (ext.HaveAndDesire("GL_OES_texture_half_float") ||
+ (have_arb_texture_float &&
+ ext.Desire("GL_OES_texture_half_float"))) {
enable_texture_half_float = true;
- if (ext.HaveAndDesire("GL_OES_texture_half_float_linear")) {
+ if (ext.HaveAndDesire("GL_OES_texture_half_float_linear") ||
+ (have_arb_texture_float &&
+ ext.Desire("GL_OES_texture_half_float_linear"))) {
enable_texture_half_float_linear = true;
}
}
« no previous file with comments | « gpu/command_buffer/common/gles2_cmd_ids_autogen.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698