OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // This file is auto-generated from | 5 // This file is auto-generated from |
6 // gpu/command_buffer/build_gles2_cmd_buffer.py | 6 // gpu/command_buffer/build_gles2_cmd_buffer.py |
7 // It's formatted by clang-format using chromium coding style: | 7 // It's formatted by clang-format using chromium coding style: |
8 // clang-format -i -style=chromium filename | 8 // clang-format -i -style=chromium filename |
9 // DO NOT EDIT! | 9 // DO NOT EDIT! |
10 | 10 |
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 const volatile gles2::cmds::CompileShader& c = | 434 const volatile gles2::cmds::CompileShader& c = |
435 *static_cast<const volatile gles2::cmds::CompileShader*>(cmd_data); | 435 *static_cast<const volatile gles2::cmds::CompileShader*>(cmd_data); |
436 GLuint shader = c.shader; | 436 GLuint shader = c.shader; |
437 error::Error error = DoCompileShader(shader); | 437 error::Error error = DoCompileShader(shader); |
438 if (error != error::kNoError) { | 438 if (error != error::kNoError) { |
439 return error; | 439 return error; |
440 } | 440 } |
441 return error::kNoError; | 441 return error::kNoError; |
442 } | 442 } |
443 | 443 |
444 error::Error GLES2DecoderPassthroughImpl::HandleCompressedTexSubImage2DBucket( | |
445 uint32_t immediate_data_size, | |
446 const volatile void* cmd_data) { | |
447 const volatile gles2::cmds::CompressedTexSubImage2DBucket& c = | |
448 *static_cast<const volatile gles2::cmds::CompressedTexSubImage2DBucket*>( | |
449 cmd_data); | |
450 GLenum target = static_cast<GLenum>(c.target); | |
451 GLint level = static_cast<GLint>(c.level); | |
452 GLint xoffset = static_cast<GLint>(c.xoffset); | |
453 GLint yoffset = static_cast<GLint>(c.yoffset); | |
454 GLsizei width = static_cast<GLsizei>(c.width); | |
455 GLsizei height = static_cast<GLsizei>(c.height); | |
456 GLenum format = static_cast<GLenum>(c.format); | |
457 GLuint bucket_id = static_cast<GLuint>(c.bucket_id); | |
458 Bucket* bucket = GetBucket(bucket_id); | |
459 if (!bucket) | |
460 return error::kInvalidArguments; | |
461 uint32_t data_size = bucket->size(); | |
462 GLsizei imageSize = data_size; | |
463 const void* data = bucket->GetData(0, data_size); | |
464 DCHECK(data || !imageSize); | |
465 error::Error error = DoCompressedTexSubImage2D( | |
466 target, level, xoffset, yoffset, width, height, format, imageSize, data); | |
467 if (error != error::kNoError) { | |
468 return error; | |
469 } | |
470 return error::kNoError; | |
471 } | |
472 | |
473 error::Error GLES2DecoderPassthroughImpl::HandleCompressedTexSubImage2D( | |
474 uint32_t immediate_data_size, | |
475 const volatile void* cmd_data) { | |
476 const volatile gles2::cmds::CompressedTexSubImage2D& c = | |
477 *static_cast<const volatile gles2::cmds::CompressedTexSubImage2D*>( | |
478 cmd_data); | |
479 GLenum target = static_cast<GLenum>(c.target); | |
480 GLint level = static_cast<GLint>(c.level); | |
481 GLint xoffset = static_cast<GLint>(c.xoffset); | |
482 GLint yoffset = static_cast<GLint>(c.yoffset); | |
483 GLsizei width = static_cast<GLsizei>(c.width); | |
484 GLsizei height = static_cast<GLsizei>(c.height); | |
485 GLenum format = static_cast<GLenum>(c.format); | |
486 GLsizei imageSize = static_cast<GLsizei>(c.imageSize); | |
487 uint32_t data_size = imageSize; | |
488 const void* data = GetSharedMemoryAs<const void*>( | |
489 c.data_shm_id, c.data_shm_offset, data_size); | |
490 error::Error error = DoCompressedTexSubImage2D( | |
491 target, level, xoffset, yoffset, width, height, format, imageSize, data); | |
492 if (error != error::kNoError) { | |
493 return error; | |
494 } | |
495 return error::kNoError; | |
496 } | |
497 | |
498 error::Error GLES2DecoderPassthroughImpl::HandleCompressedTexImage3DBucket( | |
499 uint32_t immediate_data_size, | |
500 const volatile void* cmd_data) { | |
501 const volatile gles2::cmds::CompressedTexImage3DBucket& c = | |
502 *static_cast<const volatile gles2::cmds::CompressedTexImage3DBucket*>( | |
503 cmd_data); | |
504 GLenum target = static_cast<GLenum>(c.target); | |
505 GLint level = static_cast<GLint>(c.level); | |
506 GLenum internalformat = static_cast<GLenum>(c.internalformat); | |
507 GLsizei width = static_cast<GLsizei>(c.width); | |
508 GLsizei height = static_cast<GLsizei>(c.height); | |
509 GLsizei depth = static_cast<GLsizei>(c.depth); | |
510 GLuint bucket_id = static_cast<GLuint>(c.bucket_id); | |
511 GLint border = static_cast<GLint>(c.border); | |
512 Bucket* bucket = GetBucket(bucket_id); | |
513 if (!bucket) | |
514 return error::kInvalidArguments; | |
515 uint32_t data_size = bucket->size(); | |
516 GLsizei imageSize = data_size; | |
517 const void* data = bucket->GetData(0, data_size); | |
518 DCHECK(data || !imageSize); | |
519 error::Error error = | |
520 DoCompressedTexImage3D(target, level, internalformat, width, height, | |
521 depth, border, imageSize, data); | |
522 if (error != error::kNoError) { | |
523 return error; | |
524 } | |
525 return error::kNoError; | |
526 } | |
527 | |
528 error::Error GLES2DecoderPassthroughImpl::HandleCompressedTexImage3D( | |
529 uint32_t immediate_data_size, | |
530 const volatile void* cmd_data) { | |
531 const volatile gles2::cmds::CompressedTexImage3D& c = | |
532 *static_cast<const volatile gles2::cmds::CompressedTexImage3D*>(cmd_data); | |
533 GLenum target = static_cast<GLenum>(c.target); | |
534 GLint level = static_cast<GLint>(c.level); | |
535 GLenum internalformat = static_cast<GLenum>(c.internalformat); | |
536 GLsizei width = static_cast<GLsizei>(c.width); | |
537 GLsizei height = static_cast<GLsizei>(c.height); | |
538 GLsizei depth = static_cast<GLsizei>(c.depth); | |
539 GLint border = static_cast<GLint>(c.border); | |
540 GLsizei imageSize = static_cast<GLsizei>(c.imageSize); | |
541 uint32_t data_size = imageSize; | |
542 const void* data = GetSharedMemoryAs<const void*>( | |
543 c.data_shm_id, c.data_shm_offset, data_size); | |
544 error::Error error = | |
545 DoCompressedTexImage3D(target, level, internalformat, width, height, | |
546 depth, border, imageSize, data); | |
547 if (error != error::kNoError) { | |
548 return error; | |
549 } | |
550 return error::kNoError; | |
551 } | |
552 | |
553 error::Error GLES2DecoderPassthroughImpl::HandleCompressedTexSubImage3DBucket( | |
554 uint32_t immediate_data_size, | |
555 const volatile void* cmd_data) { | |
556 const volatile gles2::cmds::CompressedTexSubImage3DBucket& c = | |
557 *static_cast<const volatile gles2::cmds::CompressedTexSubImage3DBucket*>( | |
558 cmd_data); | |
559 GLenum target = static_cast<GLenum>(c.target); | |
560 GLint level = static_cast<GLint>(c.level); | |
561 GLint xoffset = static_cast<GLint>(c.xoffset); | |
562 GLint yoffset = static_cast<GLint>(c.yoffset); | |
563 GLint zoffset = static_cast<GLint>(c.zoffset); | |
564 GLsizei width = static_cast<GLsizei>(c.width); | |
565 GLsizei height = static_cast<GLsizei>(c.height); | |
566 GLsizei depth = static_cast<GLsizei>(c.depth); | |
567 GLenum format = static_cast<GLenum>(c.format); | |
568 GLuint bucket_id = static_cast<GLuint>(c.bucket_id); | |
569 Bucket* bucket = GetBucket(bucket_id); | |
570 if (!bucket) | |
571 return error::kInvalidArguments; | |
572 uint32_t data_size = bucket->size(); | |
573 GLsizei imageSize = data_size; | |
574 const void* data = bucket->GetData(0, data_size); | |
575 DCHECK(data || !imageSize); | |
576 error::Error error = | |
577 DoCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, | |
578 height, depth, format, imageSize, data); | |
579 if (error != error::kNoError) { | |
580 return error; | |
581 } | |
582 return error::kNoError; | |
583 } | |
584 | |
585 error::Error GLES2DecoderPassthroughImpl::HandleCompressedTexSubImage3D( | |
586 uint32_t immediate_data_size, | |
587 const volatile void* cmd_data) { | |
588 const volatile gles2::cmds::CompressedTexSubImage3D& c = | |
589 *static_cast<const volatile gles2::cmds::CompressedTexSubImage3D*>( | |
590 cmd_data); | |
591 GLenum target = static_cast<GLenum>(c.target); | |
592 GLint level = static_cast<GLint>(c.level); | |
593 GLint xoffset = static_cast<GLint>(c.xoffset); | |
594 GLint yoffset = static_cast<GLint>(c.yoffset); | |
595 GLint zoffset = static_cast<GLint>(c.zoffset); | |
596 GLsizei width = static_cast<GLsizei>(c.width); | |
597 GLsizei height = static_cast<GLsizei>(c.height); | |
598 GLsizei depth = static_cast<GLsizei>(c.depth); | |
599 GLenum format = static_cast<GLenum>(c.format); | |
600 GLsizei imageSize = static_cast<GLsizei>(c.imageSize); | |
601 uint32_t data_size = imageSize; | |
602 const void* data = GetSharedMemoryAs<const void*>( | |
603 c.data_shm_id, c.data_shm_offset, data_size); | |
604 error::Error error = | |
605 DoCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, | |
606 height, depth, format, imageSize, data); | |
607 if (error != error::kNoError) { | |
608 return error; | |
609 } | |
610 return error::kNoError; | |
611 } | |
612 | |
613 error::Error GLES2DecoderPassthroughImpl::HandleCopyBufferSubData( | 444 error::Error GLES2DecoderPassthroughImpl::HandleCopyBufferSubData( |
614 uint32_t immediate_data_size, | 445 uint32_t immediate_data_size, |
615 const volatile void* cmd_data) { | 446 const volatile void* cmd_data) { |
616 const volatile gles2::cmds::CopyBufferSubData& c = | 447 const volatile gles2::cmds::CopyBufferSubData& c = |
617 *static_cast<const volatile gles2::cmds::CopyBufferSubData*>(cmd_data); | 448 *static_cast<const volatile gles2::cmds::CopyBufferSubData*>(cmd_data); |
618 GLenum readtarget = static_cast<GLenum>(c.readtarget); | 449 GLenum readtarget = static_cast<GLenum>(c.readtarget); |
619 GLenum writetarget = static_cast<GLenum>(c.writetarget); | 450 GLenum writetarget = static_cast<GLenum>(c.writetarget); |
620 GLintptr readoffset = static_cast<GLintptr>(c.readoffset); | 451 GLintptr readoffset = static_cast<GLintptr>(c.readoffset); |
621 GLintptr writeoffset = static_cast<GLintptr>(c.writeoffset); | 452 GLintptr writeoffset = static_cast<GLintptr>(c.writeoffset); |
622 GLsizeiptr size = static_cast<GLsizeiptr>(c.size); | 453 GLsizeiptr size = static_cast<GLsizeiptr>(c.size); |
(...skipping 3671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4294 error::Error error = DoUniformMatrix4fvStreamTextureMatrixCHROMIUM( | 4125 error::Error error = DoUniformMatrix4fvStreamTextureMatrixCHROMIUM( |
4295 location, transpose, transform); | 4126 location, transpose, transform); |
4296 if (error != error::kNoError) { | 4127 if (error != error::kNoError) { |
4297 return error; | 4128 return error; |
4298 } | 4129 } |
4299 return error::kNoError; | 4130 return error::kNoError; |
4300 } | 4131 } |
4301 | 4132 |
4302 } // namespace gles2 | 4133 } // namespace gles2 |
4303 } // namespace gpu | 4134 } // namespace gpu |
OLD | NEW |