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

Side by Side Diff: gpu/command_buffer/common/gles2_cmd_utils.cc

Issue 2767063002: 16-bit video upload to float: intermediate R16_EXT and copy to float. (Closed)
Patch Set: Nit. 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
« no previous file with comments | « gpu/command_buffer/common/capabilities.h ('k') | gpu/command_buffer/service/feature_info.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // This file is here so other GLES2 related files can have a common set of 5 // This file is here so other GLES2 related files can have a common set of
6 // includes where appropriate. 6 // includes where appropriate.
7 7
8 #include "gpu/command_buffer/common/gles2_cmd_utils.h" 8 #include "gpu/command_buffer/common/gles2_cmd_utils.h"
9 9
10 #include <GLES2/gl2.h> 10 #include <GLES2/gl2.h>
(...skipping 1453 matching lines...) Expand 10 before | Expand all | Expand 10 after
1464 break; 1464 break;
1465 case GL_R8: 1465 case GL_R8:
1466 case GL_R8_SNORM: 1466 case GL_R8_SNORM:
1467 case GL_R8UI: 1467 case GL_R8UI:
1468 case GL_R8I: 1468 case GL_R8I:
1469 *r = 8; 1469 *r = 8;
1470 break; 1470 break;
1471 case GL_R16F: 1471 case GL_R16F:
1472 case GL_R16UI: 1472 case GL_R16UI:
1473 case GL_R16I: 1473 case GL_R16I:
1474 case GL_R16_EXT:
1474 *r = 16; 1475 *r = 16;
1475 break; 1476 break;
1476 case GL_R32F: 1477 case GL_R32F:
1477 case GL_R32UI: 1478 case GL_R32UI:
1478 case GL_R32I: 1479 case GL_R32I:
1479 *r = 32; 1480 *r = 32;
1480 break; 1481 break;
1481 case GL_RG8: 1482 case GL_RG8:
1482 case GL_RG8_SNORM: 1483 case GL_RG8_SNORM:
1483 case GL_RG8UI: 1484 case GL_RG8UI:
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
1758 } 1759 }
1759 break; 1760 break;
1760 case GL_RED: 1761 case GL_RED:
1761 switch (type) { 1762 switch (type) {
1762 case GL_UNSIGNED_BYTE: 1763 case GL_UNSIGNED_BYTE:
1763 return GL_R8; 1764 return GL_R8;
1764 case GL_HALF_FLOAT_OES: 1765 case GL_HALF_FLOAT_OES:
1765 return GL_R16F; 1766 return GL_R16F;
1766 case GL_FLOAT: 1767 case GL_FLOAT:
1767 return GL_R32F; 1768 return GL_R32F;
1769 case GL_UNSIGNED_SHORT:
1770 return GL_R16_EXT;
1768 default: 1771 default:
1769 NOTREACHED(); 1772 NOTREACHED();
1770 break; 1773 break;
1771 } 1774 }
1772 break; 1775 break;
1773 case GL_RG: 1776 case GL_RG:
1774 switch (type) { 1777 switch (type) {
1775 case GL_UNSIGNED_BYTE: 1778 case GL_UNSIGNED_BYTE:
1776 return GL_RG8; 1779 return GL_RG8;
1777 case GL_HALF_FLOAT_OES: 1780 case GL_HALF_FLOAT_OES:
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
1995 } 1998 }
1996 } 1999 }
1997 2000
1998 return true; 2001 return true;
1999 } 2002 }
2000 2003
2001 #include "gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h" 2004 #include "gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h"
2002 2005
2003 } // namespace gles2 2006 } // namespace gles2
2004 } // namespace gpu 2007 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/common/capabilities.h ('k') | gpu/command_buffer/service/feature_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698