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

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

Issue 2639293002: gpu: Add ARB_occlusion_query support. (Closed)
Patch Set: add unit test Created 3 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 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/gles2_cmd_decoder.h" 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
6 6
7 #include <limits.h> 7 #include <limits.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 #include <stdio.h> 10 #include <stdio.h>
(...skipping 3712 matching lines...) Expand 10 before | Expand all | Expand 10 after
3723 caps.texture_half_float_linear = 3723 caps.texture_half_float_linear =
3724 feature_info_->feature_flags().enable_texture_half_float_linear; 3724 feature_info_->feature_flags().enable_texture_half_float_linear;
3725 caps.image_ycbcr_422 = 3725 caps.image_ycbcr_422 =
3726 feature_info_->feature_flags().chromium_image_ycbcr_422; 3726 feature_info_->feature_flags().chromium_image_ycbcr_422;
3727 caps.image_ycbcr_420v = 3727 caps.image_ycbcr_420v =
3728 feature_info_->feature_flags().chromium_image_ycbcr_420v; 3728 feature_info_->feature_flags().chromium_image_ycbcr_420v;
3729 caps.max_copy_texture_chromium_size = 3729 caps.max_copy_texture_chromium_size =
3730 workarounds().max_copy_texture_chromium_size; 3730 workarounds().max_copy_texture_chromium_size;
3731 caps.render_buffer_format_bgra8888 = 3731 caps.render_buffer_format_bgra8888 =
3732 feature_info_->feature_flags().ext_render_buffer_format_bgra8888; 3732 feature_info_->feature_flags().ext_render_buffer_format_bgra8888;
3733 caps.occlusion_query = feature_info_->feature_flags().occlusion_query;
3733 caps.occlusion_query_boolean = 3734 caps.occlusion_query_boolean =
3734 feature_info_->feature_flags().occlusion_query_boolean; 3735 feature_info_->feature_flags().occlusion_query_boolean;
3735 caps.timer_queries = 3736 caps.timer_queries =
3736 query_manager_->GPUTimingAvailable(); 3737 query_manager_->GPUTimingAvailable();
3737 caps.disable_multisampling_color_mask_usage = 3738 caps.disable_multisampling_color_mask_usage =
3738 workarounds().disable_multisampling_color_mask_usage; 3739 workarounds().disable_multisampling_color_mask_usage;
3739 caps.disable_webgl_rgb_multisampling_usage = 3740 caps.disable_webgl_rgb_multisampling_usage =
3740 workarounds().disable_webgl_rgb_multisampling_usage; 3741 workarounds().disable_webgl_rgb_multisampling_usage;
3741 caps.emulate_rgb_buffer_with_rgba = 3742 caps.emulate_rgb_buffer_with_rgba =
3742 workarounds().disable_gl_rgb_format; 3743 workarounds().disable_gl_rgb_format;
(...skipping 12130 matching lines...) Expand 10 before | Expand all | Expand 10 after
15873 case GL_GET_ERROR_QUERY_CHROMIUM: 15874 case GL_GET_ERROR_QUERY_CHROMIUM:
15874 break; 15875 break;
15875 case GL_COMMANDS_COMPLETED_CHROMIUM: 15876 case GL_COMMANDS_COMPLETED_CHROMIUM:
15876 if (!features().chromium_sync_query) { 15877 if (!features().chromium_sync_query) {
15877 LOCAL_SET_GL_ERROR( 15878 LOCAL_SET_GL_ERROR(
15878 GL_INVALID_OPERATION, "glBeginQueryEXT", 15879 GL_INVALID_OPERATION, "glBeginQueryEXT",
15879 "not enabled for commands completed queries"); 15880 "not enabled for commands completed queries");
15880 return error::kNoError; 15881 return error::kNoError;
15881 } 15882 }
15882 break; 15883 break;
15884 case GL_SAMPLES_PASSED_ARB:
15885 if (!features().occlusion_query) {
15886 LOCAL_SET_GL_ERROR(
15887 GL_INVALID_OPERATION, "glBeginQueryEXT",
15888 "not enabled for occlusion queries");
15889 return error::kNoError;
15890 }
15891 break;
15883 case GL_ANY_SAMPLES_PASSED: 15892 case GL_ANY_SAMPLES_PASSED:
15884 case GL_ANY_SAMPLES_PASSED_CONSERVATIVE: 15893 case GL_ANY_SAMPLES_PASSED_CONSERVATIVE:
15885 if (!features().occlusion_query_boolean) { 15894 if (!features().occlusion_query_boolean) {
15886 LOCAL_SET_GL_ERROR( 15895 LOCAL_SET_GL_ERROR(
15887 GL_INVALID_OPERATION, "glBeginQueryEXT", 15896 GL_INVALID_OPERATION, "glBeginQueryEXT",
15888 "not enabled for occlusion queries"); 15897 "not enabled for boolean occlusion queries");
15889 return error::kNoError; 15898 return error::kNoError;
15890 } 15899 }
15891 break; 15900 break;
15892 case GL_TIME_ELAPSED: 15901 case GL_TIME_ELAPSED:
15893 if (!query_manager_->GPUTimingAvailable()) { 15902 if (!query_manager_->GPUTimingAvailable()) {
15894 LOCAL_SET_GL_ERROR( 15903 LOCAL_SET_GL_ERROR(
15895 GL_INVALID_OPERATION, "glBeginQueryEXT", 15904 GL_INVALID_OPERATION, "glBeginQueryEXT",
15896 "not enabled for timing queries"); 15905 "not enabled for timing queries");
15897 return error::kNoError; 15906 return error::kNoError;
15898 } 15907 }
(...skipping 3273 matching lines...) Expand 10 before | Expand all | Expand 10 after
19172 } 19181 }
19173 19182
19174 // Include the auto-generated part of this file. We split this because it means 19183 // Include the auto-generated part of this file. We split this because it means
19175 // we can easily edit the non-auto generated parts right here in this file 19184 // we can easily edit the non-auto generated parts right here in this file
19176 // instead of having to edit some template or the code generator. 19185 // instead of having to edit some template or the code generator.
19177 #include "base/macros.h" 19186 #include "base/macros.h"
19178 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 19187 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
19179 19188
19180 } // namespace gles2 19189 } // namespace gles2
19181 } // namespace gpu 19190 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/feature_info.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698