HLSL: Map min types to GLSL 16-bit types
This commit is contained in:
parent
02538357c8
commit
cb61eec948
4 changed files with 20 additions and 1 deletions
|
|
@ -1379,12 +1379,23 @@ bool HlslGrammar::acceptType(TType& type, TIntermNode*& nodeList)
|
|||
{
|
||||
// Basic types for min* types, broken out here in case of future
|
||||
// changes, e.g, to use native halfs.
|
||||
#ifdef AMD_EXTENSIONS
|
||||
bool enable16BitTypes = parseContext.hlslEnable16BitTypes();
|
||||
|
||||
const TBasicType min16float_bt = enable16BitTypes ? EbtFloat16 : EbtFloat;
|
||||
const TBasicType min10float_bt = enable16BitTypes ? EbtFloat16 : EbtFloat;
|
||||
const TBasicType half_bt = enable16BitTypes ? EbtFloat16 : EbtFloat;
|
||||
const TBasicType min16int_bt = enable16BitTypes ? EbtInt16 : EbtInt;
|
||||
const TBasicType min12int_bt = enable16BitTypes ? EbtInt16 : EbtInt;
|
||||
const TBasicType min16uint_bt = enable16BitTypes ? EbtUint16 : EbtUint;
|
||||
#else
|
||||
static const TBasicType min16float_bt = EbtFloat;
|
||||
static const TBasicType min10float_bt = EbtFloat;
|
||||
static const TBasicType half_bt = EbtFloat;
|
||||
static const TBasicType min16int_bt = EbtInt;
|
||||
static const TBasicType min12int_bt = EbtInt;
|
||||
static const TBasicType min16uint_bt = EbtUint;
|
||||
#endif
|
||||
|
||||
// Some types might have turned into identifiers. Take the hit for checking
|
||||
// when this has happened.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue