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

Side by Side Diff: gpu/command_buffer/service/feature_info.cc

Issue 793693003: Tile Compression (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "gpu/command_buffer/service/feature_info.h" 5 #include "gpu/command_buffer/service/feature_info.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 enable_texture_float_linear(false), 121 enable_texture_float_linear(false),
122 enable_texture_half_float_linear(false), 122 enable_texture_half_float_linear(false),
123 angle_translated_shader_source(false), 123 angle_translated_shader_source(false),
124 angle_pack_reverse_row_order(false), 124 angle_pack_reverse_row_order(false),
125 arb_texture_rectangle(false), 125 arb_texture_rectangle(false),
126 angle_instanced_arrays(false), 126 angle_instanced_arrays(false),
127 occlusion_query_boolean(false), 127 occlusion_query_boolean(false),
128 use_arb_occlusion_query2_for_occlusion_query_boolean(false), 128 use_arb_occlusion_query2_for_occlusion_query_boolean(false),
129 use_arb_occlusion_query_for_occlusion_query_boolean(false), 129 use_arb_occlusion_query_for_occlusion_query_boolean(false),
130 native_vertex_array_object(false), 130 native_vertex_array_object(false),
131 ext_texture_format_atc(false),
131 ext_texture_format_bgra8888(false), 132 ext_texture_format_bgra8888(false),
133 ext_texture_format_dxt(false),
132 enable_shader_name_hashing(false), 134 enable_shader_name_hashing(false),
133 enable_samplers(false), 135 enable_samplers(false),
134 ext_draw_buffers(false), 136 ext_draw_buffers(false),
135 nv_draw_buffers(false), 137 nv_draw_buffers(false),
136 ext_frag_depth(false), 138 ext_frag_depth(false),
137 ext_shader_texture_lod(false), 139 ext_shader_texture_lod(false),
138 use_async_readpixels(false), 140 use_async_readpixels(false),
139 map_buffer_range(false), 141 map_buffer_range(false),
140 ext_discard_framebuffer(false), 142 ext_discard_framebuffer(false),
141 angle_depth_texture(false), 143 angle_depth_texture(false),
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 348
347 if (enable_dxt5) { 349 if (enable_dxt5) {
348 // The difference between GL_EXT_texture_compression_s3tc and 350 // The difference between GL_EXT_texture_compression_s3tc and
349 // GL_CHROMIUM_texture_compression_dxt5 is that the former 351 // GL_CHROMIUM_texture_compression_dxt5 is that the former
350 // requires on the fly compression. The latter does not. 352 // requires on the fly compression. The latter does not.
351 AddExtensionString("GL_CHROMIUM_texture_compression_dxt5"); 353 AddExtensionString("GL_CHROMIUM_texture_compression_dxt5");
352 validators_.compressed_texture_format.AddValue( 354 validators_.compressed_texture_format.AddValue(
353 GL_COMPRESSED_RGBA_S3TC_DXT5_EXT); 355 GL_COMPRESSED_RGBA_S3TC_DXT5_EXT);
354 } 356 }
355 357
358 if (enable_dxt1 && enable_dxt5) {
359 feature_flags_.ext_texture_format_dxt = true;
360 }
361
362 // Check if we should allow GL_AMD_compressed_ATC_texture.
363 bool have_atc = extensions.Contains("GL_AMD_compressed_ATC_texture") ||
364 extensions.Contains("GL_ATI_texture_compression_atitc");
365
366 if (have_atc) {
367 feature_flags_.ext_texture_format_atc = true;
368
369 AddExtensionString("GL_AMD_compressed_ATC_texture");
370 validators_.compressed_texture_format.AddValue(GL_ATC_RGB_AMD);
371 validators_.compressed_texture_format.AddValue(
372 GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD);
373 }
374
356 // Check if we should enable GL_EXT_texture_filter_anisotropic. 375 // Check if we should enable GL_EXT_texture_filter_anisotropic.
357 if (extensions.Contains("GL_EXT_texture_filter_anisotropic")) { 376 if (extensions.Contains("GL_EXT_texture_filter_anisotropic")) {
358 AddExtensionString("GL_EXT_texture_filter_anisotropic"); 377 AddExtensionString("GL_EXT_texture_filter_anisotropic");
359 validators_.texture_parameter.AddValue( 378 validators_.texture_parameter.AddValue(
360 GL_TEXTURE_MAX_ANISOTROPY_EXT); 379 GL_TEXTURE_MAX_ANISOTROPY_EXT);
361 validators_.g_l_state.AddValue( 380 validators_.g_l_state.AddValue(
362 GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT); 381 GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT);
363 } 382 }
364 383
365 // Check if we should support GL_OES_packed_depth_stencil and/or 384 // Check if we should support GL_OES_packed_depth_stencil and/or
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after
1033 if (pos == std::string::npos) { 1052 if (pos == std::string::npos) {
1034 extensions_ += (extensions_.empty() ? "" : " ") + str; 1053 extensions_ += (extensions_.empty() ? "" : " ") + str;
1035 } 1054 }
1036 } 1055 }
1037 1056
1038 FeatureInfo::~FeatureInfo() { 1057 FeatureInfo::~FeatureInfo() {
1039 } 1058 }
1040 1059
1041 } // namespace gles2 1060 } // namespace gles2
1042 } // namespace gpu 1061 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/feature_info.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