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

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

Issue 1547873002: Allow GL_TEXTURE_RECTANGLE_ARB to be the destination target for copyTextureCHROMIUM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix shader compile error. Created 4 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/texture_manager.h" 5 #include "gpu/command_buffer/service/texture_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1911 matching lines...) Expand 10 before | Expand all | Expand 10 after
1922 ErrorState* error_state = state->GetErrorState(); 1922 ErrorState* error_state = state->GetErrorState();
1923 const Validators* validators = feature_info_->validators(); 1923 const Validators* validators = feature_info_->validators();
1924 if (((args.command_type == DoTexImageArguments::kTexImage2D) && 1924 if (((args.command_type == DoTexImageArguments::kTexImage2D) &&
1925 !validators->texture_target.IsValid(args.target)) || 1925 !validators->texture_target.IsValid(args.target)) ||
1926 ((args.command_type == DoTexImageArguments::kTexImage3D) && 1926 ((args.command_type == DoTexImageArguments::kTexImage3D) &&
1927 !validators->texture_3_d_target.IsValid(args.target))) { 1927 !validators->texture_3_d_target.IsValid(args.target))) {
1928 ERRORSTATE_SET_GL_ERROR_INVALID_ENUM( 1928 ERRORSTATE_SET_GL_ERROR_INVALID_ENUM(
1929 error_state, function_name, args.target, "target"); 1929 error_state, function_name, args.target, "target");
1930 return false; 1930 return false;
1931 } 1931 }
1932 // TODO(ccameron): Add a separate texture from |texture_target| for 1932
1933 // [Compressed]Tex[Sub]Image2D and related functions.
erikchen 2015/12/30 22:08:00 I removed this to get my unit test to work. It's n
1934 // http://crbug.com/536854
1935 if (args.target == GL_TEXTURE_RECTANGLE_ARB) {
1936 ERRORSTATE_SET_GL_ERROR_INVALID_ENUM(
1937 error_state, function_name, args.target, "target");
1938 return false;
1939 }
1940 if (!ValidateTextureParameters( 1933 if (!ValidateTextureParameters(
1941 error_state, function_name, args.format, args.type, 1934 error_state, function_name, args.format, args.type,
1942 args.internal_format, args.level)) { 1935 args.internal_format, args.level)) {
1943 return false; 1936 return false;
1944 } 1937 }
1945 if (!ValidForTarget(args.target, args.level, 1938 if (!ValidForTarget(args.target, args.level,
1946 args.width, args.height, args.depth) || 1939 args.width, args.height, args.depth) ||
1947 args.border != 0) { 1940 args.border != 0) {
1948 ERRORSTATE_SET_GL_ERROR( 1941 ERRORSTATE_SET_GL_ERROR(
1949 error_state, GL_INVALID_VALUE, function_name, 1942 error_state, GL_INVALID_VALUE, function_name,
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
2614 return GL_HALF_FLOAT_OES; 2607 return GL_HALF_FLOAT_OES;
2615 case GL_BGRA8_EXT: 2608 case GL_BGRA8_EXT:
2616 return GL_UNSIGNED_BYTE; 2609 return GL_UNSIGNED_BYTE;
2617 default: 2610 default:
2618 return GL_NONE; 2611 return GL_NONE;
2619 } 2612 }
2620 } 2613 }
2621 2614
2622 } // namespace gles2 2615 } // namespace gles2
2623 } // namespace gpu 2616 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698