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

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

Issue 1752703003: Fix transform feedback bugs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix gpu_unittests Created 4 years, 9 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 4519 matching lines...) Expand 10 before | Expand all | Expand 10 after
4530 glGenBuffersARB(1, &service_id); 4530 glGenBuffersARB(1, &service_id);
4531 CreateBuffer(client_id, service_id); 4531 CreateBuffer(client_id, service_id);
4532 buffer = GetBuffer(client_id); 4532 buffer = GetBuffer(client_id);
4533 } 4533 }
4534 } 4534 }
4535 LogClientServiceForInfo(buffer, client_id, "glBindBufferBase"); 4535 LogClientServiceForInfo(buffer, client_id, "glBindBufferBase");
4536 if (buffer) { 4536 if (buffer) {
4537 // TODO(kbr): track indexed bound buffers. 4537 // TODO(kbr): track indexed bound buffers.
4538 service_id = buffer->service_id(); 4538 service_id = buffer->service_id();
4539 } 4539 }
4540 switch (target) {
4541 case GL_TRANSFORM_FEEDBACK_BUFFER:
4542 int max_transform_feedback_separate_attribs;
Zhenyao Mo 2016/03/09 17:12:42 init it to 0
qiankun 2016/03/10 01:05:30 Done.
4543 DoGetIntegerv(GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS,
4544 &max_transform_feedback_separate_attribs);
4545 if (index >=
4546 static_cast<GLuint>(max_transform_feedback_separate_attribs)) {
4547 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION,
Zhenyao Mo 2016/03/09 17:12:42 INVALID_VALUE
qiankun 2016/03/10 01:05:30 Done.
4548 "glBindBufferBase", "index out of range");
4549 return;
4550 }
4551 break;
4552 case GL_UNIFORM_BUFFER:
4553 int max_uniform_buffer_bindings;
Zhenyao Mo 2016/03/09 17:12:42 init it to 0
qiankun 2016/03/10 01:05:30 Done.
4554 DoGetIntegerv(GL_MAX_UNIFORM_BUFFER_BINDINGS,
4555 &max_uniform_buffer_bindings);
4556 if (index >= static_cast<GLuint>(max_uniform_buffer_bindings)) {
4557 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION,
Zhenyao Mo 2016/03/09 17:12:42 INVALID_VALUE
qiankun 2016/03/10 01:05:30 Done.
4558 "glBindBufferBase", "index out of range");
4559 return;
4560 }
4561 break;
4562 default:
4563 LOCAL_SET_GL_ERROR_INVALID_ENUM(
4564 "glBindBufferBase", target, "invalid target");
4565 return;
4566 }
4567 state_.SetBoundBuffer(target, buffer);
4540 glBindBufferBase(target, index, service_id); 4568 glBindBufferBase(target, index, service_id);
4541 } 4569 }
4542 4570
4543 void GLES2DecoderImpl::DoBindBufferRange(GLenum target, GLuint index, 4571 void GLES2DecoderImpl::DoBindBufferRange(GLenum target, GLuint index,
4544 GLuint client_id, 4572 GLuint client_id,
4545 GLintptr offset, 4573 GLintptr offset,
4546 GLsizeiptr size) { 4574 GLsizeiptr size) {
4547 Buffer* buffer = NULL; 4575 Buffer* buffer = NULL;
4548 GLuint service_id = 0; 4576 GLuint service_id = 0;
4549 if (client_id != 0) { 4577 if (client_id != 0) {
(...skipping 11197 matching lines...) Expand 10 before | Expand all | Expand 10 after
15747 } 15775 }
15748 15776
15749 // Include the auto-generated part of this file. We split this because it means 15777 // Include the auto-generated part of this file. We split this because it means
15750 // we can easily edit the non-auto generated parts right here in this file 15778 // we can easily edit the non-auto generated parts right here in this file
15751 // instead of having to edit some template or the code generator. 15779 // instead of having to edit some template or the code generator.
15752 #include "base/macros.h" 15780 #include "base/macros.h"
15753 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 15781 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
15754 15782
15755 } // namespace gles2 15783 } // namespace gles2
15756 } // namespace gpu 15784 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698