Document non-use of certain operand types

Operand class enum values not used in the syntax table:
- Image channel order: only used to describe a return value
- Image channel type: only used to describe a return value
- "Image operands": used to make a section in the spec
  to describe values used to construct an optional image id,
  but does not itself appear in the syntax table.

Removes some TODOs from opcode.cpp.
This commit is contained in:
David Neto 2015-09-28 15:33:49 -04:00
Родитель 71fc05587b
Коммит 7cefb23ddb
1 изменённых файлов: 12 добавлений и 4 удалений

Просмотреть файл

@ -127,9 +127,17 @@ spv_operand_type_t convertOperandClassToType(spv::Op opcode,
case OperandSamplerAddressingMode: return SPV_OPERAND_TYPE_SAMPLER_ADDRESSING_MODE;
case OperandSamplerFilterMode: return SPV_OPERAND_TYPE_SAMPLER_FILTER_MODE;
case OperandSamplerImageFormat: return SPV_OPERAND_TYPE_SAMPLER_IMAGE_FORMAT;
case OperandImageChannelOrder: return SPV_OPERAND_TYPE_NONE; //TODO
case OperandImageChannelDataType: return SPV_OPERAND_TYPE_NONE; //TODO
case OperandImageOperands: return SPV_OPERAND_TYPE_NONE; //TODO
case OperandImageChannelOrder:
// This is only used to describe the value generated by OpImageQueryOrder.
// It is not used as an operand.
break;
case OperandImageChannelDataType:
// This is only used to describe the value generated by OpImageQueryFormat.
// It is not used as an operand.
break;
case OperandImageOperands:
// This is not used. It's only an artifact of spec generation.
break;
case OperandFPFastMath: return SPV_OPERAND_TYPE_FP_FAST_MATH_MODE;
case OperandFPRoundingMode: return SPV_OPERAND_TYPE_FP_ROUNDING_MODE;
case OperandLinkageType: return SPV_OPERAND_TYPE_LINKAGE_TYPE;
@ -142,7 +150,7 @@ spv_operand_type_t convertOperandClassToType(spv::Op opcode,
case OperandFunction: return SPV_OPERAND_TYPE_FUNCTION_CONTROL;
case OperandMemorySemantics: return SPV_OPERAND_TYPE_MEMORY_SEMANTICS;
case OperandMemoryAccess:
// This case does not occur in Rev 31.
// This case does not occur in the table for SPIR-V 0.99 Rev 32.
// We expect that it will become SPV_OPERAND_TYPE_OPTIONAL_MEMORY_ACCESS,
// and we can remove the special casing above for memory operation
// instructions.