SPIRV-Cross/shaders-msl/asm/frag/texture-sampling-fp16.asm.frag
Chip Davis 343c6f4ff4 Update external repos.
Fix fallout from changes.

There's a bug in glslang that prevents `float16_t`, `[u]int16_t`, and
`[u]int8_t` constants from adding the corresponding SPIR-V capabilities.
SPIRV-Tools, meanwhile, tightened validation so that these constants are
only valid if the corresponding `Float16`, `Int16`, and `Int8` caps are
on. This affects the `16bit-constants.frag` test for GLSL and MSL.
2019-07-13 16:50:21 -05:00

48 lines
1.9 KiB
JavaScript

; SPIR-V
; Version: 1.0
; Generator: Khronos Glslang Reference Front End; 7
; Bound: 25
; Schema: 0
OpCapability Shader
OpCapability StorageInputOutput16
OpCapability Float16
OpExtension "SPV_KHR_16bit_storage"
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %FragColor %UV
OpExecutionMode %main OriginUpperLeft
OpSource GLSL 450
OpSourceExtension "GL_EXT_shader_explicit_arithmetic_types_float16"
OpName %main "main"
OpName %FragColor "FragColor"
OpName %uTexture "uTexture"
OpName %UV "UV"
OpDecorate %FragColor Location 0
OpDecorate %uTexture DescriptorSet 0
OpDecorate %uTexture Binding 0
OpDecorate %UV Location 0
%void = OpTypeVoid
%3 = OpTypeFunction %void
%half = OpTypeFloat 16
%float = OpTypeFloat 32
%v4half = OpTypeVector %half 4
%v4float = OpTypeVector %float 4
%_ptr_Output_v4half = OpTypePointer Output %v4half
%FragColor = OpVariable %_ptr_Output_v4half Output
%11 = OpTypeImage %float 2D 0 0 0 1 Unknown
%12 = OpTypeSampledImage %11
%_ptr_UniformConstant_12 = OpTypePointer UniformConstant %12
%uTexture = OpVariable %_ptr_UniformConstant_12 UniformConstant
%v2half = OpTypeVector %half 2
%_ptr_Input_v2half = OpTypePointer Input %v2half
%UV = OpVariable %_ptr_Input_v2half Input
%main = OpFunction %void None %3
%5 = OpLabel
%15 = OpLoad %12 %uTexture
%19 = OpLoad %v2half %UV
%23 = OpImageSampleImplicitLod %v4float %15 %19
%24 = OpFConvert %v4half %23
OpStore %FragColor %24
OpReturn
OpFunctionEnd