Пример #1
0
int test() {
	CASE0("abc");
	CASE0("a\tc");
	CASE0("a\bc");
	CASE0("a\b\nc");
	CASE0("a\'\"\\c");
	CASE0("ac\x0e");
	CASE0("ac\x7f");
	CASE1("abc");
	CASE1("a\\tc");
	CASE1("a\\bc");
	CASE1("a\\b\\nc");
	CASE1("a\\\'\\\"\\\\c");
	CASE1("ac\\x0e");
	CASE1("ac\\x7f");
	CASE2("abc");
	CASE2("a\tc");
	CASE2("a\bc");
	CASE2("a\b\nc");
	CASE2("a\'\"\\c");
	CASE2("ac\x0e");
	CASE2("ac\x7f");
	CASE3("abc");
	CASE3("a\\tc");
	CASE3("a\\bc");
	CASE3("a\\b\\nc");
	CASE3("a\\\'\\\"\\\\c");
	CASE3("ac\\x0e");
	CASE3("ac\\x7f");
	return 0;
}
Пример #2
0
     {SPV_OPERAND_TYPE_NONE}},
};

static const spv_operand_desc_t samplerImageFormatEntries[] = {
#define CASE0(NAME)                                           \
  {                                                           \
    #NAME, SpvImageFormat##NAME, 0, { SPV_OPERAND_TYPE_NONE } \
  }
#define CASE(NAME, CAP)                                                        \
  {                                                                            \
    #NAME, SpvImageFormat##NAME, SPV_CAPABILITY_AS_MASK(SpvCapability##CAP), { \
      SPV_OPERAND_TYPE_NONE                                                    \
    }                                                                          \
  }
    // clang-format off
  CASE0(Unknown),
  CASE(Rgba32f, Shader),
  CASE(Rgba16f, Shader),
  CASE(R32f, Shader),
  CASE(Rgba8, Shader),
  CASE(Rgba8Snorm, Shader),
  CASE(Rg32f, StorageImageExtendedFormats),
  CASE(Rg16f, StorageImageExtendedFormats),
  CASE(R11fG11fB10f, StorageImageExtendedFormats),
  CASE(R16f, StorageImageExtendedFormats),
  CASE(Rgba16, StorageImageExtendedFormats),
  CASE(Rgb10A2, StorageImageExtendedFormats),
  CASE(Rg16, StorageImageExtendedFormats),
  CASE(Rg8, StorageImageExtendedFormats),
  CASE(R16, StorageImageExtendedFormats),
  CASE(R8, StorageImageExtendedFormats),