Commit 827fb6ad by Zhenyao Mo

Build fix: not all types support precisions.

Currently Angle translator made the wrong assumption that all variables have a precision, and ASSERT that. BUG=276031 TBR=alokp@chromium.org Review URL: https://codereview.appspot.com/13113044
parent 6d3511e0
...@@ -109,9 +109,10 @@ typedef enum { ...@@ -109,9 +109,10 @@ typedef enum {
} ShDataType; } ShDataType;
typedef enum { typedef enum {
SH_PRECISION_HIGHP = 0x5001, SH_PRECISION_HIGHP = 0x5001,
SH_PRECISION_MEDIUMP = 0x5002, SH_PRECISION_MEDIUMP = 0x5002,
SH_PRECISION_LOWP = 0x5003 SH_PRECISION_LOWP = 0x5003,
SH_PRECISION_UNDEFINED = 0
} ShPrecisionType; } ShPrecisionType;
typedef enum { typedef enum {
......
#define MAJOR_VERSION 1 #define MAJOR_VERSION 1
#define MINOR_VERSION 2 #define MINOR_VERSION 2
#define BUILD_VERSION 0 #define BUILD_VERSION 0
#define BUILD_REVISION 2439 #define BUILD_REVISION 2440
#define STRINGIFY(x) #x #define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x) #define MACRO_STRINGIFY(x) STRINGIFY(x)
......
...@@ -284,7 +284,9 @@ void ShGetVariableInfo(const ShHandle handle, ...@@ -284,7 +284,9 @@ void ShGetVariableInfo(const ShHandle handle,
*precision = SH_PRECISION_HIGHP; *precision = SH_PRECISION_HIGHP;
break; break;
default: default:
ASSERT(false); // Some types does not support precision, for example, boolean.
*precision = SH_PRECISION_UNDEFINED;
break;
} }
// This size must match that queried by // This size must match that queried by
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment