Skip to content

Commit

Permalink
Update comment to more succint that 8/16-bit composites can't be dire…
Browse files Browse the repository at this point in the history
…ctly constructed

Earlier the comment looked misleading that composites of 8/16-bit types can't be constructed at all.
As per the GL_EXT_shader_16bit_storage extension, they can't be constructed directly, however, can be constructed indirectly.
  • Loading branch information
ravi688 authored and arcady-lunarg committed Aug 2, 2024
1 parent 8590f62 commit 48154f1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions glslang/MachineIndependent/ParseHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8539,7 +8539,7 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T
case EOpConstructF16Mat4x4:
case EOpConstructFloat16:
basicOp = EOpConstructFloat16;
// 8/16-bit storage extensions don't support constructing composites of 8/16-bit types,
// 8/16-bit storage extensions don't support direct constructing composites of 8/16-bit types,
// so construct a 32-bit type and convert
// and do not generate any conversion if it is an identity conversion, i.e. float16_t(<float16_t> var)
if (!intermediate.getArithemeticFloat16Enabled() && (node->getBasicType() != EbtFloat16)) {
Expand All @@ -8563,7 +8563,7 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T
case EOpConstructI8Vec4:
case EOpConstructInt8:
basicOp = EOpConstructInt8;
// 8/16-bit storage extensions don't support constructing composites of 8/16-bit types,
// 8/16-bit storage extensions don't support direct constructing composites of 8/16-bit types,
// so construct a 32-bit type and convert
// and do not generate any conversion if it is an identity conversion, i.e. int8_t(<int8_t> var)
if (!intermediate.getArithemeticInt8Enabled() && (node->getBasicType() != EbtInt8)) {
Expand All @@ -8587,7 +8587,7 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T
case EOpConstructU8Vec4:
case EOpConstructUint8:
basicOp = EOpConstructUint8;
// 8/16-bit storage extensions don't support constructing composites of 8/16-bit types,
// 8/16-bit storage extensions don't support direct constructing composites of 8/16-bit types,
// so construct a 32-bit type and convert
// and do not generate any conversion if it is an identity conversion, i.e. uint8_t(<uint8_t> var)
if (!intermediate.getArithemeticInt8Enabled() && (node->getBasicType() != EbtUint8)) {
Expand All @@ -8611,7 +8611,7 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T
case EOpConstructI16Vec4:
case EOpConstructInt16:
basicOp = EOpConstructInt16;
// 8/16-bit storage extensions don't support constructing composites of 8/16-bit types,
// 8/16-bit storage extensions don't support direct constructing composites of 8/16-bit types,
// so construct a 32-bit type and convert
// and do not generate any conversion if it is an identity conversion, i.e. int16_t(<int16_t> var)
if (!intermediate.getArithemeticInt16Enabled() && (node->getBasicType() != EbtInt16)) {
Expand All @@ -8635,7 +8635,7 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T
case EOpConstructU16Vec4:
case EOpConstructUint16:
basicOp = EOpConstructUint16;
// 8/16-bit storage extensions don't support constructing composites of 8/16-bit types,
// 8/16-bit storage extensions don't support direct constructing composites of 8/16-bit types,
// so construct a 32-bit type and convert
// and do not generate any conversion if it is an identity conversion, i.e. uint16_t(<uint16_t> var)
if (!intermediate.getArithemeticInt16Enabled() && (node->getBasicType() != EbtUint16)) {
Expand Down

0 comments on commit 48154f1

Please sign in to comment.