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

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

Issue 2767063002: 16-bit video upload to float: intermediate R16_EXT and copy to float. (Closed)
Patch Set: update khronos headers Created 3 years, 8 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 3770 matching lines...) Expand 10 before | Expand all | Expand 10 after
3781 bool is_offscreen = !!offscreen_target_frame_buffer_.get(); 3781 bool is_offscreen = !!offscreen_target_frame_buffer_.get();
3782 caps.flips_vertically = !is_offscreen && surface_->FlipsVertically(); 3782 caps.flips_vertically = !is_offscreen && surface_->FlipsVertically();
3783 caps.msaa_is_slow = workarounds().msaa_is_slow; 3783 caps.msaa_is_slow = workarounds().msaa_is_slow;
3784 caps.dc_layers = supports_dc_layers_; 3784 caps.dc_layers = supports_dc_layers_;
3785 3785
3786 caps.blend_equation_advanced = 3786 caps.blend_equation_advanced =
3787 feature_info_->feature_flags().blend_equation_advanced; 3787 feature_info_->feature_flags().blend_equation_advanced;
3788 caps.blend_equation_advanced_coherent = 3788 caps.blend_equation_advanced_coherent =
3789 feature_info_->feature_flags().blend_equation_advanced_coherent; 3789 feature_info_->feature_flags().blend_equation_advanced_coherent;
3790 caps.texture_rg = feature_info_->feature_flags().ext_texture_rg; 3790 caps.texture_rg = feature_info_->feature_flags().ext_texture_rg;
3791 caps.texture_norm16 = feature_info_->feature_flags().ext_texture_norm16;
3791 caps.texture_half_float_linear = 3792 caps.texture_half_float_linear =
3792 feature_info_->feature_flags().enable_texture_half_float_linear; 3793 feature_info_->feature_flags().enable_texture_half_float_linear;
3793 caps.color_buffer_half_float_rgba = 3794 caps.color_buffer_half_float_rgba =
3794 feature_info_->feature_flags().enable_color_buffer_float || 3795 feature_info_->feature_flags().enable_color_buffer_float ||
3795 feature_info_->feature_flags().enable_color_buffer_half_float; 3796 feature_info_->feature_flags().enable_color_buffer_half_float;
3796 caps.image_ycbcr_422 = 3797 caps.image_ycbcr_422 =
3797 feature_info_->feature_flags().chromium_image_ycbcr_422; 3798 feature_info_->feature_flags().chromium_image_ycbcr_422;
3798 caps.image_ycbcr_420v = 3799 caps.image_ycbcr_420v =
3799 feature_info_->feature_flags().chromium_image_ycbcr_420v; 3800 feature_info_->feature_flags().chromium_image_ycbcr_420v;
3800 caps.max_copy_texture_chromium_size = 3801 caps.max_copy_texture_chromium_size =
(...skipping 12743 matching lines...) Expand 10 before | Expand all | Expand 10 after
16544 case GL_RGBA32F: 16545 case GL_RGBA32F:
16545 valid_dest_format = 16546 valid_dest_format =
16546 feature_info_->ext_color_buffer_float_available() || 16547 feature_info_->ext_color_buffer_float_available() ||
16547 feature_info_->feature_flags().chromium_color_buffer_float_rgba; 16548 feature_info_->feature_flags().chromium_color_buffer_float_rgba;
16548 break; 16549 break;
16549 default: 16550 default:
16550 valid_dest_format = false; 16551 valid_dest_format = false;
16551 break; 16552 break;
16552 } 16553 }
16553 16554
16555 // TODO(aleksandar.stojiljkovic): Use sized internal formats: crbug.com/662644
qiankun 2017/04/10 09:43:27 Did you mean supporting sized internal formats for
aleksandar.stojiljkovic 2017/04/11 21:33:26 Thanks, the bug 662644 was wrong - changed it to 6
16554 bool valid_source_format = 16556 bool valid_source_format =
16555 source_internal_format == GL_RED || source_internal_format == GL_ALPHA || 16557 source_internal_format == GL_RED || source_internal_format == GL_ALPHA ||
16556 source_internal_format == GL_RGB || source_internal_format == GL_RGBA || 16558 source_internal_format == GL_RGB || source_internal_format == GL_RGBA ||
16557 source_internal_format == GL_RGB8 || source_internal_format == GL_RGBA8 || 16559 source_internal_format == GL_RGB8 || source_internal_format == GL_RGBA8 ||
16558 source_internal_format == GL_LUMINANCE || 16560 source_internal_format == GL_LUMINANCE ||
16559 source_internal_format == GL_LUMINANCE_ALPHA || 16561 source_internal_format == GL_LUMINANCE_ALPHA ||
16560 source_internal_format == GL_BGRA_EXT || 16562 source_internal_format == GL_BGRA_EXT ||
16561 source_internal_format == GL_BGRA8_EXT || 16563 source_internal_format == GL_BGRA8_EXT ||
16562 source_internal_format == GL_RGB_YCBCR_420V_CHROMIUM || 16564 source_internal_format == GL_RGB_YCBCR_420V_CHROMIUM ||
16563 source_internal_format == GL_RGB_YCBCR_422_CHROMIUM; 16565 source_internal_format == GL_RGB_YCBCR_422_CHROMIUM ||
16566 source_internal_format == GL_R16_EXT;
16564 if (!valid_source_format) { 16567 if (!valid_source_format) {
16565 std::string msg = "invalid source internal format " + 16568 std::string msg = "invalid source internal format " +
16566 GLES2Util::GetStringEnum(source_internal_format); 16569 GLES2Util::GetStringEnum(source_internal_format);
16567 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, function_name, 16570 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, function_name,
16568 msg.c_str()); 16571 msg.c_str());
16569 return false; 16572 return false;
16570 } 16573 }
16571 if (!valid_dest_format) { 16574 if (!valid_dest_format) {
16572 std::string msg = "invalid dest internal format " + 16575 std::string msg = "invalid dest internal format " +
16573 GLES2Util::GetStringEnum(dest_internal_format); 16576 GLES2Util::GetStringEnum(dest_internal_format);
(...skipping 2992 matching lines...) Expand 10 before | Expand all | Expand 10 after
19566 } 19569 }
19567 19570
19568 // Include the auto-generated part of this file. We split this because it means 19571 // Include the auto-generated part of this file. We split this because it means
19569 // we can easily edit the non-auto generated parts right here in this file 19572 // we can easily edit the non-auto generated parts right here in this file
19570 // instead of having to edit some template or the code generator. 19573 // instead of having to edit some template or the code generator.
19571 #include "base/macros.h" 19574 #include "base/macros.h"
19572 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 19575 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
19573 19576
19574 } // namespace gles2 19577 } // namespace gles2
19575 } // namespace gpu 19578 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698