[GPU] XeSL swap shaders

This commit is contained in:
Triang3l 2022-06-24 23:24:30 +03:00
parent b7737d70ca
commit 7a4732e14f
42 changed files with 3977 additions and 882 deletions

View File

@ -1235,7 +1235,7 @@ bool D3D12CommandProcessor::SetupContext() {
apply_gamma_root_descriptor_range_source.RangeType = apply_gamma_root_descriptor_range_source.RangeType =
D3D12_DESCRIPTOR_RANGE_TYPE_SRV; D3D12_DESCRIPTOR_RANGE_TYPE_SRV;
apply_gamma_root_descriptor_range_source.NumDescriptors = 1; apply_gamma_root_descriptor_range_source.NumDescriptors = 1;
apply_gamma_root_descriptor_range_source.BaseShaderRegister = 0; apply_gamma_root_descriptor_range_source.BaseShaderRegister = 1;
apply_gamma_root_descriptor_range_source.RegisterSpace = 0; apply_gamma_root_descriptor_range_source.RegisterSpace = 0;
apply_gamma_root_descriptor_range_source.OffsetInDescriptorsFromTableStart = apply_gamma_root_descriptor_range_source.OffsetInDescriptorsFromTableStart =
0; 0;
@ -1254,7 +1254,7 @@ bool D3D12CommandProcessor::SetupContext() {
apply_gamma_root_descriptor_range_ramp.RangeType = apply_gamma_root_descriptor_range_ramp.RangeType =
D3D12_DESCRIPTOR_RANGE_TYPE_SRV; D3D12_DESCRIPTOR_RANGE_TYPE_SRV;
apply_gamma_root_descriptor_range_ramp.NumDescriptors = 1; apply_gamma_root_descriptor_range_ramp.NumDescriptors = 1;
apply_gamma_root_descriptor_range_ramp.BaseShaderRegister = 1; apply_gamma_root_descriptor_range_ramp.BaseShaderRegister = 0;
apply_gamma_root_descriptor_range_ramp.RegisterSpace = 0; apply_gamma_root_descriptor_range_ramp.RegisterSpace = 0;
apply_gamma_root_descriptor_range_ramp.OffsetInDescriptorsFromTableStart = 0; apply_gamma_root_descriptor_range_ramp.OffsetInDescriptorsFromTableStart = 0;
{ {
@ -1964,7 +1964,7 @@ void D3D12CommandProcessor::IssueSwap(uint32_t frontbuffer_ptr,
} }
SetExternalPipeline(apply_gamma_pipeline); SetExternalPipeline(apply_gamma_pipeline);
SubmitBarriers(); SubmitBarriers();
uint32_t group_count_x = (uint32_t(swap_texture_desc.Width) + 7) / 8; uint32_t group_count_x = (uint32_t(swap_texture_desc.Width) + 15) / 16;
uint32_t group_count_y = (uint32_t(swap_texture_desc.Height) + 7) / 8; uint32_t group_count_y = (uint32_t(swap_texture_desc.Height) + 7) / 8;
deferred_command_list_.D3DDispatch(group_count_x, group_count_y, 1); deferred_command_list_.D3DDispatch(group_count_x, group_count_y, 1);

View File

@ -78,7 +78,7 @@ namespace d3d12 {
// Generated with `xb buildshaders`. // Generated with `xb buildshaders`.
namespace shaders { namespace shaders {
#include "xenia/gpu/shaders/bytecode/d3d12_5_1/clear_uint2_ps.h" #include "xenia/gpu/shaders/bytecode/d3d12_5_1/clear_uint2_ps.h"
#include "xenia/gpu/shaders/bytecode/d3d12_5_1/fullscreen_vs.h" #include "xenia/gpu/shaders/bytecode/d3d12_5_1/fullscreen_cw_vs.h"
#include "xenia/gpu/shaders/bytecode/d3d12_5_1/host_depth_store_1xmsaa_cs.h" #include "xenia/gpu/shaders/bytecode/d3d12_5_1/host_depth_store_1xmsaa_cs.h"
#include "xenia/gpu/shaders/bytecode/d3d12_5_1/host_depth_store_2xmsaa_cs.h" #include "xenia/gpu/shaders/bytecode/d3d12_5_1/host_depth_store_2xmsaa_cs.h"
#include "xenia/gpu/shaders/bytecode/d3d12_5_1/host_depth_store_4xmsaa_cs.h" #include "xenia/gpu/shaders/bytecode/d3d12_5_1/host_depth_store_4xmsaa_cs.h"
@ -954,9 +954,10 @@ bool D3D12RenderTargetCache::Initialize() {
D3D12_GRAPHICS_PIPELINE_STATE_DESC uint32_rtv_clear_pipeline_desc = {}; D3D12_GRAPHICS_PIPELINE_STATE_DESC uint32_rtv_clear_pipeline_desc = {};
uint32_rtv_clear_pipeline_desc.pRootSignature = uint32_rtv_clear_pipeline_desc.pRootSignature =
uint32_rtv_clear_root_signature_; uint32_rtv_clear_root_signature_;
uint32_rtv_clear_pipeline_desc.VS.pShaderBytecode = shaders::fullscreen_vs; uint32_rtv_clear_pipeline_desc.VS.pShaderBytecode =
shaders::fullscreen_cw_vs;
uint32_rtv_clear_pipeline_desc.VS.BytecodeLength = uint32_rtv_clear_pipeline_desc.VS.BytecodeLength =
sizeof(shaders::fullscreen_vs); sizeof(shaders::fullscreen_cw_vs);
uint32_rtv_clear_pipeline_desc.PS.pShaderBytecode = shaders::clear_uint2_ps; uint32_rtv_clear_pipeline_desc.PS.pShaderBytecode = shaders::clear_uint2_ps;
uint32_rtv_clear_pipeline_desc.PS.BytecodeLength = uint32_rtv_clear_pipeline_desc.PS.BytecodeLength =
sizeof(shaders::clear_uint2_ps); sizeof(shaders::clear_uint2_ps);

View File

@ -1,2 +0,0 @@
float XeApplyGammaGetAlpha(float3 color) { return 1.0f; }
#include "apply_gamma_pwl.hlsli"

View File

@ -0,0 +1,11 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2022 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#define XE_APPLY_GAMMA_COMPUTE
#include "apply_gamma_pwl.xesli"

View File

@ -1,40 +0,0 @@
// float XeApplyGammaGetAlpha(float3 color) needs to be specified externally.
cbuffer XeApplyGammaRampConstants : register(b0) {
uint2 xe_apply_gamma_size;
};
RWTexture2D<unorm float4> xe_apply_gamma_dest : register(u0);
Texture2D<float3> xe_apply_gamma_source : register(t0);
Buffer<uint2> xe_apply_gamma_ramp : register(t1);
float XeApplyPWLGamma(uint input, uint component) {
// TODO(Triang3l): If this is ever used for gamma other than 128 entries for a
// 10bpc front buffer, handle the increment from DC_LUTA/B_CONTROL. Currently
// assuming it's 2^3 = 8, or 1024 / 128.
// output = base + (multiplier * delta) / increment
// https://developer.amd.com/wordpress/media/2012/10/RRG-216M56-03oOEM.pdf
// The lower 6 bits of the base and the delta are 0 (though enforcing that in
// the shader is not necessary).
// The `(multiplier * delta) / increment` part may result in a nonzero value
// in the lower 6 bits of the result, however, so doing `* (1.0f / 64.0f)`
// instead of `>> 6` to preserve them (if the render target is 16bpc rather
// than 10bpc, for instance).
uint2 ramp_value = xe_apply_gamma_ramp[(input >> 3u) * 3u + component];
return saturate((float(ramp_value.x) +
float((input & 7u) * ramp_value.y) * (1.0f / 8.0f)) *
(1.0f / (64.0f * 1023.0f)));
}
[numthreads(8, 8, 1)]
void main(uint3 xe_thread_id : SV_DispatchThreadID) {
[branch] if (any(xe_thread_id.xy >= xe_apply_gamma_size)) {
return;
}
// UNORM conversion according to the Direct3D 10+ rules.
uint3 input = uint3(xe_apply_gamma_source[xe_thread_id.xy] * 1023.0f + 0.5f);
float3 output = float3(XeApplyPWLGamma(input.r, 0u),
XeApplyPWLGamma(input.g, 1u),
XeApplyPWLGamma(input.b, 2u));
xe_apply_gamma_dest[xe_thread_id.xy] =
float4(output, XeApplyGammaGetAlpha(output));
}

View File

@ -0,0 +1,10 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2022 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#include "apply_gamma_pwl.xesli"

View File

@ -0,0 +1,107 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2022 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#include "../../ui/shaders/xesl.xesli"
float XeApplyPWLGamma(uint input_value, xesl_uint2 ramp_value) {
// output = base + (multiplier * delta) / increment
// https://developer.amd.com/wordpress/media/2012/10/RRG-216M56-03oOEM.pdf
// The lower 6 bits of the base and the delta are 0 (though enforcing that in
// the shader is not necessary).
// The `(multiplier * delta) / increment` part may result in a nonzero value
// in the lower 6 bits of the result, however, so doing `* (1.0f / 64.0f)`
// instead of `>> 6` to preserve them (if the render target is 16bpc rather
// than 10bpc, for instance).
return xesl_saturate(
(float(ramp_value.x) +
float((input_value & 7u) * ramp_value.y) * (1.0 / 8.0)) *
(1.0 / (64.0 * 1023.0)));
}
#ifdef XE_APPLY_GAMMA_COMPUTE
#ifdef XE_APPLY_GAMMA_FXAA_LUMA
#define XE_APPLY_GAMMA_DEST_FORMAT xesl_imageFormat_rgba16f
#else
#define XE_APPLY_GAMMA_DEST_FORMAT xesl_imageFormat_rgb10_a2
#endif
xesl_pushConstants_begin(b0, space0)
xesl_uint2 xe_apply_gamma_size;
xesl_pushConstants_end
#define xesl_localSize_x 16
#define xesl_localSize_y 8
#define xesl_localSize_z 1
xesl_entry_bindings_begin_compute
xesl_pushConstants_binding(buffer(0))
xesl_entry_binding_next
xesl_texture(xesl_utextureBuffer, xe_apply_gamma_ramp, set=0, binding=0, t0,
space0, texture(0))
xesl_entry_binding_next
xesl_texture(xesl_texture2D, xe_apply_gamma_source, set=1, binding=0, t1,
space0, texture(1))
xesl_entry_binding_next
xesl_writeImage(xesl_image2D, XE_APPLY_GAMMA_DEST_FORMAT, xe_apply_gamma_dest,
set=2, binding=0, u0, space0, texture(2))
xesl_entry_bindings_end_inputs_begin_compute
xesl_entry_input_globalInvocationID
xesl_entry_inputs_end_code_begin_compute
xesl_uint2 pixel_index = xesl_GlobalInvocationID.xy;
xesl_dont_flatten
if (any(xesl_greaterThanEqual(pixel_index,
xesl_pushConstant(xe_apply_gamma_size)))) {
return;
}
#else
xesl_entry_outputs_begin
xesl_entry_output_target(xesl_float4, xe_apply_gamma_dest, 0)
xesl_entry_outputs_end_stageInputs_begin
xesl_entry_stageInputs_end_bindings_begin_pixel
xesl_texture(xesl_utextureBuffer, xe_apply_gamma_ramp, set=0, binding=0, t0,
space0, texture(0))
xesl_entry_binding_next
xesl_texture(xesl_texture2D, xe_apply_gamma_source, set=1, binding=0, t1,
space0, texture(1))
xesl_entry_bindings_end_inputs_begin
xesl_entry_input_fragCoord
xesl_entry_inputs_end_code_begin
xesl_uint2 pixel_index = xesl_uint2(xesl_FragCoord.xy);
#endif // XE_APPLY_GAMMA_COMPUTE
// UNORM conversion according to the Direct3D 10+ rules.
xesl_uint3 apply_gamma_input = xesl_uint3(
xesl_texelFetch2D(xe_apply_gamma_source, pixel_index, 0).rgb * 1023.0 +
0.5);
// TODO(Triang3l): If this is ever used for gamma other than 128 entries for a
// 10bpc front buffer, handle the increment from DC_LUTA/B_CONTROL. Currently
// assuming it's 2^3 = 8, or 1024 / 128.
xesl_float4 apply_gamma_output;
apply_gamma_output.r = XeApplyPWLGamma(
apply_gamma_input.r,
xesl_texelFetchBuffer(xe_apply_gamma_ramp,
(apply_gamma_input.r >> 3u) * 3u).rg);
apply_gamma_output.g = XeApplyPWLGamma(
apply_gamma_input.g,
xesl_texelFetchBuffer(xe_apply_gamma_ramp,
(apply_gamma_input.g >> 3u) * 3u + 1u).rg);
apply_gamma_output.b = XeApplyPWLGamma(
apply_gamma_input.b,
xesl_texelFetchBuffer(xe_apply_gamma_ramp,
(apply_gamma_input.b >> 3u) * 3u + 2u).rg);
#ifdef XE_APPLY_GAMMA_FXAA_LUMA
// Perceptual luma.
apply_gamma_output.a =
dot(apply_gamma_output.rgb, xesl_float3(0.299, 0.587, 0.114));
#else
apply_gamma_output.a = 1.0;
#endif
#ifdef XE_APPLY_GAMMA_COMPUTE
xesl_imageStore2DRGBA(xe_apply_gamma_dest, pixel_index, apply_gamma_output);
xesl_entry_code_end_compute
#else
xesl_Output(xe_apply_gamma_dest) = apply_gamma_output;
xesl_entry_code_end
#endif

View File

@ -1,5 +0,0 @@
// Perceptual luminance for FXAA.
float XeApplyGammaGetAlpha(float3 color) {
return dot(color, float3(0.299, 0.587, 0.114));
}
#include "apply_gamma_pwl.hlsli"

View File

@ -0,0 +1,12 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2022 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#define XE_APPLY_GAMMA_FXAA_LUMA
#define XE_APPLY_GAMMA_COMPUTE
#include "apply_gamma_pwl.xesli"

View File

@ -0,0 +1,11 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2022 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#define XE_APPLY_GAMMA_FXAA_LUMA
#include "apply_gamma_pwl.xesli"

View File

@ -1,2 +0,0 @@
float XeApplyGammaGetAlpha(float3 color) { return 1.0f; }
#include "apply_gamma_table.hlsli"

View File

@ -0,0 +1,11 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2022 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#define XE_APPLY_GAMMA_COMPUTE
#include "apply_gamma_table.xesli"

View File

@ -1,24 +0,0 @@
// float XeApplyGammaGetAlpha(float3 color) needs to be specified externally.
cbuffer XeApplyGammaRampConstants : register(b0) {
uint2 xe_apply_gamma_size;
};
RWTexture2D<unorm float4> xe_apply_gamma_dest : register(u0);
Texture2D<float3> xe_apply_gamma_source : register(t0);
Buffer<float3> xe_apply_gamma_ramp : register(t1);
[numthreads(8, 8, 1)]
void main(uint3 xe_thread_id : SV_DispatchThreadID) {
[branch] if (any(xe_thread_id.xy >= xe_apply_gamma_size)) {
return;
}
// UNORM conversion according to the Direct3D 10+ rules.
uint3 input = uint3(xe_apply_gamma_source[xe_thread_id.xy] * 255.0f + 0.5f);
// The ramp has blue in bits 0:9, green in 10:19, red in 20:29 - BGR passed as
// an R10G10B10A2 buffer.
float3 output = float3(xe_apply_gamma_ramp[input.r].b,
xe_apply_gamma_ramp[input.g].g,
xe_apply_gamma_ramp[input.b].r);
xe_apply_gamma_dest[xe_thread_id.xy] =
float4(output, XeApplyGammaGetAlpha(output));
}

View File

@ -0,0 +1,10 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2022 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#include "apply_gamma_table.xesli"

View File

@ -0,0 +1,86 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2022 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#include "../../ui/shaders/xesl.xesli"
#ifdef XE_APPLY_GAMMA_COMPUTE
#ifdef XE_APPLY_GAMMA_FXAA_LUMA
#define XE_APPLY_GAMMA_DEST_FORMAT xesl_imageFormat_rgba16f
#else
#define XE_APPLY_GAMMA_DEST_FORMAT xesl_imageFormat_rgb10_a2
#endif
xesl_pushConstants_begin(b0, space0)
xesl_uint2 xe_apply_gamma_size;
xesl_pushConstants_end
#define xesl_localSize_x 16
#define xesl_localSize_y 8
#define xesl_localSize_z 1
xesl_entry_bindings_begin_compute
xesl_pushConstants_binding(buffer(0))
xesl_entry_binding_next
xesl_texture(xesl_textureBuffer, xe_apply_gamma_ramp, set=0, binding=0, t0,
space0, texture(0))
xesl_entry_binding_next
xesl_texture(xesl_texture2D, xe_apply_gamma_source, set=1, binding=0, t1,
space0, texture(1))
xesl_entry_binding_next
xesl_writeImage(xesl_image2D, XE_APPLY_GAMMA_DEST_FORMAT, xe_apply_gamma_dest,
set=2, binding=0, u0, space0, texture(2))
xesl_entry_bindings_end_inputs_begin_compute
xesl_entry_input_globalInvocationID
xesl_entry_inputs_end_code_begin_compute
xesl_uint2 pixel_index = xesl_GlobalInvocationID.xy;
xesl_dont_flatten
if (any(xesl_greaterThanEqual(pixel_index,
xesl_pushConstant(xe_apply_gamma_size)))) {
return;
}
#else
xesl_entry_outputs_begin
xesl_entry_output_target(xesl_float4, xe_apply_gamma_dest, 0)
xesl_entry_outputs_end_stageInputs_begin
xesl_entry_stageInputs_end_bindings_begin_pixel
xesl_texture(xesl_textureBuffer, xe_apply_gamma_ramp, set=0, binding=0, t0,
space0, texture(0))
xesl_entry_binding_next
xesl_texture(xesl_texture2D, xe_apply_gamma_source, set=1, binding=0, t1,
space0, texture(1))
xesl_entry_bindings_end_inputs_begin
xesl_entry_input_fragCoord
xesl_entry_inputs_end_code_begin
xesl_uint2 pixel_index = xesl_uint2(xesl_FragCoord.xy);
#endif // XE_APPLY_GAMMA_COMPUTE
// UNORM conversion according to the Direct3D 10+ rules.
xesl_uint3 apply_gamma_input = xesl_uint3(
xesl_texelFetch2D(xe_apply_gamma_source, pixel_index, 0).rgb * 255.0 +
0.5);
// The ramp has blue in bits 0:9, green in 10:19, red in 20:29 - BGR passed as
// an R10G10B10A2 buffer.
xesl_float4 apply_gamma_output;
apply_gamma_output.r =
xesl_texelFetchBuffer(xe_apply_gamma_ramp, apply_gamma_input.r).b;
apply_gamma_output.g =
xesl_texelFetchBuffer(xe_apply_gamma_ramp, apply_gamma_input.g).g;
apply_gamma_output.b =
xesl_texelFetchBuffer(xe_apply_gamma_ramp, apply_gamma_input.b).r;
#ifdef XE_APPLY_GAMMA_FXAA_LUMA
// Perceptual luma.
apply_gamma_output.a =
dot(apply_gamma_output.rgb, xesl_float3(0.299, 0.587, 0.114));
#else
// Perceptual luma.
apply_gamma_output.a = 1.0;
#endif
#ifdef XE_APPLY_GAMMA_COMPUTE
xesl_imageStore2DRGBA(xe_apply_gamma_dest, pixel_index, apply_gamma_output);
xesl_entry_code_end_compute
#else
xesl_Output(xe_apply_gamma_dest) = apply_gamma_output;
xesl_entry_code_end
#endif

View File

@ -1,5 +0,0 @@
// Perceptual luminance for FXAA.
float XeApplyGammaGetAlpha(float3 color) {
return dot(color, float3(0.299, 0.587, 0.114));
}
#include "apply_gamma_table.hlsli"

View File

@ -0,0 +1,12 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2022 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#define XE_APPLY_GAMMA_FXAA_LUMA
#define XE_APPLY_GAMMA_COMPUTE
#include "apply_gamma_table.xesli"

View File

@ -0,0 +1,11 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2022 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#define XE_APPLY_GAMMA_FXAA_LUMA
#include "apply_gamma_table.xesli"

View File

@ -5,7 +5,7 @@
// //
// Buffer Definitions: // Buffer Definitions:
// //
// cbuffer XeApplyGammaRampConstants // cbuffer xesl_pushConstants
// { // {
// //
// uint2 xe_apply_gamma_size; // Offset: 0 Size: 8 // uint2 xe_apply_gamma_size; // Offset: 0 Size: 8
@ -17,10 +17,10 @@
// //
// Name Type Format Dim ID HLSL Bind Count // Name Type Format Dim ID HLSL Bind Count
// ------------------------------ ---------- ------- ----------- ------- -------------- ------ // ------------------------------ ---------- ------- ----------- ------- -------------- ------
// xe_apply_gamma_source texture float3 2d T0 t0 1 // xe_apply_gamma_ramp texture uint4 buf T0 t0 1
// xe_apply_gamma_ramp texture uint2 buf T1 t1 1 // xe_apply_gamma_source texture float4 2d T1 t1 1
// xe_apply_gamma_dest UAV unorm4 2d U0 u0 1 // xe_apply_gamma_dest UAV unorm4 2d U0 u0 1
// XeApplyGammaRampConstants cbuffer NA NA CB0 cb0 1 // xesl_pushConstants cbuffer NA NA CB0 cb0 1
// //
// //
// //
@ -38,12 +38,12 @@
cs_5_1 cs_5_1
dcl_globalFlags refactoringAllowed dcl_globalFlags refactoringAllowed
dcl_constantbuffer CB0[0:0][1], immediateIndexed, space=0 dcl_constantbuffer CB0[0:0][1], immediateIndexed, space=0
dcl_resource_texture2d (float,float,float,float) T0[0:0], space=0 dcl_resource_buffer (uint,uint,uint,uint) T0[0:0], space=0
dcl_resource_buffer (uint,uint,uint,uint) T1[1:1], space=0 dcl_resource_texture2d (float,float,float,float) T1[1:1], space=0
dcl_uav_typed_texture2d (unorm,unorm,unorm,unorm) U0[0:0], space=0 dcl_uav_typed_texture2d (unorm,unorm,unorm,unorm) U0[0:0], space=0
dcl_input vThreadID.xy dcl_input vThreadID.xy
dcl_temps 3 dcl_temps 3
dcl_thread_group 8, 8, 1 dcl_thread_group 16, 8, 1
uge r0.xy, vThreadID.xyxx, CB0[0][0].xyxx uge r0.xy, vThreadID.xyxx, CB0[0][0].xyxx
or r0.x, r0.y, r0.x or r0.x, r0.y, r0.x
if_nz r0.x if_nz r0.x
@ -51,12 +51,12 @@ if_nz r0.x
endif endif
mov r0.xy, vThreadID.xyxx mov r0.xy, vThreadID.xyxx
mov r0.zw, l(0,0,0,0) mov r0.zw, l(0,0,0,0)
ld r0.xyz, r0.xyzw, T0[0].xyzw ld r0.xyz, r0.xyzw, T1[1].xyzw
mad r0.xyz, r0.xyzx, l(1023.000000, 1023.000000, 1023.000000, 0.000000), l(0.500000, 0.500000, 0.500000, 0.000000) mad r0.xyz, r0.xyzx, l(1023.000000, 1023.000000, 1023.000000, 0.000000), l(0.500000, 0.500000, 0.500000, 0.000000)
ftou r0.xyz, r0.xyzx ftou r0.xyz, r0.xyzx
ushr r1.xyz, r0.xyzx, l(3, 3, 3, 0) ushr r1.xyz, r0.xyzx, l(3, 3, 3, 0)
imul null, r0.w, r1.x, l(3) imul null, r0.w, r1.x, l(3)
ld r1.xw, r0.wwww, T1[1].xzwy ld r1.xw, r0.wwww, T0[0].xzwy
utof r0.w, r1.x utof r0.w, r1.x
and r0.xyz, r0.xyzx, l(7, 7, 7, 0) and r0.xyz, r0.xyzx, l(7, 7, 7, 0)
imul null, r0.x, r1.w, r0.x imul null, r0.x, r1.w, r0.x
@ -65,14 +65,14 @@ mad r0.x, r0.x, l(0.125000), r0.w
mul r0.x, r0.x, l(0.000015) mul r0.x, r0.x, l(0.000015)
min r2.x, r0.x, l(1.000000) min r2.x, r0.x, l(1.000000)
imad r0.xw, r1.yyyz, l(3, 0, 0, 3), l(1, 0, 0, 2) imad r0.xw, r1.yyyz, l(3, 0, 0, 3), l(1, 0, 0, 2)
ld r1.xy, r0.xxxx, T1[1].xyzw ld r1.xy, r0.xxxx, T0[0].xyzw
utof r0.x, r1.x utof r0.x, r1.x
imul null, r0.y, r0.y, r1.y imul null, r0.y, r0.y, r1.y
utof r0.y, r0.y utof r0.y, r0.y
mad r0.x, r0.y, l(0.125000), r0.x mad r0.x, r0.y, l(0.125000), r0.x
mul r0.x, r0.x, l(0.000015) mul r0.x, r0.x, l(0.000015)
min r2.y, r0.x, l(1.000000) min r2.y, r0.x, l(1.000000)
ld r0.xy, r0.wwww, T1[1].xyzw ld r0.xy, r0.wwww, T0[0].xyzw
imul null, r0.y, r0.y, r0.z imul null, r0.y, r0.y, r0.z
utof r0.xy, r0.xyxx utof r0.xy, r0.xyxx
mad r0.x, r0.y, l(0.125000), r0.x mad r0.x, r0.y, l(0.125000), r0.x
@ -86,38 +86,38 @@ ret
const BYTE apply_gamma_pwl_cs[] = const BYTE apply_gamma_pwl_cs[] =
{ {
68, 88, 66, 67, 134, 193, 68, 88, 66, 67, 224, 86,
189, 188, 150, 246, 151, 78, 115, 97, 130, 102, 85, 194,
29, 10, 33, 117, 212, 145, 154, 33, 68, 74, 161, 205,
204, 130, 1, 0, 0, 0, 242, 94, 1, 0, 0, 0,
128, 7, 0, 0, 5, 0, 124, 7, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0, 0, 0, 52, 0, 0, 0,
24, 2, 0, 0, 40, 2, 20, 2, 0, 0, 36, 2,
0, 0, 56, 2, 0, 0, 0, 0, 52, 2, 0, 0,
228, 6, 0, 0, 82, 68, 224, 6, 0, 0, 82, 68,
69, 70, 220, 1, 0, 0, 69, 70, 216, 1, 0, 0,
1, 0, 0, 0, 52, 1, 1, 0, 0, 0, 48, 1,
0, 0, 4, 0, 0, 0, 0, 0, 4, 0, 0, 0,
60, 0, 0, 0, 1, 5, 60, 0, 0, 0, 1, 5,
83, 67, 0, 5, 0, 0, 83, 67, 0, 5, 0, 0,
180, 1, 0, 0, 19, 19, 176, 1, 0, 0, 19, 19,
68, 37, 60, 0, 0, 0, 68, 37, 60, 0, 0, 0,
24, 0, 0, 0, 40, 0, 24, 0, 0, 0, 40, 0,
0, 0, 40, 0, 0, 0, 0, 0, 40, 0, 0, 0,
36, 0, 0, 0, 12, 0, 36, 0, 0, 0, 12, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
220, 0, 0, 0, 2, 0, 220, 0, 0, 0, 2, 0,
0, 0, 5, 0, 0, 0, 0, 0, 4, 0, 0, 0,
4, 0, 0, 0, 255, 255, 1, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0, 255, 255, 0, 0, 0, 0,
1, 0, 0, 0, 8, 0, 1, 0, 0, 0, 12, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 242, 0, 0, 0, 0, 0, 240, 0,
0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0,
4, 0, 0, 0, 1, 0, 5, 0, 0, 0, 4, 0,
0, 0, 255, 255, 255, 255, 0, 0, 255, 255, 255, 255,
1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0,
0, 0, 4, 0, 0, 0, 0, 0, 12, 0, 0, 0,
0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0,
0, 0, 6, 1, 0, 0, 0, 0, 6, 1, 0, 0,
4, 0, 0, 0, 1, 0, 4, 0, 0, 0, 1, 0,
@ -135,226 +135,196 @@ const BYTE apply_gamma_pwl_cs[] =
0, 0, 0, 0, 120, 101, 0, 0, 0, 0, 120, 101,
95, 97, 112, 112, 108, 121, 95, 97, 112, 112, 108, 121,
95, 103, 97, 109, 109, 97, 95, 103, 97, 109, 109, 97,
95, 115, 111, 117, 114, 99, 95, 114, 97, 109, 112, 0,
101, 0, 120, 101, 95, 97, 120, 101, 95, 97, 112, 112,
112, 112, 108, 121, 95, 103, 108, 121, 95, 103, 97, 109,
97, 109, 109, 97, 95, 114, 109, 97, 95, 115, 111, 117,
97, 109, 112, 0, 120, 101, 114, 99, 101, 0, 120, 101,
95, 97, 112, 112, 108, 121, 95, 97, 112, 112, 108, 121,
95, 103, 97, 109, 109, 97, 95, 103, 97, 109, 109, 97,
95, 100, 101, 115, 116, 0, 95, 100, 101, 115, 116, 0,
88, 101, 65, 112, 112, 108, 120, 101, 115, 108, 95, 112,
121, 71, 97, 109, 109, 97, 117, 115, 104, 67, 111, 110,
82, 97, 109, 112, 67, 111, 115, 116, 97, 110, 116, 115,
110, 115, 116, 97, 110, 116, 0, 171, 171, 171, 26, 1,
115, 0, 26, 1, 0, 0, 0, 0, 1, 0, 0, 0,
1, 0, 0, 0, 76, 1, 72, 1, 0, 0, 16, 0,
0, 0, 16, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 116, 1, 0, 0, 0, 0, 0, 0, 112, 1,
0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0,
0, 0, 2, 0, 0, 0, 8, 0, 0, 0, 2, 0,
144, 1, 0, 0, 0, 0, 0, 0, 140, 1, 0, 0,
0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 255, 255, 0, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0, 255, 255, 0, 0, 0, 0,
120, 101, 95, 97, 112, 112, 255, 255, 255, 255, 0, 0,
108, 121, 95, 103, 97, 109, 0, 0, 120, 101, 95, 97,
109, 97, 95, 115, 105, 122, 112, 112, 108, 121, 95, 103,
101, 0, 117, 105, 110, 116, 97, 109, 109, 97, 95, 115,
50, 0, 171, 171, 1, 0, 105, 122, 101, 0, 117, 105,
19, 0, 1, 0, 2, 0, 110, 116, 50, 0, 171, 171,
1, 0, 19, 0, 1, 0,
2, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 132, 1, 0, 0,
136, 1, 0, 0, 77, 105, 77, 105, 99, 114, 111, 115,
99, 114, 111, 115, 111, 102, 111, 102, 116, 32, 40, 82,
116, 32, 40, 82, 41, 32, 41, 32, 72, 76, 83, 76,
72, 76, 83, 76, 32, 83, 32, 83, 104, 97, 100, 101,
104, 97, 100, 101, 114, 32, 114, 32, 67, 111, 109, 112,
67, 111, 109, 112, 105, 108, 105, 108, 101, 114, 32, 49,
101, 114, 32, 49, 48, 46, 48, 46, 49, 0, 73, 83,
49, 0, 73, 83, 71, 78, 71, 78, 8, 0, 0, 0,
0, 0, 0, 0, 8, 0,
0, 0, 79, 83, 71, 78,
8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0,
0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0,
79, 83, 71, 78, 8, 0, 83, 72, 69, 88, 164, 4,
0, 0, 81, 0, 5, 0,
41, 1, 0, 0, 106, 8,
0, 1, 89, 0, 0, 7,
70, 142, 48, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
8, 0, 0, 0, 83, 72, 0, 0, 0, 0, 1, 0,
69, 88, 164, 4, 0, 0, 0, 0, 0, 0, 0, 0,
81, 0, 5, 0, 41, 1, 88, 8, 0, 7, 70, 126,
0, 0, 106, 8, 0, 1,
89, 0, 0, 7, 70, 142,
48, 0, 0, 0, 0, 0, 48, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0, 68, 68, 0, 0,
0, 0, 0, 0, 88, 24, 0, 0, 0, 0, 88, 24,
0, 7, 70, 126, 48, 0, 0, 7, 70, 126, 48, 0,
0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
85, 85, 0, 0, 0, 0, 85, 85, 0, 0, 0, 0,
0, 0, 88, 8, 0, 7, 0, 0, 156, 24, 0, 7,
70, 126, 48, 0, 1, 0, 70, 238, 49, 0, 0, 0,
0, 0, 1, 0, 0, 0,
1,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16, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0,
2, 64, 0, 0, 0, 192, 10, 0, 16, 0, 0, 0,
127, 68, 0, 192, 127, 68, 0, 0, 31, 0, 4, 3,
0, 192, 127, 68, 0, 0, 10, 0, 16, 0, 0, 0,
0, 0, 62, 0, 0, 1,
21, 0, 0, 1, 54, 0,
0, 4, 50, 0, 16, 0,
0, 0, 0, 0, 70, 0,
2, 0, 54, 0, 0, 8,
194, 0, 16, 0, 0, 0,
0, 0, 2, 64, 0, 0, 0, 0, 2, 64, 0, 0,
0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0,
0, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 45, 0,
0, 5, 114, 0, 16, 0, 0, 8, 114, 0, 16, 0,
0, 0, 0, 0, 70, 2, 0, 0, 0, 0, 70, 14,
16, 0, 0, 0, 0, 0,
70, 126, 32, 0, 1, 0,
0, 0, 1, 0, 0, 0,
50, 0, 0, 15, 114, 0,
16, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0,
85, 0, 0, 10, 114, 0,
16, 0, 1, 0, 0, 0,
70, 2, 16, 0, 0, 0, 70, 2, 16, 0, 0, 0,
0, 0, 2, 64, 0, 0, 0, 0, 2, 64, 0, 0,
3, 0, 0, 0, 3, 0, 0, 192, 127, 68, 0, 192,
127, 68, 0, 192, 127, 68,
0, 0, 0, 0, 2, 64,
0, 0, 0, 0, 0, 63,
0, 0, 0, 63, 0, 0,
0, 63, 0, 0, 0, 0,
28, 0, 0, 5, 114, 0,
16, 0, 0, 0, 0, 0,
70, 2, 16, 0, 0, 0,
0, 0, 85, 0, 0, 10,
114, 0, 16, 0, 1, 0,
0, 0, 70, 2, 16, 0,
0, 0, 0, 0, 2, 64,
0, 0, 3, 0, 0, 0, 0, 0, 3, 0, 0, 0,
3, 0, 0, 0, 3, 0,
0, 0, 0, 0, 0, 0,
38, 0, 0, 8, 0, 208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, 26, 0,
16, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0,
50, 0, 0, 9, 18, 0, 50, 0, 0, 9, 18, 0,
16, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0,
@ -367,35 +337,64 @@ const BYTE apply_gamma_pwl_cs[] =
10, 0, 16, 0, 0, 0, 10, 0, 16, 0, 0, 0,
0, 0, 1, 64, 0, 0, 0, 0, 1, 64, 0, 0,
8, 32, 128, 55, 51, 0, 8, 32, 128, 55, 51, 0,
0, 7, 66, 0, 16, 0, 0, 7, 34, 0, 16, 0,
2, 0, 0, 0, 10, 0, 2, 0, 0, 0, 10, 0,
16, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0,
1, 64, 0, 0, 0, 0, 1, 64, 0, 0, 0, 0,
128, 63, 54, 0, 0, 5, 128, 63, 45, 0, 0, 8,
130, 0, 16, 0, 2, 0, 50, 0, 16, 0, 0, 0,
0, 0, 246, 15, 16, 0,
0, 0, 0, 0, 70, 126,
32, 0, 0, 0, 0, 0,
0, 0, 0, 0, 38, 0,
0, 8, 0, 208, 0, 0,
34, 0, 16, 0, 0, 0,
0, 0, 26, 0, 16, 0,
0, 0, 0, 0, 42, 0,
16, 0, 0, 0, 0, 0,
86, 0, 0, 5, 50, 0,
16, 0, 0, 0, 0, 0,
70, 0, 16, 0, 0, 0,
0, 0, 50, 0, 0, 9,
18, 0, 16, 0, 0, 0,
0, 0, 26, 0, 16, 0,
0, 0, 0, 0, 1, 64,
0, 0, 0, 0, 0, 62,
10, 0, 16, 0, 0, 0,
0, 0, 56, 0, 0, 7,
18, 0, 16, 0, 0, 0,
0, 0, 10, 0, 16, 0,
0, 0, 0, 0, 1, 64,
0, 0, 8, 32, 128, 55,
51, 0, 0, 7, 66, 0,
16, 0, 2, 0, 0, 0,
10, 0, 16, 0, 0, 0,
0, 0, 1, 64, 0, 0, 0, 0, 1, 64, 0, 0,
0, 0, 128, 63, 164, 0, 0, 0, 128, 63, 54, 0,
0, 7, 242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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0 0, 0, 0, 0, 1, 0,
0, 0
}; };

View File

@ -5,7 +5,7 @@
// //
// Buffer Definitions: // Buffer Definitions:
// //
// cbuffer XeApplyGammaRampConstants // cbuffer xesl_pushConstants
// { // {
// //
// uint2 xe_apply_gamma_size; // Offset: 0 Size: 8 // uint2 xe_apply_gamma_size; // Offset: 0 Size: 8
@ -17,10 +17,10 @@
// //
// Name Type Format Dim ID HLSL Bind Count // Name Type Format Dim ID HLSL Bind Count
// ------------------------------ ---------- ------- ----------- ------- -------------- ------ // ------------------------------ ---------- ------- ----------- ------- -------------- ------
// xe_apply_gamma_source texture float3 2d T0 t0 1 // xe_apply_gamma_ramp texture uint4 buf T0 t0 1
// xe_apply_gamma_ramp texture uint2 buf T1 t1 1 // xe_apply_gamma_source texture float4 2d T1 t1 1
// xe_apply_gamma_dest UAV unorm4 2d U0 u0 1 // xe_apply_gamma_dest UAV float4 2d U0 u0 1
// XeApplyGammaRampConstants cbuffer NA NA CB0 cb0 1 // xesl_pushConstants cbuffer NA NA CB0 cb0 1
// //
// //
// //
@ -38,12 +38,12 @@
cs_5_1 cs_5_1
dcl_globalFlags refactoringAllowed dcl_globalFlags refactoringAllowed
dcl_constantbuffer CB0[0:0][1], immediateIndexed, space=0 dcl_constantbuffer CB0[0:0][1], immediateIndexed, space=0
dcl_resource_texture2d (float,float,float,float) T0[0:0], space=0 dcl_resource_buffer (uint,uint,uint,uint) T0[0:0], space=0
dcl_resource_buffer (uint,uint,uint,uint) T1[1:1], space=0 dcl_resource_texture2d (float,float,float,float) T1[1:1], space=0
dcl_uav_typed_texture2d (unorm,unorm,unorm,unorm) U0[0:0], space=0 dcl_uav_typed_texture2d (float,float,float,float) U0[0:0], space=0
dcl_input vThreadID.xy dcl_input vThreadID.xy
dcl_temps 3 dcl_temps 3
dcl_thread_group 8, 8, 1 dcl_thread_group 16, 8, 1
uge r0.xy, vThreadID.xyxx, CB0[0][0].xyxx uge r0.xy, vThreadID.xyxx, CB0[0][0].xyxx
or r0.x, r0.y, r0.x or r0.x, r0.y, r0.x
if_nz r0.x if_nz r0.x
@ -51,12 +51,12 @@ if_nz r0.x
endif endif
mov r0.xy, vThreadID.xyxx mov r0.xy, vThreadID.xyxx
mov r0.zw, l(0,0,0,0) mov r0.zw, l(0,0,0,0)
ld r0.xyz, r0.xyzw, T0[0].xyzw ld r0.xyz, r0.xyzw, T1[1].xyzw
mad r0.xyz, r0.xyzx, l(1023.000000, 1023.000000, 1023.000000, 0.000000), l(0.500000, 0.500000, 0.500000, 0.000000) mad r0.xyz, r0.xyzx, l(1023.000000, 1023.000000, 1023.000000, 0.000000), l(0.500000, 0.500000, 0.500000, 0.000000)
ftou r0.xyz, r0.xyzx ftou r0.xyz, r0.xyzx
ushr r1.xyz, r0.xyzx, l(3, 3, 3, 0) ushr r1.xyz, r0.xyzx, l(3, 3, 3, 0)
imul null, r0.w, r1.x, l(3) imul null, r0.w, r1.x, l(3)
ld r1.xw, r0.wwww, T1[1].xzwy ld r1.xw, r0.wwww, T0[0].xzwy
utof r0.w, r1.x utof r0.w, r1.x
and r0.xyz, r0.xyzx, l(7, 7, 7, 0) and r0.xyz, r0.xyzx, l(7, 7, 7, 0)
imul null, r0.x, r1.w, r0.x imul null, r0.x, r1.w, r0.x
@ -65,14 +65,14 @@ mad r0.x, r0.x, l(0.125000), r0.w
mul r0.x, r0.x, l(0.000015) mul r0.x, r0.x, l(0.000015)
min r2.x, r0.x, l(1.000000) min r2.x, r0.x, l(1.000000)
imad r0.xw, r1.yyyz, l(3, 0, 0, 3), l(1, 0, 0, 2) imad r0.xw, r1.yyyz, l(3, 0, 0, 3), l(1, 0, 0, 2)
ld r1.xy, r0.xxxx, T1[1].xyzw ld r1.xy, r0.xxxx, T0[0].xyzw
utof r0.x, r1.x utof r0.x, r1.x
imul null, r0.y, r0.y, r1.y imul null, r0.y, r0.y, r1.y
utof r0.y, r0.y utof r0.y, r0.y
mad r0.x, r0.y, l(0.125000), r0.x mad r0.x, r0.y, l(0.125000), r0.x
mul r0.x, r0.x, l(0.000015) mul r0.x, r0.x, l(0.000015)
min r2.y, r0.x, l(1.000000) min r2.y, r0.x, l(1.000000)
ld r0.xy, r0.wwww, T1[1].xyzw ld r0.xy, r0.wwww, T0[0].xyzw
imul null, r0.y, r0.y, r0.z imul null, r0.y, r0.y, r0.z
utof r0.xy, r0.xyxx utof r0.xy, r0.xyxx
mad r0.x, r0.y, l(0.125000), r0.x mad r0.x, r0.y, l(0.125000), r0.x
@ -86,41 +86,41 @@ ret
const BYTE apply_gamma_pwl_fxaa_luma_cs[] = const BYTE apply_gamma_pwl_fxaa_luma_cs[] =
{ {
68, 88, 66, 67, 115, 68, 68, 88, 66, 67, 13, 117,
69, 234, 116, 212, 118, 193, 49, 45, 162, 194, 216, 203,
71, 10, 44, 165, 244, 209, 130, 175, 100, 187, 97, 44,
63, 198, 1, 0, 0, 0, 87, 212, 1, 0, 0, 0,
148, 7, 0, 0, 5, 0, 144, 7, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0, 0, 0, 52, 0, 0, 0,
24, 2, 0, 0, 40, 2, 20, 2, 0, 0, 36, 2,
0, 0, 56, 2, 0, 0, 0, 0, 52, 2, 0, 0,
248, 6, 0, 0, 82, 68, 244, 6, 0, 0, 82, 68,
69, 70, 220, 1, 0, 0, 69, 70, 216, 1, 0, 0,
1, 0, 0, 0, 52, 1, 1, 0, 0, 0, 48, 1,
0, 0, 4, 0, 0, 0, 0, 0, 4, 0, 0, 0,
60, 0, 0, 0, 1, 5, 60, 0, 0, 0, 1, 5,
83, 67, 0, 5, 0, 0, 83, 67, 0, 5, 0, 0,
180, 1, 0, 0, 19, 19, 176, 1, 0, 0, 19, 19,
68, 37, 60, 0, 0, 0, 68, 37, 60, 0, 0, 0,
24, 0, 0, 0, 40, 0, 24, 0, 0, 0, 40, 0,
0, 0, 40, 0, 0, 0, 0, 0, 40, 0, 0, 0,
36, 0, 0, 0, 12, 0, 36, 0, 0, 0, 12, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
220, 0, 0, 0, 2, 0, 220, 0, 0, 0, 2, 0,
0, 0, 5, 0, 0, 0, 0, 0, 4, 0, 0, 0,
4, 0, 0, 0, 255, 255, 1, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0, 255, 255, 0, 0, 0, 0,
1, 0, 0, 0, 8, 0, 1, 0, 0, 0, 12, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 242, 0, 0, 0, 0, 0, 240, 0,
0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0,
4, 0, 0, 0, 1, 0, 5, 0, 0, 0, 4, 0,
0, 0, 255, 255, 255, 255, 0, 0, 255, 255, 255, 255,
1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0,
0, 0, 4, 0, 0, 0, 0, 0, 12, 0, 0, 0,
0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0,
0, 0, 6, 1, 0, 0, 0, 0, 6, 1, 0, 0,
4, 0, 0, 0, 1, 0, 4, 0, 0, 0, 5, 0,
0, 0, 4, 0, 0, 0, 0, 0, 4, 0, 0, 0,
255, 255, 255, 255, 0, 0, 255, 255, 255, 255, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0,
@ -135,226 +135,196 @@ const BYTE apply_gamma_pwl_fxaa_luma_cs[] =
0, 0, 0, 0, 120, 101, 0, 0, 0, 0, 120, 101,
95, 97, 112, 112, 108, 121, 95, 97, 112, 112, 108, 121,
95, 103, 97, 109, 109, 97, 95, 103, 97, 109, 109, 97,
95, 115, 111, 117, 114, 99, 95, 114, 97, 109, 112, 0,
101, 0, 120, 101, 95, 97, 120, 101, 95, 97, 112, 112,
112, 112, 108, 121, 95, 103, 108, 121, 95, 103, 97, 109,
97, 109, 109, 97, 95, 114, 109, 97, 95, 115, 111, 117,
97, 109, 112, 0, 120, 101, 114, 99, 101, 0, 120, 101,
95, 97, 112, 112, 108, 121, 95, 97, 112, 112, 108, 121,
95, 103, 97, 109, 109, 97, 95, 103, 97, 109, 109, 97,
95, 100, 101, 115, 116, 0, 95, 100, 101, 115, 116, 0,
88, 101, 65, 112, 112, 108, 120, 101, 115, 108, 95, 112,
121, 71, 97, 109, 109, 97, 117, 115, 104, 67, 111, 110,
82, 97, 109, 112, 67, 111, 115, 116, 97, 110, 116, 115,
110, 115, 116, 97, 110, 116, 0, 171, 171, 171, 26, 1,
115, 0, 26, 1, 0, 0, 0, 0, 1, 0, 0, 0,
1, 0, 0, 0, 76, 1, 72, 1, 0, 0, 16, 0,
0, 0, 16, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 116, 1, 0, 0, 0, 0, 0, 0, 112, 1,
0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0,
0, 0, 2, 0, 0, 0, 8, 0, 0, 0, 2, 0,
144, 1, 0, 0, 0, 0, 0, 0, 140, 1, 0, 0,
0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 255, 255, 0, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0, 255, 255, 0, 0, 0, 0,
120, 101, 95, 97, 112, 112, 255, 255, 255, 255, 0, 0,
108, 121, 95, 103, 97, 109, 0, 0, 120, 101, 95, 97,
109, 97, 95, 115, 105, 122, 112, 112, 108, 121, 95, 103,
101, 0, 117, 105, 110, 116, 97, 109, 109, 97, 95, 115,
50, 0, 171, 171, 1, 0, 105, 122, 101, 0, 117, 105,
19, 0, 1, 0, 2, 0, 110, 116, 50, 0, 171, 171,
1, 0, 19, 0, 1, 0,
2, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 132, 1, 0, 0,
136, 1, 0, 0, 77, 105, 77, 105, 99, 114, 111, 115,
99, 114, 111, 115, 111, 102, 111, 102, 116, 32, 40, 82,
116, 32, 40, 82, 41, 32, 41, 32, 72, 76, 83, 76,
72, 76, 83, 76, 32, 83, 32, 83, 104, 97, 100, 101,
104, 97, 100, 101, 114, 32, 114, 32, 67, 111, 109, 112,
67, 111, 109, 112, 105, 108, 105, 108, 101, 114, 32, 49,
101, 114, 32, 49, 48, 46, 48, 46, 49, 0, 73, 83,
49, 0, 73, 83, 71, 78, 71, 78, 8, 0, 0, 0,
0, 0, 0, 0, 8, 0,
0, 0, 79, 83, 71, 78,
8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0,
0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0,
79, 83, 71, 78, 8, 0, 83, 72, 69, 88, 184, 4,
0, 0, 81, 0, 5, 0,
46, 1, 0, 0, 106, 8,
0, 1, 89, 0, 0, 7,
70, 142, 48, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
8, 0, 0, 0, 83, 72, 0, 0, 0, 0, 1, 0,
69, 88, 184, 4, 0, 0, 0, 0, 0, 0, 0, 0,
81, 0, 5, 0, 46, 1, 88, 8, 0, 7, 70, 126,
0, 0, 106, 8, 0, 1,
89, 0, 0, 7, 70, 142,
48, 0, 0, 0, 0, 0, 48, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0, 68, 68, 0, 0,
0, 0, 0, 0, 88, 24, 0, 0, 0, 0, 88, 24,
0, 7, 70, 126, 48, 0, 0, 7, 70, 126, 48, 0,
0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
85, 85, 0, 0, 0, 0, 85, 85, 0, 0, 0, 0,
0, 0, 88, 8, 0, 7, 0, 0, 156, 24, 0, 7,
70, 126, 48, 0,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0, 50, 0,
0, 15, 114, 0, 16, 0,
0, 0, 0, 0, 70, 2,
16, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0,
2, 64, 0, 0, 0, 192, 10, 0, 16, 0, 0, 0,
127, 68, 0, 192, 127, 68, 0, 0, 31, 0, 4, 3,
0, 192, 127, 68, 0, 0, 10, 0, 16, 0, 0, 0,
0, 0, 62, 0, 0, 1,
21, 0, 0, 1, 54, 0,
0, 4, 50, 0, 16, 0,
0, 0, 0, 0, 70, 0,
2, 0, 54, 0, 0, 8,
194, 0, 16, 0, 0, 0,
0, 0, 2, 64, 0, 0, 0, 0, 2, 64, 0, 0,
0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0,
0, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 45, 0,
0, 5, 114, 0, 16, 0, 0, 8, 114, 0, 16, 0,
0, 0, 0, 0, 70, 2, 0, 0, 0, 0, 70, 14,
16, 0, 0, 0, 0, 0,
70, 126, 32, 0, 1, 0,
0, 0, 1, 0, 0, 0,
50, 0, 0, 15, 114, 0,
16, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0,
85, 0, 0, 10, 114, 0,
16, 0, 1, 0, 0, 0,
70, 2, 16, 0, 0, 0, 70, 2, 16, 0, 0, 0,
0, 0, 2, 64, 0, 0, 0, 0, 2, 64, 0, 0,
3, 0, 0, 0, 3, 0, 0, 192, 127, 68, 0, 192,
127, 68, 0, 192, 127, 68,
0, 0, 0, 0, 2, 64,
0, 0, 0, 0, 0, 63,
0, 0, 0, 63, 0, 0,
0, 63, 0, 0, 0, 0,
28, 0, 0, 5, 114, 0,
16, 0, 0, 0, 0, 0,
70, 2, 16, 0, 0, 0,
0, 0, 85, 0, 0, 10,
114, 0, 16, 0, 1, 0,
0, 0, 70, 2, 16, 0,
0, 0, 0, 0, 2, 64,
0, 0, 3, 0, 0, 0, 0, 0, 3, 0, 0, 0,
3, 0, 0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, 5, 34, 0, 16, 0,
0, 0, 0, 0, 70, 0, 0, 0, 0, 0, 26, 0,
16, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0,
50, 0, 0, 9, 18, 0, 50, 0, 0, 9, 18, 0,
16, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0,
@ -367,38 +337,68 @@ const BYTE apply_gamma_pwl_fxaa_luma_cs[] =
10, 0, 16, 0, 0, 0, 10, 0, 16, 0, 0, 0,
0, 0, 1, 64, 0, 0, 0, 0, 1, 64, 0, 0,
8, 32, 128, 55, 51, 0, 8, 32, 128, 55, 51, 0,
0, 7, 66, 0, 16, 0, 0, 7, 34, 0, 16, 0,
2, 0, 0, 0, 10, 0, 2, 0, 0, 0, 10, 0,
16, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0,
1, 64, 0, 0, 0, 0, 1, 64, 0, 0, 0, 0,
128, 63, 16, 0, 0, 10, 128, 63, 45, 0, 0, 8,
130, 0, 16, 0, 2, 0, 50, 0, 16, 0, 0, 0,
0, 0, 70, 2, 16, 0, 0, 0, 246, 15, 16, 0,
2, 0, 0, 0, 2, 64, 0, 0, 0, 0, 70, 126,
0, 0, 135, 22, 153, 62, 32, 0, 0, 0, 0, 0,
162, 69, 22, 63, 213, 120, 0, 0, 0, 0, 38, 0,
233, 61, 0, 0, 0, 0, 0, 8, 0, 208, 0, 0,
164, 0, 0, 7, 242, 224, 34, 0, 16, 0, 0, 0,
33, 0, 0, 0, 0, 0, 0, 0, 26, 0, 16, 0,
0, 0, 0, 0, 70, 5, 0, 0, 0, 0, 42, 0,
2, 0, 70, 14, 16, 0, 16, 0, 0, 0, 0, 0,
2, 0, 0, 0, 62, 0, 86, 0, 0, 5, 50, 0,
0, 1, 83, 84, 65, 84, 16, 0, 0, 0, 0, 0,
148, 0, 0, 0, 37, 0, 70, 0, 16, 0, 0, 0,
0, 0, 3, 0, 0, 0, 0, 0, 50, 0, 0, 9,
0, 0, 0, 0, 1, 0, 18, 0, 16,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0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@ -408,6 +408,5 @@ const BYTE apply_gamma_pwl_fxaa_luma_cs[] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 0, 1, 0, 0, 0
0, 0
}; };

View File

@ -0,0 +1,343 @@
#if 0
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
//
//
// Resource Bindings:
//
// Name Type Format Dim ID HLSL Bind Count
// ------------------------------ ---------- ------- ----------- ------- -------------- ------
// xe_apply_gamma_ramp texture uint4 buf T0 t0 1
// xe_apply_gamma_source texture float4 2d T1 t1 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position 0 xyzw 0 POS float xy
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target 0 xyzw 0 TARGET float xyzw
//
ps_5_1
dcl_globalFlags refactoringAllowed
dcl_resource_buffer (uint,uint,uint,uint) T0[0:0], space=0
dcl_resource_texture2d (float,float,float,float) T1[1:1], space=0
dcl_input_ps_siv linear noperspective v0.xy, position
dcl_output o0.xyzw
dcl_temps 3
ftou r0.xy, v0.xyxx
mov r0.zw, l(0,0,0,0)
ld r0.xyz, r0.xyzw, T1[1].xyzw
mad r0.xyz, r0.xyzx, l(1023.000000, 1023.000000, 1023.000000, 0.000000), l(0.500000, 0.500000, 0.500000, 0.000000)
ftou r0.xyz, r0.xyzx
ushr r1.xyz, r0.xyzx, l(3, 3, 3, 0)
imul null, r0.w, r1.x, l(3)
ld r1.xw, r0.wwww, T0[0].xzwy
utof r0.w, r1.x
and r0.xyz, r0.xyzx, l(7, 7, 7, 0)
imul null, r0.x, r1.w, r0.x
utof r0.x, r0.x
mad r0.x, r0.x, l(0.125000), r0.w
mul r0.x, r0.x, l(0.000015)
min r2.x, r0.x, l(1.000000)
imad r0.xw, r1.yyyz, l(3, 0, 0, 3), l(1, 0, 0, 2)
ld r1.xy, r0.xxxx, T0[0].xyzw
utof r0.x, r1.x
imul null, r0.y, r0.y, r1.y
utof r0.y, r0.y
mad r0.x, r0.y, l(0.125000), r0.x
mul r0.x, r0.x, l(0.000015)
min r2.y, r0.x, l(1.000000)
ld r0.xy, r0.wwww, T0[0].xyzw
imul null, r0.y, r0.y, r0.z
utof r0.xy, r0.xyxx
mad r0.x, r0.y, l(0.125000), r0.x
mul r0.x, r0.x, l(0.000015)
min r2.z, r0.x, l(1.000000)
dp3 o0.w, r2.xyzx, l(0.299000, 0.587000, 0.114000, 0.000000)
mov o0.xyz, r2.xyzx
ret
// Approximately 32 instruction slots used
#endif
const BYTE apply_gamma_pwl_fxaa_luma_ps[] =
{
68, 88, 66, 67, 202, 241,
49, 179, 160, 182, 197, 116,
174, 174, 57, 216, 126, 205,
210, 129, 1, 0, 0, 0,
88, 6, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0,
28, 1, 0, 0, 80, 1,
0, 0, 132, 1, 0, 0,
188, 5, 0, 0, 82, 68,
69, 70, 224, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 2, 0, 0, 0,
60, 0, 0, 0, 1, 5,
255, 255, 0, 5, 0, 0,
182, 0, 0, 0, 19, 19,
68, 37, 60, 0, 0, 0,
24, 0, 0, 0, 40, 0,
0, 0, 40, 0, 0, 0,
36, 0, 0, 0, 12, 0,
0, 0, 0, 0, 0, 0,
140, 0, 0, 0, 2, 0,
0, 0, 4, 0, 0, 0,
1, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0,
1, 0, 0, 0, 12, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 160, 0,
0, 0, 2, 0, 0, 0,
5, 0, 0, 0, 4, 0,
0, 0, 255, 255, 255, 255,
1, 0, 0, 0, 1, 0,
0, 0, 12, 0, 0, 0,
0, 0, 0, 0, 1, 0,
0, 0, 120, 101, 95, 97,
112, 112, 108, 121, 95, 103,
97, 109, 109, 97, 95, 114,
97, 109, 112, 0, 120, 101,
95, 97, 112, 112, 108, 121,
95, 103, 97, 109, 109, 97,
95, 115, 111, 117, 114, 99,
101, 0, 77, 105, 99, 114,
111, 115, 111, 102, 116, 32,
40, 82, 41, 32, 72, 76,
83, 76, 32, 83, 104, 97,
100, 101, 114, 32, 67, 111,
109, 112, 105, 108, 101, 114,
32, 49, 48, 46, 49, 0,
171, 171, 73, 83, 71, 78,
44, 0, 0, 0, 1, 0,
0, 0, 8, 0, 0, 0,
32, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0,
3, 0, 0, 0, 0, 0,
0, 0, 15, 3, 0, 0,
83, 86, 95, 80, 111, 115,
105, 116, 105, 111, 110, 0,
79, 83, 71, 78, 44, 0,
0, 0, 1, 0, 0, 0,
8, 0, 0, 0, 32, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 3, 0,
0, 0, 0, 0, 0, 0,
15, 0, 0, 0, 83, 86,
95, 84, 97, 114, 103, 101,
116, 0, 171, 171, 83, 72,
69, 88, 48, 4, 0, 0,
81, 0, 0, 0, 12, 1,
0, 0, 106, 8, 0, 1,
88, 8, 0, 7, 70, 126,
48, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 68, 68, 0, 0,
0, 0, 0, 0, 88, 24,
0, 7, 70, 126, 48, 0,
1, 0, 0, 0, 1, 0,
0, 0, 1, 0, 0, 0,
85, 85, 0, 0, 0, 0,
0, 0, 100, 32, 0, 4,
50, 16, 16, 0, 0, 0,
0, 0, 1, 0, 0, 0,
101, 0, 0, 3, 242, 32,
16, 0, 0, 0, 0, 0,
104, 0, 0, 2, 3, 0,
0, 0, 28, 0, 0, 5,
50, 0, 16, 0, 0, 0,
0, 0, 70, 16, 16, 0,
0, 0, 0, 0, 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 7, 34, 0,
16, 0, 2, 0, 0, 0,
10, 0, 16, 0, 0, 0,
0, 0, 1, 64, 0, 0,
0, 0, 128, 63, 45, 0,
0, 8, 50, 0, 16, 0,
0, 0, 0, 0, 246, 15,
16, 0, 0, 0, 0, 0,
70, 126, 32, 0, 0, 0,
0, 0, 0, 0, 0, 0,
38, 0, 0, 8, 0, 208,
0, 0, 34, 0, 16, 0,
0, 0, 0, 0, 26, 0,
16, 0, 0, 0, 0, 0,
42, 0, 16, 0, 0, 0,
0, 0, 86, 0, 0, 5,
50, 0, 16, 0, 0, 0,
0, 0, 70, 0, 16, 0,
0, 0, 0, 0, 50, 0,
0, 9, 18, 0, 16, 0,
0, 0, 0, 0, 26, 0,
16, 0, 0, 0, 0, 0,
1, 64, 0, 0, 0, 0,
0, 62, 10, 0, 16, 0,
0, 0, 0, 0, 56, 0,
0, 7, 18, 0, 16, 0,
0, 0, 0, 0, 10, 0,
16, 0, 0, 0, 0, 0,
1, 64, 0, 0, 8, 32,
128, 55, 51, 0, 0, 7,
66, 0, 16, 0, 2, 0,
0, 0, 10, 0, 16, 0,
0, 0, 0, 0, 1, 64,
0, 0, 0, 0, 128, 63,
16, 0, 0, 10, 130, 32,
16, 0, 0, 0, 0, 0,
70, 2, 16, 0, 2, 0,
0, 0, 2, 64, 0, 0,
135, 22, 153, 62, 162, 69,
22, 63, 213, 120, 233, 61,
0, 0, 0, 0, 54, 0,
0, 5, 114, 32, 16, 0,
0, 0, 0, 0, 70, 2,
16, 0, 2, 0, 0, 0,
62, 0, 0, 1, 83, 84,
65, 84, 148, 0, 0, 0,
32, 0, 0, 0, 3, 0,
0, 0, 0, 0, 0, 0,
2, 0, 0, 0, 11, 0,
0, 0, 5, 0, 0, 0,
2, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
4, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 2, 0,
0, 0, 0, 0, 0, 0,
7, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0
};

View File

@ -0,0 +1,335 @@
#if 0
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
//
//
// Resource Bindings:
//
// Name Type Format Dim ID HLSL Bind Count
// ------------------------------ ---------- ------- ----------- ------- -------------- ------
// xe_apply_gamma_ramp texture uint4 buf T0 t0 1
// xe_apply_gamma_source texture float4 2d T1 t1 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position 0 xyzw 0 POS float xy
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target 0 xyzw 0 TARGET float xyzw
//
ps_5_1
dcl_globalFlags refactoringAllowed
dcl_resource_buffer (uint,uint,uint,uint) T0[0:0], space=0
dcl_resource_texture2d (float,float,float,float) T1[1:1], space=0
dcl_input_ps_siv linear noperspective v0.xy, position
dcl_output o0.xyzw
dcl_temps 2
ftou r0.xy, v0.xyxx
mov r0.zw, l(0,0,0,0)
ld r0.xyz, r0.xyzw, T1[1].xyzw
mad r0.xyz, r0.xyzx, l(1023.000000, 1023.000000, 1023.000000, 0.000000), l(0.500000, 0.500000, 0.500000, 0.000000)
ftou r0.xyz, r0.xyzx
ushr r1.xyz, r0.xyzx, l(3, 3, 3, 0)
imul null, r0.w, r1.x, l(3)
ld r1.xw, r0.wwww, T0[0].xzwy
utof r0.w, r1.x
and r0.xyz, r0.xyzx, l(7, 7, 7, 0)
imul null, r0.x, r1.w, r0.x
utof r0.x, r0.x
mad r0.x, r0.x, l(0.125000), r0.w
mul r0.x, r0.x, l(0.000015)
min o0.x, r0.x, l(1.000000)
imad r0.xw, r1.yyyz, l(3, 0, 0, 3), l(1, 0, 0, 2)
ld r1.xy, r0.xxxx, T0[0].xyzw
utof r0.x, r1.x
imul null, r0.y, r0.y, r1.y
utof r0.y, r0.y
mad r0.x, r0.y, l(0.125000), r0.x
mul r0.x, r0.x, l(0.000015)
min o0.y, r0.x, l(1.000000)
ld r0.xy, r0.wwww, T0[0].xyzw
imul null, r0.y, r0.y, r0.z
utof r0.xy, r0.xyxx
mad r0.x, r0.y, l(0.125000), r0.x
mul r0.x, r0.x, l(0.000015)
min o0.z, r0.x, l(1.000000)
mov o0.w, l(1.000000)
ret
// Approximately 31 instruction slots used
#endif
const BYTE apply_gamma_pwl_ps[] =
{
68, 88, 66, 67, 197, 255,
198, 206, 158, 112, 94, 186,
5, 215, 2, 4, 116, 239,
1, 249, 1, 0, 0, 0,
48, 6, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0,
28, 1, 0, 0, 80, 1,
0, 0, 132, 1, 0, 0,
148, 5, 0, 0, 82, 68,
69, 70, 224, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 2, 0, 0, 0,
60, 0, 0, 0, 1, 5,
255, 255, 0, 5, 0, 0,
182, 0, 0, 0, 19, 19,
68, 37, 60, 0, 0, 0,
24, 0, 0, 0, 40, 0,
0, 0, 40, 0, 0, 0,
36, 0, 0, 0, 12, 0,
0, 0, 0, 0, 0, 0,
140, 0, 0, 0, 2, 0,
0, 0, 4, 0, 0, 0,
1, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0,
1, 0, 0, 0, 12, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 160, 0,
0, 0, 2, 0, 0, 0,
5, 0, 0, 0, 4, 0,
0, 0, 255, 255, 255, 255,
1, 0, 0, 0, 1, 0,
0, 0, 12, 0, 0, 0,
0, 0, 0, 0, 1, 0,
0, 0, 120, 101, 95, 97,
112, 112, 108, 121, 95, 103,
97, 109, 109, 97, 95, 114,
97, 109, 112, 0, 120, 101,
95, 97, 112, 112, 108, 121,
95, 103, 97, 109, 109, 97,
95, 115, 111, 117, 114, 99,
101, 0, 77, 105, 99, 114,
111, 115, 111, 102, 116, 32,
40, 82, 41, 32, 72, 76,
83, 76, 32, 83, 104, 97,
100, 101, 114, 32, 67, 111,
109, 112, 105, 108, 101, 114,
32, 49, 48, 46, 49, 0,
171, 171, 73, 83, 71, 78,
44, 0, 0, 0, 1, 0,
0, 0, 8, 0, 0, 0,
32, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0,
3, 0, 0, 0, 0, 0,
0, 0, 15, 3, 0, 0,
83, 86, 95, 80, 111, 115,
105, 116, 105, 111, 110, 0,
79, 83, 71, 78, 44, 0,
0, 0, 1, 0, 0, 0,
8, 0, 0, 0, 32, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 3, 0,
0, 0, 0, 0, 0, 0,
15, 0, 0, 0, 83, 86,
95, 84, 97, 114, 103, 101,
116, 0, 171, 171, 83, 72,
69, 88, 8, 4, 0, 0,
81, 0, 0, 0, 2, 1,
0, 0, 106, 8, 0, 1,
88, 8, 0, 7, 70, 126,
48, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 68, 68, 0, 0,
0, 0, 0, 0, 88, 24,
0, 7, 70, 126, 48, 0,
1, 0, 0, 0, 1, 0,
0, 0, 1, 0, 0, 0,
85, 85, 0, 0, 0, 0,
0, 0, 100, 32, 0, 4,
50, 16, 16, 0, 0, 0,
0, 0, 1, 0, 0, 0,
101, 0, 0, 3, 242, 32,
16, 0, 0, 0, 0, 0,
104, 0, 0, 2, 2, 0,
0, 0, 28, 0, 0, 5,
50, 0, 16, 0, 0, 0,
0, 0, 70, 16, 16, 0,
0, 0, 0, 0, 54, 0,
0, 8, 194, 0, 16, 0,
0, 0, 0, 0, 2, 64,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
45, 0, 0, 8, 114, 0,
16, 0, 0, 0, 0, 0,
70, 14, 16, 0, 0, 0,
0, 0, 70, 126, 32, 0,
1, 0, 0, 0, 1, 0,
0, 0, 50, 0, 0, 15,
114, 0, 16, 0, 0, 0,
0, 0, 70, 2, 16, 0,
0, 0, 0, 0, 2, 64,
0, 0, 0, 192, 127, 68,
0, 192, 127, 68, 0, 192,
127, 68, 0, 0, 0, 0,
2, 64, 0, 0, 0, 0,
0, 63, 0, 0, 0, 63,
0, 0, 0, 63, 0, 0,
0, 0, 28, 0, 0, 5,
114, 0, 16, 0, 0, 0,
0, 0, 70, 2, 16, 0,
0, 0, 0, 0, 85, 0,
0, 10, 114, 0, 16, 0,
1, 0, 0, 0, 70, 2,
16, 0, 0, 0, 0, 0,
2, 64, 0, 0, 3, 0,
0, 0, 3, 0, 0, 0,
3, 0, 0, 0, 0, 0,
0, 0, 38, 0, 0, 8,
0, 208, 0, 0, 130, 0,
16, 0, 0, 0, 0, 0,
10, 0, 16, 0, 1, 0,
0, 0, 1, 64, 0, 0,
3, 0, 0, 0, 45, 0,
0, 8, 146, 0, 16, 0,
1, 0, 0, 0, 246, 15,
16, 0, 0, 0, 0, 0,
134, 119, 32, 0, 0, 0,
0, 0, 0, 0, 0, 0,
86, 0, 0, 5, 130, 0,
16, 0, 0, 0, 0, 0,
10, 0, 16, 0, 1, 0,
0, 0, 1, 0, 0, 10,
114, 0, 16, 0, 0, 0,
0, 0, 70, 2, 16, 0,
0, 0, 0, 0, 2, 64,
0, 0, 7, 0, 0, 0,
7, 0, 0, 0, 7, 0,
0, 0, 0, 0, 0, 0,
38, 0, 0, 8, 0, 208,
0, 0, 18, 0, 16, 0,
0, 0, 0, 0, 58, 0,
16, 0, 1, 0, 0, 0,
10, 0, 16, 0, 0, 0,
0, 0, 86, 0, 0, 5,
18, 0, 16, 0, 0, 0,
0, 0, 10, 0, 16, 0,
0, 0, 0, 0, 50, 0,
0, 9, 18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0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0
};

View File

@ -5,7 +5,7 @@
// //
// Buffer Definitions: // Buffer Definitions:
// //
// cbuffer XeApplyGammaRampConstants // cbuffer xesl_pushConstants
// { // {
// //
// uint2 xe_apply_gamma_size; // Offset: 0 Size: 8 // uint2 xe_apply_gamma_size; // Offset: 0 Size: 8
@ -17,10 +17,10 @@
// //
// Name Type Format Dim ID HLSL Bind Count // Name Type Format Dim ID HLSL Bind Count
// ------------------------------ ---------- ------- ----------- ------- -------------- ------ // ------------------------------ ---------- ------- ----------- ------- -------------- ------
// xe_apply_gamma_source texture float3 2d T0 t0 1 // xe_apply_gamma_ramp texture float4 buf T0 t0 1
// xe_apply_gamma_ramp texture float3 buf T1 t1 1 // xe_apply_gamma_source texture float4 2d T1 t1 1
// xe_apply_gamma_dest UAV unorm4 2d U0 u0 1 // xe_apply_gamma_dest UAV unorm4 2d U0 u0 1
// XeApplyGammaRampConstants cbuffer NA NA CB0 cb0 1 // xesl_pushConstants cbuffer NA NA CB0 cb0 1
// //
// //
// //
@ -38,12 +38,12 @@
cs_5_1 cs_5_1
dcl_globalFlags refactoringAllowed dcl_globalFlags refactoringAllowed
dcl_constantbuffer CB0[0:0][1], immediateIndexed, space=0 dcl_constantbuffer CB0[0:0][1], immediateIndexed, space=0
dcl_resource_texture2d (float,float,float,float) T0[0:0], space=0 dcl_resource_buffer (float,float,float,float) T0[0:0], space=0
dcl_resource_buffer (float,float,float,float) T1[1:1], space=0 dcl_resource_texture2d (float,float,float,float) T1[1:1], space=0
dcl_uav_typed_texture2d (unorm,unorm,unorm,unorm) U0[0:0], space=0 dcl_uav_typed_texture2d (unorm,unorm,unorm,unorm) U0[0:0], space=0
dcl_input vThreadID.xy dcl_input vThreadID.xy
dcl_temps 2 dcl_temps 2
dcl_thread_group 8, 8, 1 dcl_thread_group 16, 8, 1
uge r0.xy, vThreadID.xyxx, CB0[0][0].xyxx uge r0.xy, vThreadID.xyxx, CB0[0][0].xyxx
or r0.x, r0.y, r0.x or r0.x, r0.y, r0.x
if_nz r0.x if_nz r0.x
@ -51,12 +51,12 @@ if_nz r0.x
endif endif
mov r0.xy, vThreadID.xyxx mov r0.xy, vThreadID.xyxx
mov r0.zw, l(0,0,0,0) mov r0.zw, l(0,0,0,0)
ld r0.xyz, r0.xyzw, T0[0].xyzw ld r0.xyz, r0.xyzw, T1[1].xyzw
mad r0.xyz, r0.xyzx, l(255.000000, 255.000000, 255.000000, 0.000000), l(0.500000, 0.500000, 0.500000, 0.000000) mad r0.xyz, r0.xyzx, l(255.000000, 255.000000, 255.000000, 0.000000), l(0.500000, 0.500000, 0.500000, 0.000000)
ftou r0.xyz, r0.xyzx ftou r0.xyz, r0.xyzx
ld r1.x, r0.xxxx, T1[1].zxyw ld r1.x, r0.xxxx, T0[0].zxyw
ld r1.y, r0.yyyy, T1[1].xyzw ld r1.y, r0.yyyy, T0[0].xyzw
ld r1.z, r0.zzzz, T1[1].yzxw ld r1.z, r0.zzzz, T0[0].yzxw
mov r1.w, l(1.000000) mov r1.w, l(1.000000)
store_uav_typed U0[0].xyzw, vThreadID.xyyy, r1.xyzw store_uav_typed U0[0].xyzw, vThreadID.xyyy, r1.xyzw
ret ret
@ -65,21 +65,21 @@ ret
const BYTE apply_gamma_table_cs[] = const BYTE apply_gamma_table_cs[] =
{ {
68, 88, 66, 67, 20, 63, 68, 88, 66, 67, 194, 111,
31, 100, 63, 232, 227, 64, 19, 70, 56, 133, 74, 123,
21, 8, 34, 27, 205, 36, 197, 56, 69, 13, 51, 156,
202, 71, 1, 0, 0, 0, 77, 169, 1, 0, 0, 0,
252, 4, 0, 0, 5, 0, 248, 4, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0, 0, 0, 52, 0, 0, 0,
24, 2, 0, 0, 40, 2, 20, 2, 0, 0, 36, 2,
0, 0, 56, 2, 0, 0, 0, 0, 52, 2, 0, 0,
96, 4, 0, 0, 82, 68, 92, 4, 0, 0, 82, 68,
69, 70, 220, 1, 0, 0, 69, 70, 216, 1, 0, 0,
1, 0, 0, 0, 52, 1, 1, 0, 0, 0, 48, 1,
0, 0, 4, 0, 0, 0, 0, 0, 4, 0, 0, 0,
60, 0, 0, 0, 1, 5, 60, 0, 0, 0, 1, 5,
83, 67, 0, 5, 0, 0, 83, 67, 0, 5, 0, 0,
180, 1, 0, 0, 19, 19, 176, 1, 0, 0, 19, 19,
68, 37, 60, 0, 0, 0, 68, 37, 60, 0, 0, 0,
24, 0, 0, 0, 40, 0, 24, 0, 0, 0, 40, 0,
0, 0, 40, 0, 0, 0, 0, 0, 40, 0, 0, 0,
@ -87,16 +87,16 @@ const BYTE apply_gamma_table_cs[] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
220, 0, 0, 0, 2, 0, 220, 0, 0, 0, 2, 0,
0, 0, 5, 0, 0, 0, 0, 0, 5, 0, 0, 0,
4, 0, 0, 0, 255, 255, 1, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0, 255, 255, 0, 0, 0, 0,
1, 0, 0, 0, 8, 0, 1, 0, 0, 0, 12, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 242, 0, 0, 0, 0, 0, 240, 0,
0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0,
5, 0, 0, 0, 1, 0, 5, 0, 0, 0, 4, 0,
0, 0, 255, 255, 255, 255, 0, 0, 255, 255, 255, 255,
1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0,
0, 0, 8, 0, 0, 0, 0, 0, 12, 0, 0, 0,
0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0,
0, 0, 6, 1, 0, 0, 0, 0, 6, 1, 0, 0,
4, 0, 0, 0, 1, 0, 4, 0, 0, 0, 1, 0,
@ -114,160 +114,159 @@ const BYTE apply_gamma_table_cs[] =
0, 0, 0, 0, 120, 101, 0, 0, 0, 0, 120, 101,
95, 97, 112, 112, 108, 121, 95, 97, 112, 112, 108, 121,
95, 103, 97, 109, 109, 97, 95, 103, 97, 109, 109, 97,
95, 115, 111, 117, 114, 99, 95, 114, 97, 109, 112, 0,
101, 0, 120, 101, 95, 97, 120, 101, 95, 97, 112, 112,
112, 112, 108, 121, 95, 103, 108, 121, 95, 103, 97, 109,
97, 109, 109, 97, 95, 114, 109, 97, 95, 115, 111, 117,
97, 109, 112, 0, 120, 101, 114, 99, 101, 0, 120, 101,
95, 97, 112, 112, 108, 121, 95, 97, 112, 112, 108, 121,
95, 103, 97, 109, 109, 97, 95, 103, 97, 109, 109, 97,
95, 100, 101, 115, 116, 0, 95, 100, 101, 115, 116, 0,
88, 101, 65, 112, 112, 108, 120, 101, 115, 108, 95, 112,
121, 71, 97, 109, 109, 97, 117, 115, 104, 67, 111, 110,
82, 97, 109, 112, 67, 111, 115, 116, 97, 110, 116, 115,
110, 115, 116, 97, 110, 116, 0, 171, 171, 171, 26, 1,
115, 0, 26, 1, 0, 0, 0, 0, 1, 0, 0, 0,
1, 0, 0, 0, 76, 1, 72, 1, 0, 0, 16, 0,
0, 0, 16, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 116, 1, 0, 0, 0, 0, 0, 0, 112, 1,
0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0,
0, 0, 2, 0, 0, 0, 8, 0, 0, 0, 2, 0,
144, 1, 0, 0, 0, 0, 0, 0, 140, 1, 0, 0,
0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 255, 255, 0, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0, 255, 255, 0, 0, 0, 0,
120, 101, 95, 97, 112, 112, 255, 255, 255, 255, 0, 0,
108, 121, 95, 103, 97, 109, 0, 0, 120, 101, 95, 97,
109, 97, 95, 115, 105, 122, 112, 112, 108, 121, 95, 103,
101, 0, 117, 105, 110, 116, 97, 109, 109, 97, 95, 115,
50, 0, 171, 171, 1, 0, 105, 122, 101, 0, 117, 105,
19, 0, 1, 0, 2, 0, 110, 116, 50, 0, 171, 171,
1, 0, 19, 0, 1, 0,
2, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 132, 1, 0, 0,
136, 1, 0, 0, 77, 105, 77, 105, 99, 114, 111, 115,
99, 114, 111, 115, 111, 102, 111, 102, 116, 32, 40, 82,
116, 32, 40, 82, 41, 32, 41, 32, 72, 76, 83, 76,
72, 76, 83, 76, 32, 83, 32, 83, 104, 97, 100, 101,
104, 97, 100, 101, 114, 32, 114, 32, 67, 111, 109, 112,
67, 111, 109, 112, 105, 108, 105, 108, 101, 114, 32, 49,
101, 114, 32, 49, 48, 46, 48, 46, 49, 0, 73, 83,
49, 0, 73, 83, 71, 78, 71, 78, 8, 0, 0, 0,
0, 0, 0, 0, 8, 0,
0, 0, 79, 83, 71, 78,
8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0,
0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0,
79, 83, 71, 78, 8, 0, 83, 72, 69, 88, 32, 2,
0, 0, 81, 0, 5, 0,
136, 0, 0, 0, 106, 8,
0, 1, 89, 0, 0, 7,
70, 142, 48, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
8, 0, 0, 0, 83, 72, 0, 0, 0, 0, 1, 0,
69, 88, 32, 2, 0, 0, 0, 0, 0, 0, 0, 0,
81, 0, 5, 0, 136, 0, 88, 8, 0, 7, 70, 126,
0, 0, 106, 8, 0, 1,
89, 0, 0, 7, 70, 142,
48, 0, 0, 0, 0, 0, 48, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0, 85, 85, 0, 0,
0, 0, 0, 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 0, 8, 18, 0, 70, 2, 16, 0, 0, 0,
16, 0, 1, 0, 0, 0,
6, 0, 16, 0, 0, 0,
0, 0, 38, 125, 32, 0,
1, 0, 0, 0, 1, 0,
0, 0, 45, 0, 0, 8, 0, 0, 45, 0, 0, 8,
34, 0, 16, 0, 1, 0, 18, 0, 16, 0, 1, 0,
0, 0, 86, 5, 16, 0, 0, 0, 6, 0, 16, 0,
0, 0, 0, 0, 70, 126, 0, 0, 0, 0, 38, 125,
32, 0, 1, 0, 0, 0, 32, 0, 0, 0, 0, 0,
1, 0, 0, 0, 45, 0, 0, 0, 0, 0, 45, 0,
0, 8, 66, 0, 16, 0, 0, 8, 34, 0, 16, 0,
1, 0, 0, 0, 166, 10, 1, 0, 0, 0, 86, 5,
16, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0,
150, 124, 32, 0, 1, 0, 70, 126, 32, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
54, 0, 0, 5, 130, 0, 45, 0, 0, 8, 66, 0,
16, 0, 1, 0, 0, 0, 16, 0, 1, 0, 0, 0,
1, 64, 0, 0, 0, 0, 166, 10, 16, 0, 0, 0,
128, 63, 164, 0, 0, 7, 0, 0, 150, 124, 32, 0,
242, 224, 33, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
70, 5, 2, 0, 70, 14, 0, 0, 54, 0, 0, 5,
16, 0, 1, 0, 0, 0, 130, 0, 16, 0, 1, 0,
62, 0, 0, 1, 83, 84, 0, 0, 1, 64, 0, 0,
65, 84, 148, 0, 0, 0, 0, 0, 128, 63, 164, 0,
16, 0, 0, 0, 2, 0, 0, 7, 242, 224, 33, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 1, 0, 0, 0, 70, 5, 2, 0,
0, 0, 0, 0, 0, 0, 70, 14, 16, 0, 1, 0,
2, 0, 0, 0, 2, 0, 0, 0, 62, 0, 0, 1,
83, 84, 65, 84, 148, 0,
0, 0, 16, 0, 0, 0,
2, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
4, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 3, 0,
0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 2, 0, 0, 0,
2, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
3, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@ -277,5 +276,5 @@ const BYTE apply_gamma_table_cs[] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0 0, 0, 1, 0, 0, 0
}; };

View File

@ -5,7 +5,7 @@
// //
// Buffer Definitions: // Buffer Definitions:
// //
// cbuffer XeApplyGammaRampConstants // cbuffer xesl_pushConstants
// { // {
// //
// uint2 xe_apply_gamma_size; // Offset: 0 Size: 8 // uint2 xe_apply_gamma_size; // Offset: 0 Size: 8
@ -17,10 +17,10 @@
// //
// Name Type Format Dim ID HLSL Bind Count // Name Type Format Dim ID HLSL Bind Count
// ------------------------------ ---------- ------- ----------- ------- -------------- ------ // ------------------------------ ---------- ------- ----------- ------- -------------- ------
// xe_apply_gamma_source texture float3 2d T0 t0 1 // xe_apply_gamma_ramp texture float4 buf T0 t0 1
// xe_apply_gamma_ramp texture float3 buf T1 t1 1 // xe_apply_gamma_source texture float4 2d T1 t1 1
// xe_apply_gamma_dest UAV unorm4 2d U0 u0 1 // xe_apply_gamma_dest UAV float4 2d U0 u0 1
// XeApplyGammaRampConstants cbuffer NA NA CB0 cb0 1 // xesl_pushConstants cbuffer NA NA CB0 cb0 1
// //
// //
// //
@ -38,12 +38,12 @@
cs_5_1 cs_5_1
dcl_globalFlags refactoringAllowed dcl_globalFlags refactoringAllowed
dcl_constantbuffer CB0[0:0][1], immediateIndexed, space=0 dcl_constantbuffer CB0[0:0][1], immediateIndexed, space=0
dcl_resource_texture2d (float,float,float,float) T0[0:0], space=0 dcl_resource_buffer (float,float,float,float) T0[0:0], space=0
dcl_resource_buffer (float,float,float,float) T1[1:1], space=0 dcl_resource_texture2d (float,float,float,float) T1[1:1], space=0
dcl_uav_typed_texture2d (unorm,unorm,unorm,unorm) U0[0:0], space=0 dcl_uav_typed_texture2d (float,float,float,float) U0[0:0], space=0
dcl_input vThreadID.xy dcl_input vThreadID.xy
dcl_temps 2 dcl_temps 2
dcl_thread_group 8, 8, 1 dcl_thread_group 16, 8, 1
uge r0.xy, vThreadID.xyxx, CB0[0][0].xyxx uge r0.xy, vThreadID.xyxx, CB0[0][0].xyxx
or r0.x, r0.y, r0.x or r0.x, r0.y, r0.x
if_nz r0.x if_nz r0.x
@ -51,12 +51,12 @@ if_nz r0.x
endif endif
mov r0.xy, vThreadID.xyxx mov r0.xy, vThreadID.xyxx
mov r0.zw, l(0,0,0,0) mov r0.zw, l(0,0,0,0)
ld r0.xyz, r0.xyzw, T0[0].xyzw ld r0.xyz, r0.xyzw, T1[1].xyzw
mad r0.xyz, r0.xyzx, l(255.000000, 255.000000, 255.000000, 0.000000), l(0.500000, 0.500000, 0.500000, 0.000000) mad r0.xyz, r0.xyzx, l(255.000000, 255.000000, 255.000000, 0.000000), l(0.500000, 0.500000, 0.500000, 0.000000)
ftou r0.xyz, r0.xyzx ftou r0.xyz, r0.xyzx
ld r1.x, r0.xxxx, T1[1].zxyw ld r1.x, r0.xxxx, T0[0].zxyw
ld r1.y, r0.yyyy, T1[1].xyzw ld r1.y, r0.yyyy, T0[0].xyzw
ld r1.z, r0.zzzz, T1[1].yzxw ld r1.z, r0.zzzz, T0[0].yzxw
dp3 r1.w, r1.xyzx, l(0.299000, 0.587000, 0.114000, 0.000000) dp3 r1.w, r1.xyzx, l(0.299000, 0.587000, 0.114000, 0.000000)
store_uav_typed U0[0].xyzw, vThreadID.xyyy, r1.xyzw store_uav_typed U0[0].xyzw, vThreadID.xyyy, r1.xyzw
ret ret
@ -65,21 +65,21 @@ ret
const BYTE apply_gamma_table_fxaa_luma_cs[] = const BYTE apply_gamma_table_fxaa_luma_cs[] =
{ {
68, 88, 66, 67, 148, 92, 68, 88, 66, 67, 200, 223,
39, 196, 202, 33, 41, 82, 77, 37, 216, 58, 189, 85,
77, 137, 192, 188, 150, 218, 119, 181, 101, 30, 54, 122,
30, 64, 1, 0, 0, 0, 180, 167, 1, 0, 0, 0,
16, 5, 0, 0, 5, 0, 12, 5, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0, 0, 0, 52, 0, 0, 0,
24, 2, 0, 0, 40, 2, 20, 2, 0, 0, 36, 2,
0, 0, 56, 2, 0, 0, 0, 0, 52, 2, 0, 0,
116, 4, 0, 0, 82, 68, 112, 4, 0, 0, 82, 68,
69, 70, 220, 1, 0, 0, 69, 70, 216, 1, 0, 0,
1, 0, 0, 0, 52, 1, 1, 0, 0, 0, 48, 1,
0, 0, 4, 0, 0, 0, 0, 0, 4, 0, 0, 0,
60, 0, 0, 0, 1, 5, 60, 0, 0, 0, 1, 5,
83, 67, 0, 5, 0, 0, 83, 67, 0, 5, 0, 0,
180, 1, 0, 0, 19, 19, 176, 1, 0, 0, 19, 19,
68, 37, 60, 0, 0, 0, 68, 37, 60, 0, 0, 0,
24, 0, 0, 0, 40, 0, 24, 0, 0, 0, 40, 0,
0, 0, 40, 0, 0, 0, 0, 0, 40, 0, 0, 0,
@ -87,19 +87,19 @@ const BYTE apply_gamma_table_fxaa_luma_cs[] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
220, 0, 0, 0, 2, 0, 220, 0, 0, 0, 2, 0,
0, 0, 5, 0, 0, 0, 0, 0, 5, 0, 0, 0,
4, 0, 0, 0, 255, 255, 1, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0, 255, 255, 0, 0, 0, 0,
1, 0, 0, 0, 8, 0, 1, 0, 0, 0, 12, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 242, 0, 0, 0, 0, 0, 240, 0,
0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0,
5, 0, 0, 0, 1, 0, 5, 0, 0, 0, 4, 0,
0, 0, 255, 255, 255, 255, 0, 0, 255, 255, 255, 255,
1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0,
0, 0, 8, 0, 0, 0, 0, 0, 12, 0, 0, 0,
0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0,
0, 0, 6, 1, 0, 0, 0, 0, 6, 1, 0, 0,
4, 0, 0, 0, 1, 0, 4, 0, 0, 0, 5, 0,
0, 0, 4, 0, 0, 0, 0, 0, 4, 0, 0, 0,
255, 255, 255, 255, 0, 0, 255, 255, 255, 255, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0,
@ -114,163 +114,162 @@ const BYTE apply_gamma_table_fxaa_luma_cs[] =
0, 0, 0, 0, 120, 101, 0, 0, 0, 0, 120, 101,
95, 97, 112, 112, 108, 121, 95, 97, 112, 112, 108, 121,
95, 103, 97, 109, 109, 97, 95, 103, 97, 109, 109, 97,
95, 115, 111, 117, 114, 99, 95, 114, 97, 109, 112, 0,
101, 0, 120, 101, 95, 97, 120, 101, 95, 97, 112, 112,
112, 112, 108, 121, 95, 103, 108, 121, 95, 103, 97, 109,
97, 109, 109, 97, 95, 114, 109, 97, 95, 115, 111, 117,
97, 109, 112, 0, 120, 101, 114, 99, 101, 0, 120, 101,
95, 97, 112, 112, 108, 121, 95, 97, 112, 112, 108, 121,
95, 103, 97, 109, 109, 97, 95, 103, 97, 109, 109, 97,
95, 100, 101, 115, 116, 0, 95, 100, 101, 115, 116, 0,
88, 101, 65, 112, 112, 108, 120, 101, 115, 108, 95, 112,
121, 71, 97, 109, 109, 97, 117, 115, 104, 67, 111, 110,
82, 97, 109, 112, 67, 111, 115, 116, 97, 110, 116, 115,
110, 115, 116, 97, 110, 116, 0, 171, 171, 171, 26, 1,
115, 0, 26, 1, 0, 0, 0, 0, 1, 0, 0, 0,
1, 0, 0, 0, 76, 1, 72, 1, 0, 0, 16, 0,
0, 0, 16, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 116, 1, 0, 0, 0, 0, 0, 0, 112, 1,
0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0,
0, 0, 2, 0, 0, 0, 8, 0, 0, 0, 2, 0,
144, 1, 0, 0, 0, 0, 0, 0, 140, 1, 0, 0,
0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 255, 255, 0, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0, 255, 255, 0, 0, 0, 0,
120, 101, 95, 97, 112, 112, 255, 255, 255, 255, 0, 0,
108, 121, 95, 103, 97, 109, 0, 0, 120, 101, 95, 97,
109, 97, 95, 115, 105, 122, 112, 112, 108, 121, 95, 103,
101, 0, 117, 105, 110, 116, 97, 109, 109, 97, 95, 115,
50, 0, 171, 171, 1, 0, 105, 122, 101, 0, 117, 105,
19, 0, 1, 0, 2, 0, 110, 116, 50, 0, 171, 171,
1, 0, 19, 0, 1, 0,
2, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 132, 1, 0, 0,
136, 1, 0, 0, 77, 105, 77, 105, 99, 114, 111, 115,
99, 114, 111, 115, 111, 102, 111, 102, 116, 32, 40, 82,
116, 32, 40, 82, 41, 32, 41, 32, 72, 76, 83, 76,
72, 76, 83, 76, 32, 83, 32, 83, 104, 97, 100, 101,
104, 97, 100, 101, 114, 32, 114, 32, 67, 111, 109, 112,
67, 111, 109, 112, 105, 108, 105, 108, 101, 114, 32, 49,
101, 114, 32, 49, 48, 46, 48, 46, 49, 0, 73, 83,
49, 0, 73, 83, 71, 78, 71, 78, 8, 0, 0, 0,
0, 0, 0, 0, 8, 0,
0, 0, 79, 83, 71, 78,
8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0,
0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0,
79, 83, 71, 78, 8, 0, 83, 72, 69, 88, 52, 2,
0, 0, 81, 0, 5, 0,
141, 0, 0, 0, 106, 8,
0, 1, 89, 0, 0, 7,
70, 142, 48, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
8, 0, 0, 0, 83, 72, 0, 0, 0, 0, 1, 0,
69, 88, 52, 2, 0, 0, 0, 0, 0, 0, 0, 0,
81, 0, 5, 0, 141, 0, 88, 8, 0, 7, 70, 126,
0, 0, 106, 8, 0, 1,
89, 0, 0, 7, 70, 142,
48, 0, 0, 0, 0, 0, 48, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0, 85, 85, 0, 0,
0, 0, 0, 0, 88, 24, 0, 0, 0, 0, 88, 24,
0, 7, 70, 126, 48, 0, 0, 7, 70, 126, 48, 0,
0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
85, 85, 0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 0, 0, 26, 0,
0, 0, 70, 14, 16, 0,
0, 0, 0, 0, 70, 126,
32, 0, 0, 0, 0, 0,
0, 0, 0, 0, 50, 0,
0, 15, 114, 0, 16, 0,
0, 0, 0, 0, 70, 2,
16, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0,
2, 64, 0, 0, 0, 0, 10, 0, 16, 0, 0, 0,
127, 67, 0, 0, 127, 67, 0, 0, 31, 0, 4, 3,
0, 0, 127, 67, 0, 0, 10, 0, 16, 0, 0, 0,
0, 0, 2, 64, 0, 0,
0, 0, 0, 63, 0, 0,
0, 63, 0, 0, 0, 63,
0, 0, 0, 0, 28, 0,
0, 5, 114, 0, 16, 0,
0, 0, 0, 0, 70, 2,
16, 0, 0, 0, 0, 0,
45, 0, 0, 8, 18, 0,
16, 0, 1, 0, 0, 0,
6, 0, 16, 0, 0, 0,
0, 0, 38, 125, 32, 0,
1, 0, 0, 0, 1, 0,
0, 0, 45, 0, 0, 8,
34, 0, 16, 0, 1, 0,
0, 0, 86, 5, 16, 0,
0, 0, 0, 0, 70, 126,
32, 0, 1, 0, 0, 0,
1, 0, 0, 0, 45, 0,
0, 8, 66, 0, 16, 0,
1, 0, 0, 0, 166, 10,
16, 0, 0, 0, 0, 0,
150, 124, 32, 0, 1, 0,
0, 0, 1, 0, 0, 0,
16, 0, 0, 10, 130, 0,
16, 0, 1, 0, 0, 0,
70, 2, 16, 0, 1, 0,
0, 0, 2, 64, 0, 0,
135, 22, 153, 62, 162, 69,
22, 63, 213, 120, 233, 61,
0, 0, 0, 0, 164, 0,
0, 7, 242, 224, 33, 0,
0, 0, 0, 0, 0, 0,
0, 0, 70, 5, 2, 0,
70, 14, 16, 0, 1, 0,
0, 0, 62, 0, 0, 1, 0, 0, 62, 0, 0, 1,
83, 84, 65, 84, 148, 0, 21, 0, 0, 1, 54, 0,
0, 0, 16, 0, 0, 0, 0, 4, 50, 0, 16, 0,
2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 70, 0,
2, 0, 54, 0, 0, 8,
194, 0, 16, 0, 0, 0,
0, 0, 2, 64, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 45, 0,
0, 8, 114, 0, 16, 0,
0, 0, 0, 0, 70, 14,
16, 0, 0, 0, 0, 0,
70, 126, 32, 0, 1, 0,
0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0,
2, 0, 0, 0, 0, 0, 50, 0, 0, 15, 114, 0,
16, 0, 0, 0, 0, 0,
70, 2, 16, 0, 0, 0,
0, 0, 2, 64, 0, 0,
0, 0, 127, 67, 0, 0,
127, 67, 0, 0, 127, 67,
0, 0, 0, 0, 2, 64,
0, 0, 0, 0, 0, 63,
0, 0, 0, 63, 0, 0,
0, 63, 0, 0, 0, 0,
28, 0, 0, 5, 114, 0,
16, 0, 0, 0, 0, 0,
70, 2, 16, 0, 0, 0,
0, 0, 45, 0, 0, 8,
18, 0, 16, 0, 1, 0,
0, 0, 6, 0, 16, 0,
0, 0, 0, 0, 38, 125,
32, 0, 0, 0, 0, 0,
0, 0, 0, 0, 45, 0,
0, 8, 34, 0, 16, 0,
1, 0, 0, 0, 86, 5,
16, 0, 0, 0, 0, 0,
70, 126, 32, 0, 0, 0,
0, 0, 0, 0, 0, 0,
45, 0, 0, 8, 66, 0,
16, 0, 1, 0, 0, 0,
166, 10, 16, 0, 0, 0,
0, 0, 150, 124, 32, 0,
0, 0, 0, 0, 0, 0,
0, 0, 16, 0, 0, 10,
130, 0, 16, 0, 1, 0,
0, 0, 70, 2, 16, 0,
1, 0, 0, 0, 2, 64,
0, 0, 135, 22, 153, 62,
162, 69, 22, 63, 213, 120,
233, 61, 0, 0, 0, 0,
164, 0, 0, 7, 242, 224,
33, 0, 0, 0, 0, 0,
0, 0, 0, 0, 70, 5,
2, 0, 70, 14, 16, 0,
1, 0, 0, 0, 62, 0,
0, 1, 83, 84, 65, 84,
148, 0, 0, 0, 16, 0,
0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0,
2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0,
0, 0, 2, 0, 0, 0,
0, 0, 0, 0, 2, 0,
0, 0, 2, 0, 0, 0,
1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0,
0, 0, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@ -280,5 +279,6 @@ const BYTE apply_gamma_table_fxaa_luma_cs[] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0 0, 0, 0, 0, 1, 0,
0, 0
}; };

View File

@ -0,0 +1,215 @@
#if 0
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
//
//
// Resource Bindings:
//
// Name Type Format Dim ID HLSL Bind Count
// ------------------------------ ---------- ------- ----------- ------- -------------- ------
// xe_apply_gamma_ramp texture float4 buf T0 t0 1
// xe_apply_gamma_source texture float4 2d T1 t1 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position 0 xyzw 0 POS float xy
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target 0 xyzw 0 TARGET float xyzw
//
ps_5_1
dcl_globalFlags refactoringAllowed
dcl_resource_buffer (float,float,float,float) T0[0:0], space=0
dcl_resource_texture2d (float,float,float,float) T1[1:1], space=0
dcl_input_ps_siv linear noperspective v0.xy, position
dcl_output o0.xyzw
dcl_temps 2
ftou r0.xy, v0.xyxx
mov r0.zw, l(0,0,0,0)
ld r0.xyz, r0.xyzw, T1[1].xyzw
mad r0.xyz, r0.xyzx, l(255.000000, 255.000000, 255.000000, 0.000000), l(0.500000, 0.500000, 0.500000, 0.000000)
ftou r0.xyz, r0.xyzx
ld r1.x, r0.xxxx, T0[0].zxyw
ld r1.y, r0.yyyy, T0[0].xyzw
ld r1.z, r0.zzzz, T0[0].yzxw
dp3 o0.w, r1.xyzx, l(0.299000, 0.587000, 0.114000, 0.000000)
mov o0.xyz, r1.xyzx
ret
// Approximately 11 instruction slots used
#endif
const BYTE apply_gamma_table_fxaa_luma_ps[] =
{
68, 88, 66, 67, 99, 93,
21, 205, 152, 99, 210, 93,
126, 200, 23, 156, 88, 34,
136, 17, 1, 0, 0, 0,
212, 3, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0,
28, 1, 0, 0, 80, 1,
0, 0, 132, 1, 0, 0,
56, 3, 0, 0, 82, 68,
69, 70, 224, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 2, 0, 0, 0,
60, 0, 0, 0, 1, 5,
255, 255, 0, 5, 0, 0,
182, 0, 0, 0, 19, 19,
68, 37, 60, 0, 0, 0,
24, 0, 0, 0, 40, 0,
0, 0, 40, 0, 0, 0,
36, 0, 0, 0, 12, 0,
0, 0, 0, 0, 0, 0,
140, 0, 0, 0, 2, 0,
0, 0, 5, 0, 0, 0,
1, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0,
1, 0, 0, 0, 12, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 160, 0,
0, 0, 2, 0, 0, 0,
5, 0, 0, 0, 4, 0,
0, 0, 255, 255, 255, 255,
1, 0, 0, 0, 1, 0,
0, 0, 12, 0, 0, 0,
0, 0, 0, 0, 1, 0,
0, 0, 120, 101, 95, 97,
112, 112, 108, 121, 95, 103,
97, 109, 109, 97, 95, 114,
97, 109, 112, 0, 120, 101,
95, 97, 112, 112, 108, 121,
95, 103, 97, 109, 109, 97,
95, 115, 111, 117, 114, 99,
101, 0, 77, 105, 99, 114,
111, 115, 111, 102, 116, 32,
40, 82, 41, 32, 72, 76,
83, 76, 32, 83, 104, 97,
100, 101, 114, 32, 67, 111,
109, 112, 105, 108, 101, 114,
32, 49, 48, 46, 49, 0,
171, 171, 73, 83, 71, 78,
44, 0, 0, 0, 1, 0,
0, 0, 8, 0, 0, 0,
32, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0,
3, 0, 0, 0, 0, 0,
0, 0, 15, 3, 0, 0,
83, 86, 95, 80, 111, 115,
105, 116, 105, 111, 110, 0,
79, 83, 71, 78, 44, 0,
0, 0, 1, 0, 0, 0,
8, 0, 0, 0, 32, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 3, 0,
0, 0, 0, 0, 0, 0,
15, 0, 0, 0, 83, 86,
95, 84, 97, 114, 103, 101,
116, 0, 171, 171, 83, 72,
69, 88, 172, 1, 0, 0,
81, 0, 0, 0, 107, 0,
0, 0, 106, 8, 0, 1,
88, 8, 0, 7, 70, 126,
48, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 85, 85, 0, 0,
0, 0, 0, 0, 88, 24,
0, 7, 70, 126, 48, 0,
1, 0, 0, 0, 1, 0,
0, 0, 1, 0, 0, 0,
85, 85, 0, 0, 0, 0,
0, 0, 100, 32, 0, 4,
50, 16, 16, 0, 0, 0,
0, 0, 1, 0, 0, 0,
101, 0, 0, 3, 242, 32,
16, 0, 0, 0, 0, 0,
104, 0, 0, 2, 2, 0,
0, 0, 28, 0, 0, 5,
50, 0, 16, 0, 0, 0,
0, 0, 70, 16, 16, 0,
0, 0, 0, 0, 54, 0,
0, 8, 194, 0, 16, 0,
0, 0, 0, 0, 2, 64,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
45, 0, 0, 8, 114, 0,
16, 0, 0, 0, 0, 0,
70, 14, 16, 0, 0, 0,
0, 0, 70, 126, 32, 0,
1, 0, 0, 0, 1, 0,
0, 0, 50, 0, 0, 15,
114, 0, 16, 0, 0, 0,
0, 0, 70, 2, 16, 0,
0, 0, 0, 0, 2, 64,
0, 0, 0, 0, 127, 67,
0, 0, 127, 67, 0, 0,
127, 67, 0, 0, 0, 0,
2, 64, 0, 0, 0, 0,
0, 63, 0, 0, 0, 63,
0, 0, 0, 63, 0, 0,
0, 0, 28, 0, 0, 5,
114, 0, 16, 0, 0, 0,
0, 0, 70, 2, 16, 0,
0, 0, 0, 0, 45, 0,
0, 8, 18, 0, 16, 0,
1, 0, 0, 0, 6, 0,
16, 0, 0, 0, 0, 0,
38, 125, 32, 0, 0, 0,
0, 0, 0, 0, 0, 0,
45, 0, 0, 8, 34, 0,
16, 0, 1, 0, 0, 0,
86, 5, 16, 0, 0, 0,
0, 0, 70, 126, 32, 0,
0, 0, 0, 0, 0, 0,
0, 0, 45, 0, 0, 8,
66, 0, 16, 0, 1, 0,
0, 0, 166, 10, 16, 0,
0, 0, 0, 0, 150, 124,
32, 0, 0, 0, 0, 0,
0, 0, 0, 0, 16, 0,
0, 10, 130, 32, 16, 0,
0, 0, 0, 0, 70, 2,
16, 0, 1, 0, 0, 0,
2, 64, 0, 0, 135, 22,
153, 62, 162, 69, 22, 63,
213, 120, 233, 61, 0, 0,
0, 0, 54, 0, 0, 5,
114, 32, 16, 0, 0, 0,
0, 0, 70, 2, 16, 0,
1, 0, 0, 0, 62, 0,
0, 1, 83, 84, 65, 84,
148, 0, 0, 0, 11, 0,
0, 0, 2, 0, 0, 0,
0, 0, 0, 0, 2, 0,
0, 0, 2, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 4, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 2, 0, 0, 0,
0, 0, 0, 0, 2, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0
};

View File

@ -0,0 +1,211 @@
#if 0
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
//
//
// Resource Bindings:
//
// Name Type Format Dim ID HLSL Bind Count
// ------------------------------ ---------- ------- ----------- ------- -------------- ------
// xe_apply_gamma_ramp texture float4 buf T0 t0 1
// xe_apply_gamma_source texture float4 2d T1 t1 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position 0 xyzw 0 POS float xy
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target 0 xyzw 0 TARGET float xyzw
//
ps_5_1
dcl_globalFlags refactoringAllowed
dcl_resource_buffer (float,float,float,float) T0[0:0], space=0
dcl_resource_texture2d (float,float,float,float) T1[1:1], space=0
dcl_input_ps_siv linear noperspective v0.xy, position
dcl_output o0.xyzw
dcl_temps 1
ftou r0.xy, v0.xyxx
mov r0.zw, l(0,0,0,0)
ld r0.xyz, r0.xyzw, T1[1].xyzw
mad r0.xyz, r0.xyzx, l(255.000000, 255.000000, 255.000000, 0.000000), l(0.500000, 0.500000, 0.500000, 0.000000)
ftou r0.xyz, r0.xyzx
ld r0.x, r0.xxxx, T0[0].zxyw
ld r0.y, r0.yyyy, T0[0].xyzw
ld r0.z, r0.zzzz, T0[0].yzxw
mov o0.xyz, r0.xyzx
mov o0.w, l(1.000000)
ret
// Approximately 11 instruction slots used
#endif
const BYTE apply_gamma_table_ps[] =
{
68, 88, 66, 67, 74, 64,
188, 148, 1, 73, 166, 187,
95, 221, 233, 140, 224, 9,
117, 169, 1, 0, 0, 0,
192, 3, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0,
28, 1, 0, 0, 80, 1,
0, 0, 132, 1, 0, 0,
36, 3, 0, 0, 82, 68,
69, 70, 224, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 2, 0, 0, 0,
60, 0, 0, 0, 1, 5,
255, 255, 0, 5, 0, 0,
182, 0, 0, 0, 19, 19,
68, 37, 60, 0, 0, 0,
24, 0, 0, 0, 40, 0,
0, 0, 40, 0, 0, 0,
36, 0, 0, 0, 12, 0,
0, 0, 0, 0, 0, 0,
140, 0, 0, 0, 2, 0,
0, 0, 5, 0, 0, 0,
1, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0,
1, 0, 0, 0, 12, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 160, 0,
0, 0, 2, 0, 0, 0,
5, 0, 0, 0, 4, 0,
0, 0, 255, 255, 255, 255,
1, 0, 0, 0, 1, 0,
0, 0, 12, 0, 0, 0,
0, 0, 0, 0, 1, 0,
0, 0, 120, 101, 95, 97,
112, 112, 108, 121, 95, 103,
97, 109, 109, 97, 95, 114,
97, 109, 112, 0, 120, 101,
95, 97, 112, 112, 108, 121,
95, 103, 97, 109, 109, 97,
95, 115, 111, 117, 114, 99,
101, 0, 77, 105, 99, 114,
111, 115, 111, 102, 116, 32,
40, 82, 41, 32, 72, 76,
83, 76, 32, 83, 104, 97,
100, 101, 114, 32, 67, 111,
109, 112, 105, 108, 101, 114,
32, 49, 48, 46, 49, 0,
171, 171, 73, 83, 71, 78,
44, 0, 0, 0, 1, 0,
0, 0, 8, 0, 0, 0,
32, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0,
3, 0, 0, 0, 0, 0,
0, 0, 15, 3, 0, 0,
83, 86, 95, 80, 111, 115,
105, 116, 105, 111, 110, 0,
79, 83, 71, 78, 44, 0,
0, 0, 1, 0, 0, 0,
8, 0, 0, 0, 32, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 3, 0,
0, 0, 0, 0, 0, 0,
15, 0, 0, 0, 83, 86,
95, 84, 97, 114, 103, 101,
116, 0, 171, 171, 83, 72,
69, 88, 152, 1, 0, 0,
81, 0, 0, 0, 102, 0,
0, 0, 106, 8, 0, 1,
88, 8, 0, 7, 70, 126,
48, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 85, 85, 0, 0,
0, 0, 0, 0, 88, 24,
0, 7, 70, 126, 48, 0,
1, 0, 0, 0, 1, 0,
0, 0, 1, 0, 0, 0,
85, 85, 0, 0, 0, 0,
0, 0, 100, 32, 0, 4,
50, 16, 16, 0, 0, 0,
0, 0, 1, 0, 0, 0,
101, 0, 0, 3, 242, 32,
16, 0, 0, 0, 0, 0,
104, 0, 0, 2, 1, 0,
0, 0, 28, 0, 0, 5,
50, 0, 16, 0, 0, 0,
0, 0, 70, 16, 16, 0,
0, 0, 0, 0, 54, 0,
0, 8, 194, 0, 16, 0,
0, 0, 0, 0, 2, 64,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
45, 0, 0, 8, 114, 0,
16, 0, 0, 0, 0, 0,
70, 14, 16, 0, 0, 0,
0, 0, 70, 126, 32, 0,
1, 0, 0, 0, 1, 0,
0, 0, 50, 0, 0, 15,
114, 0, 16, 0, 0, 0,
0, 0, 70, 2, 16, 0,
0, 0, 0, 0, 2, 64,
0, 0, 0, 0, 127, 67,
0, 0, 127, 67, 0, 0,
127, 67, 0, 0, 0, 0,
2, 64, 0, 0, 0, 0,
0, 63, 0, 0, 0, 63,
0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x, v0.x
and r0.xy, r0.xyxx, l(1, 1, 0, 0) and r0.xy, r0.xyxx, l(1, 1, 0, 0)
utof r0.xy, r0.xyxx utof r0.xy, r0.xyxx
mad o0.xy, r0.xyxx, l(4.000000, 4.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000) mad o0.xy, r0.xyxx, l(4.000000, -4.000000, 0.000000, 0.000000), l(-1.000000, 1.000000, 0.000000, 0.000000)
mov o0.zw, l(0,0,0,1.000000) mov o0.zw, l(0,0,0,1.000000)
ret ret
// Approximately 7 instruction slots used // Approximately 7 instruction slots used
#endif #endif
const BYTE fullscreen_vs[] = const BYTE fullscreen_cw_vs[] =
{ {
68, 88, 66, 67, 111, 71, 68, 88, 66, 67, 38, 212,
234, 43, 238, 70, 168, 114, 32, 171, 28, 206, 206, 51,
17, 145, 139, 145, 152, 124, 24, 105, 112, 99, 117, 136,
190, 180, 1, 0, 0, 0, 1, 11, 1, 0, 0, 0,
172, 2, 0, 0, 5, 0, 172, 2, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0, 0, 0, 52, 0, 0, 0,
160, 0, 0, 0, 212, 0, 160, 0, 0, 0, 212, 0,
@ -111,10 +111,10 @@ const BYTE fullscreen_vs[] =
70, 0, 16, 0, 0, 0, 70, 0, 16, 0, 0, 0,
0, 0, 2, 64, 0, 0, 0, 0, 2, 64, 0, 0,
0, 0, 128, 64, 0, 0, 0, 0, 128, 64, 0, 0,
128, 64, 0, 0, 0, 0, 128, 192, 0, 0, 0, 0,
0, 0, 0, 0, 2, 64, 0, 0, 0, 0, 2, 64,
0, 0, 0, 0, 128, 191, 0, 0, 0, 0, 128, 191,
0, 0, 128, 191, 0, 0, 0, 0, 128, 63, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
54, 0, 0, 8, 194, 32, 54, 0, 0, 8, 194, 32,
16, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0,

View File

@ -44,7 +44,7 @@ dcl_resource_texture2d (float,float,float,float) T0[0:0], space=0
dcl_uav_typed_texture2d (unorm,unorm,unorm,unorm) U0[0:0], space=0 dcl_uav_typed_texture2d (unorm,unorm,unorm,unorm) U0[0:0], space=0
dcl_input vThreadID.xy dcl_input vThreadID.xy
dcl_temps 7 dcl_temps 7
dcl_thread_group 8, 8, 1 dcl_thread_group 16, 8, 1
uge r0.xy, vThreadID.xyxx, CB0[0][0].xyxx uge r0.xy, vThreadID.xyxx, CB0[0][0].xyxx
or r0.x, r0.y, r0.x or r0.x, r0.y, r0.x
if_nz r0.x if_nz r0.x
@ -255,10 +255,10 @@ ret
const BYTE fxaa_cs[] = const BYTE fxaa_cs[] =
{ {
68, 88, 66, 67, 146, 66, 68, 88, 66, 67, 166, 45,
17, 144, 231, 237, 183, 236, 113, 211, 255, 20, 36, 199,
231, 78, 100, 194, 80, 51, 11, 156, 236, 21, 81, 60,
78, 217, 1, 0, 0, 0, 246, 32, 1, 0, 0, 0,
184, 23, 0, 0, 5, 0, 184, 23, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0, 0, 0, 52, 0, 0, 0,
108, 2, 0, 0, 124, 2, 108, 2, 0, 0, 124, 2,
@ -388,7 +388,7 @@ const BYTE fxaa_cs[] =
95, 0, 0, 2, 50, 0, 95, 0, 0, 2, 50, 0,
2, 0, 104, 0, 0, 2, 2, 0, 104, 0, 0, 2,
7, 0, 0, 0, 155, 0, 7, 0, 0, 0, 155, 0,
0, 4, 8, 0, 0, 0, 0, 4, 16, 0, 0, 0,
8, 0, 0, 0, 1, 0, 8, 0, 0, 0, 1, 0,
0, 0, 80, 0, 0, 8, 0, 0, 80, 0, 0, 8,
50, 0, 16, 0, 0, 0, 50, 0, 16, 0, 0, 0,

View File

@ -44,7 +44,7 @@ dcl_resource_texture2d (float,float,float,float) T0[0:0], space=0
dcl_uav_typed_texture2d (unorm,unorm,unorm,unorm) U0[0:0], space=0 dcl_uav_typed_texture2d (unorm,unorm,unorm,unorm) U0[0:0], space=0
dcl_input vThreadID.xy dcl_input vThreadID.xy
dcl_temps 7 dcl_temps 7
dcl_thread_group 8, 8, 1 dcl_thread_group 16, 8, 1
uge r0.xy, vThreadID.xyxx, CB0[0][0].xyxx uge r0.xy, vThreadID.xyxx, CB0[0][0].xyxx
or r0.x, r0.y, r0.x or r0.x, r0.y, r0.x
if_nz r0.x if_nz r0.x
@ -414,10 +414,10 @@ ret
const BYTE fxaa_extreme_cs[] = const BYTE fxaa_extreme_cs[] =
{ {
68, 88, 66, 67, 37, 138, 68, 88, 66, 67, 201, 241,
209, 45, 7, 149, 158, 200, 80, 129, 142, 182, 61, 91,
128, 20, 212, 142, 87, 247, 66, 45, 161, 133, 204, 62,
202, 95, 1, 0, 0, 0, 115, 180, 1, 0, 0, 0,
16, 36, 0, 0, 5, 0, 16, 36, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0, 0, 0, 52, 0, 0, 0,
108, 2, 0, 0, 124, 2, 108, 2, 0, 0, 124, 2,
@ -547,7 +547,7 @@ const BYTE fxaa_extreme_cs[] =
95, 0, 0, 2, 50, 0, 95, 0, 0, 2, 50, 0,
2, 0, 104, 0, 0, 2, 2, 0, 104, 0, 0, 2,
7, 0, 0, 0, 155, 0, 7, 0, 0, 0, 155, 0,
0, 4, 8, 0, 0, 0, 0, 4, 16, 0, 0, 0,
8, 0, 0, 0, 1, 0, 8, 0, 0, 0, 1, 0,
0, 0, 80, 0, 0, 8, 0, 0, 80, 0, 0, 8,
50, 0, 16, 0, 0, 0, 50, 0, 16, 0, 0, 0,

View File

@ -0,0 +1,262 @@
// Generated with `xb buildshaders`.
#if 0
; SPIR-V
; Version: 1.0
; Generator: Khronos Glslang Reference Front End; 10
; Bound: 24005
; Schema: 0
OpCapability Shader
OpCapability SampledBuffer
OpCapability StorageImageExtendedFormats
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %5663 "main" %gl_GlobalInvocationID
OpExecutionMode %5663 LocalSize 16 8 1
OpDecorate %gl_GlobalInvocationID BuiltIn GlobalInvocationId
OpMemberDecorate %_struct_993 0 Offset 0
OpDecorate %_struct_993 Block
OpDecorate %5759 DescriptorSet 1
OpDecorate %5759 Binding 0
OpDecorate %5945 DescriptorSet 0
OpDecorate %5945 Binding 0
OpDecorate %3258 DescriptorSet 2
OpDecorate %3258 Binding 0
OpDecorate %3258 NonReadable
OpDecorate %gl_WorkGroupSize BuiltIn WorkgroupSize
%void = OpTypeVoid
%1282 = OpTypeFunction %void
%float = OpTypeFloat 32
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
%float_0 = OpConstant %float 0
%float_1 = OpConstant %float 1
%uint_0 = OpConstant %uint 0
%uint_7 = OpConstant %uint 7
%uint_1 = OpConstant %uint 1
%float_0_125 = OpConstant %float 0.125
%float_1_52737048en05 = OpConstant %float 1.52737048e-05
%v3uint = OpTypeVector %uint 3
%_ptr_Input_v3uint = OpTypePointer Input %v3uint
%gl_GlobalInvocationID = OpVariable %_ptr_Input_v3uint Input
%_struct_993 = OpTypeStruct %v2uint
%_ptr_PushConstant__struct_993 = OpTypePointer PushConstant %_struct_993
%4495 = OpVariable %_ptr_PushConstant__struct_993 PushConstant
%int = OpTypeInt 32 1
%int_0 = OpConstant %int 0
%_ptr_PushConstant_v2uint = OpTypePointer PushConstant %v2uint
%bool = OpTypeBool
%v2bool = OpTypeVector %bool 2
%150 = OpTypeImage %float 2D 0 0 0 1 Unknown
%_ptr_UniformConstant_150 = OpTypePointer UniformConstant %150
%5759 = OpVariable %_ptr_UniformConstant_150 UniformConstant
%v2int = OpTypeVector %int 2
%v4float = OpTypeVector %float 4
%v3float = OpTypeVector %float 3
%float_1023 = OpConstant %float 1023
%float_0_5 = OpConstant %float 0.5
%152 = OpTypeImage %uint Buffer 0 0 0 1 Unknown
%_ptr_UniformConstant_152 = OpTypePointer UniformConstant %152
%5945 = OpVariable %_ptr_UniformConstant_152 UniformConstant
%uint_3 = OpConstant %uint 3
%v4uint = OpTypeVector %uint 4
%uint_2 = OpConstant %uint 2
%166 = OpTypeImage %float 2D 0 0 0 2 Rgb10A2
%_ptr_UniformConstant_166 = OpTypePointer UniformConstant %166
%3258 = OpVariable %_ptr_UniformConstant_166 UniformConstant
%uint_16 = OpConstant %uint 16
%uint_8 = OpConstant %uint 8
%gl_WorkGroupSize = OpConstantComposite %v3uint %uint_16 %uint_8 %uint_1
%10264 = OpUndef %v4float
%939 = OpConstantComposite %v3float %float_0_5 %float_0_5 %float_0_5
%5663 = OpFunction %void None %1282
%15110 = OpLabel
OpSelectionMerge %21573 None
OpSwitch %uint_0 %12914
%12914 = OpLabel
%13761 = OpLoad %v3uint %gl_GlobalInvocationID
%21717 = OpVectorShuffle %v2uint %13761 %13761 0 1
%7760 = OpAccessChain %_ptr_PushConstant_v2uint %4495 %int_0
%13378 = OpLoad %v2uint %7760
%23437 = OpUGreaterThanEqual %v2bool %21717 %13378
%23076 = OpAny %bool %23437
OpSelectionMerge %18302 DontFlatten
OpBranchConditional %23076 %21992 %18302
%21992 = OpLabel
OpBranch %21573
%18302 = OpLabel
%24004 = OpLoad %150 %5759
%10533 = OpBitcast %v2int %21717
%6680 = OpImageFetch %v4float %24004 %10533 Lod %int_0
%16242 = OpVectorShuffle %v3float %6680 %6680 0 1 2
%13907 = OpVectorTimesScalar %v3float %16242 %float_1023
%16889 = OpFAdd %v3float %13907 %939
%11099 = OpConvertFToU %v3uint %16889
%19954 = OpLoad %152 %5945
%23099 = OpCompositeExtract %uint %11099 0
%17722 = OpShiftRightLogical %uint %23099 %uint_3
%15968 = OpIMul %uint %17722 %uint_3
%18268 = OpBitcast %int %15968
%14598 = OpImageFetch %v4uint %19954 %18268
%6376 = OpCompositeExtract %uint %14598 0
%17705 = OpConvertUToF %float %6376
%12314 = OpBitwiseAnd %uint %23099 %uint_7
%14345 = OpCompositeExtract %uint %14598 1
%16230 = OpIMul %uint %12314 %14345
%17759 = OpConvertUToF %float %16230
%22854 = OpFMul %float %17759 %float_0_125
%11948 = OpFAdd %float %17705 %22854
%7244 = OpFMul %float %11948 %float_1_52737048en05
%22361 = OpExtInst %float %1 FClamp %7244 %float_0 %float_1
%7500 = OpCompositeInsert %v4float %22361 %10264 0
%19969 = OpCompositeExtract %uint %11099 1
%18592 = OpShiftRightLogical %uint %19969 %uint_3
%15827 = OpIMul %uint %18592 %uint_3
%18887 = OpIAdd %uint %15827 %uint_1
%14460 = OpBitcast %int %18887
%17829 = OpImageFetch %v4uint %19954 %14460
%6377 = OpCompositeExtract %uint %17829 0
%17706 = OpConvertUToF %float %6377
%12315 = OpBitwiseAnd %uint %19969 %uint_7
%14346 = OpCompositeExtract %uint %17829 1
%16231 = OpIMul %uint %12315 %14346
%17760 = OpConvertUToF %float %16231
%22855 = OpFMul %float %17760 %float_0_125
%11949 = OpFAdd %float %17706 %22855
%7245 = OpFMul %float %11949 %float_1_52737048en05
%22362 = OpExtInst %float %1 FClamp %7245 %float_0 %float_1
%7501 = OpCompositeInsert %v4float %22362 %7500 1
%19970 = OpCompositeExtract %uint %11099 2
%18593 = OpShiftRightLogical %uint %19970 %uint_3
%15828 = OpIMul %uint %18593 %uint_3
%18888 = OpIAdd %uint %15828 %uint_2
%14461 = OpBitcast %int %18888
%17830 = OpImageFetch %v4uint %19954 %14461
%6378 = OpCompositeExtract %uint %17830 0
%17707 = OpConvertUToF %float %6378
%12316 = OpBitwiseAnd %uint %19970 %uint_7
%14347 = OpCompositeExtract %uint %17830 1
%16232 = OpIMul %uint %12316 %14347
%17761 = OpConvertUToF %float %16232
%22856 = OpFMul %float %17761 %float_0_125
%11950 = OpFAdd %float %17707 %22856
%7246 = OpFMul %float %11950 %float_1_52737048en05
%22380 = OpExtInst %float %1 FClamp %7246 %float_0 %float_1
%23871 = OpCompositeInsert %v4float %22380 %7501 2
%15087 = OpCompositeInsert %v4float %float_1 %23871 3
%16359 = OpLoad %166 %3258
OpImageWrite %16359 %10533 %15087
OpBranch %21573
%21573 = OpLabel
OpReturn
OpFunctionEnd
#endif
const uint32_t apply_gamma_pwl_cs[] = {
0x07230203, 0x00010000, 0x0008000A, 0x00005DC5, 0x00000000, 0x00020011,
0x00000001, 0x00020011, 0x0000002E, 0x00020011, 0x00000031, 0x0006000B,
0x00000001, 0x4C534C47, 0x6474732E, 0x3035342E, 0x00000000, 0x0003000E,
0x00000000, 0x00000001, 0x0006000F, 0x00000005, 0x0000161F, 0x6E69616D,
0x00000000, 0x00000F48, 0x00060010, 0x0000161F, 0x00000011, 0x00000010,
0x00000008, 0x00000001, 0x00040047, 0x00000F48, 0x0000000B, 0x0000001C,
0x00050048, 0x000003E1, 0x00000000, 0x00000023, 0x00000000, 0x00030047,
0x000003E1, 0x00000002, 0x00040047, 0x0000167F, 0x00000022, 0x00000001,
0x00040047, 0x0000167F, 0x00000021, 0x00000000, 0x00040047, 0x00001739,
0x00000022, 0x00000000, 0x00040047, 0x00001739, 0x00000021, 0x00000000,
0x00040047, 0x00000CBA, 0x00000022, 0x00000002, 0x00040047, 0x00000CBA,
0x00000021, 0x00000000, 0x00030047, 0x00000CBA, 0x00000019, 0x00040047,
0x00000B0F, 0x0000000B, 0x00000019, 0x00020013, 0x00000008, 0x00030021,
0x00000502, 0x00000008, 0x00030016, 0x0000000D, 0x00000020, 0x00040015,
0x0000000B, 0x00000020, 0x00000000, 0x00040017, 0x00000011, 0x0000000B,
0x00000002, 0x0004002B, 0x0000000D, 0x00000A0C, 0x00000000, 0x0004002B,
0x0000000D, 0x0000008A, 0x3F800000, 0x0004002B, 0x0000000B, 0x00000A0A,
0x00000000, 0x0004002B, 0x0000000B, 0x00000A1F, 0x00000007, 0x0004002B,
0x0000000B, 0x00000A0D, 0x00000001, 0x0004002B, 0x0000000D, 0x000001E0,
0x3E000000, 0x0004002B, 0x0000000D, 0x000009AA, 0x37802008, 0x00040017,
0x00000014, 0x0000000B, 0x00000003, 0x00040020, 0x00000291, 0x00000001,
0x00000014, 0x0004003B, 0x00000291, 0x00000F48, 0x00000001, 0x0003001E,
0x000003E1, 0x00000011, 0x00040020, 0x0000065E, 0x00000009, 0x000003E1,
0x0004003B, 0x0000065E, 0x0000118F, 0x00000009, 0x00040015, 0x0000000C,
0x00000020, 0x00000001, 0x0004002B, 0x0000000C, 0x00000A0B, 0x00000000,
0x00040020, 0x0000028E, 0x00000009, 0x00000011, 0x00020014, 0x00000009,
0x00040017, 0x0000000F, 0x00000009, 0x00000002, 0x00090019, 0x00000096,
0x0000000D, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000001,
0x00000000, 0x00040020, 0x00000313, 0x00000000, 0x00000096, 0x0004003B,
0x00000313, 0x0000167F, 0x00000000, 0x00040017, 0x00000012, 0x0000000C,
0x00000002, 0x00040017, 0x0000001D, 0x0000000D, 0x00000004, 0x00040017,
0x00000018, 0x0000000D, 0x00000003, 0x0004002B, 0x0000000D, 0x00000409,
0x447FC000, 0x0004002B, 0x0000000D, 0x000000FC, 0x3F000000, 0x00090019,
0x00000098, 0x0000000B, 0x00000005, 0x00000000, 0x00000000, 0x00000000,
0x00000001, 0x00000000, 0x00040020, 0x00000315, 0x00000000, 0x00000098,
0x0004003B, 0x00000315, 0x00001739, 0x00000000, 0x0004002B, 0x0000000B,
0x00000A13, 0x00000003, 0x00040017, 0x00000017, 0x0000000B, 0x00000004,
0x0004002B, 0x0000000B, 0x00000A10, 0x00000002, 0x00090019, 0x000000A6,
0x0000000D, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000002,
0x0000000B, 0x00040020, 0x00000323, 0x00000000, 0x000000A6, 0x0004003B,
0x00000323, 0x00000CBA, 0x00000000, 0x0004002B, 0x0000000B, 0x00000A3A,
0x00000010, 0x0004002B, 0x0000000B, 0x00000A22, 0x00000008, 0x0006002C,
0x00000014, 0x00000B0F, 0x00000A3A, 0x00000A22, 0x00000A0D, 0x00030001,
0x0000001D, 0x00002818, 0x0006002C, 0x00000018, 0x000003AB, 0x000000FC,
0x000000FC, 0x000000FC, 0x00050036, 0x00000008, 0x0000161F, 0x00000000,
0x00000502, 0x000200F8, 0x00003B06, 0x000300F7, 0x00005445, 0x00000000,
0x000300FB, 0x00000A0A, 0x00003272, 0x000200F8, 0x00003272, 0x0004003D,
0x00000014, 0x000035C1, 0x00000F48, 0x0007004F, 0x00000011, 0x000054D5,
0x000035C1, 0x000035C1, 0x00000000, 0x00000001, 0x00050041, 0x0000028E,
0x00001E50, 0x0000118F, 0x00000A0B, 0x0004003D, 0x00000011, 0x00003442,
0x00001E50, 0x000500AE, 0x0000000F, 0x00005B8D, 0x000054D5, 0x00003442,
0x0004009A, 0x00000009, 0x00005A24, 0x00005B8D, 0x000300F7, 0x0000477E,
0x00000002, 0x000400FA, 0x00005A24, 0x000055E8, 0x0000477E, 0x000200F8,
0x000055E8, 0x000200F9, 0x00005445, 0x000200F8, 0x0000477E, 0x0004003D,
0x00000096, 0x00005DC4, 0x0000167F, 0x0004007C, 0x00000012, 0x00002925,
0x000054D5, 0x0007005F, 0x0000001D, 0x00001A18, 0x00005DC4, 0x00002925,
0x00000002, 0x00000A0B, 0x0008004F, 0x00000018, 0x00003F72, 0x00001A18,
0x00001A18, 0x00000000, 0x00000001, 0x00000002, 0x0005008E, 0x00000018,
0x00003653, 0x00003F72, 0x00000409, 0x00050081, 0x00000018, 0x000041F9,
0x00003653, 0x000003AB, 0x0004006D, 0x00000014, 0x00002B5B, 0x000041F9,
0x0004003D, 0x00000098, 0x00004DF2, 0x00001739, 0x00050051, 0x0000000B,
0x00005A3B, 0x00002B5B, 0x00000000, 0x000500C2, 0x0000000B, 0x0000453A,
0x00005A3B, 0x00000A13, 0x00050084, 0x0000000B, 0x00003E60, 0x0000453A,
0x00000A13, 0x0004007C, 0x0000000C, 0x0000475C, 0x00003E60, 0x0005005F,
0x00000017, 0x00003906, 0x00004DF2, 0x0000475C, 0x00050051, 0x0000000B,
0x000018E8, 0x00003906, 0x00000000, 0x00040070, 0x0000000D, 0x00004529,
0x000018E8, 0x000500C7, 0x0000000B, 0x0000301A, 0x00005A3B, 0x00000A1F,
0x00050051, 0x0000000B, 0x00003809, 0x00003906, 0x00000001, 0x00050084,
0x0000000B, 0x00003F66, 0x0000301A, 0x00003809, 0x00040070, 0x0000000D,
0x0000455F, 0x00003F66, 0x00050085, 0x0000000D, 0x00005946, 0x0000455F,
0x000001E0, 0x00050081, 0x0000000D, 0x00002EAC, 0x00004529, 0x00005946,
0x00050085, 0x0000000D, 0x00001C4C, 0x00002EAC, 0x000009AA, 0x0008000C,
0x0000000D, 0x00005759, 0x00000001, 0x0000002B, 0x00001C4C, 0x00000A0C,
0x0000008A, 0x00060052, 0x0000001D, 0x00001D4C, 0x00005759, 0x00002818,
0x00000000, 0x00050051, 0x0000000B, 0x00004E01, 0x00002B5B, 0x00000001,
0x000500C2, 0x0000000B, 0x000048A0, 0x00004E01, 0x00000A13, 0x00050084,
0x0000000B, 0x00003DD3, 0x000048A0, 0x00000A13, 0x00050080, 0x0000000B,
0x000049C7, 0x00003DD3, 0x00000A0D, 0x0004007C, 0x0000000C, 0x0000387C,
0x000049C7, 0x0005005F, 0x00000017, 0x000045A5, 0x00004DF2, 0x0000387C,
0x00050051, 0x0000000B, 0x000018E9, 0x000045A5, 0x00000000, 0x00040070,
0x0000000D, 0x0000452A, 0x000018E9, 0x000500C7, 0x0000000B, 0x0000301B,
0x00004E01, 0x00000A1F, 0x00050051, 0x0000000B, 0x0000380A, 0x000045A5,
0x00000001, 0x00050084, 0x0000000B, 0x00003F67, 0x0000301B, 0x0000380A,
0x00040070, 0x0000000D, 0x00004560, 0x00003F67, 0x00050085, 0x0000000D,
0x00005947, 0x00004560, 0x000001E0, 0x00050081, 0x0000000D, 0x00002EAD,
0x0000452A, 0x00005947, 0x00050085, 0x0000000D, 0x00001C4D, 0x00002EAD,
0x000009AA, 0x0008000C, 0x0000000D, 0x0000575A, 0x00000001, 0x0000002B,
0x00001C4D, 0x00000A0C, 0x0000008A, 0x00060052, 0x0000001D, 0x00001D4D,
0x0000575A, 0x00001D4C, 0x00000001, 0x00050051, 0x0000000B, 0x00004E02,
0x00002B5B, 0x00000002, 0x000500C2, 0x0000000B, 0x000048A1, 0x00004E02,
0x00000A13, 0x00050084, 0x0000000B, 0x00003DD4, 0x000048A1, 0x00000A13,
0x00050080, 0x0000000B, 0x000049C8, 0x00003DD4, 0x00000A10, 0x0004007C,
0x0000000C, 0x0000387D, 0x000049C8, 0x0005005F, 0x00000017, 0x000045A6,
0x00004DF2, 0x0000387D, 0x00050051, 0x0000000B, 0x000018EA, 0x000045A6,
0x00000000, 0x00040070, 0x0000000D, 0x0000452B, 0x000018EA, 0x000500C7,
0x0000000B, 0x0000301C, 0x00004E02, 0x00000A1F, 0x00050051, 0x0000000B,
0x0000380B, 0x000045A6, 0x00000001, 0x00050084, 0x0000000B, 0x00003F68,
0x0000301C, 0x0000380B, 0x00040070, 0x0000000D, 0x00004561, 0x00003F68,
0x00050085, 0x0000000D, 0x00005948, 0x00004561, 0x000001E0, 0x00050081,
0x0000000D, 0x00002EAE, 0x0000452B, 0x00005948, 0x00050085, 0x0000000D,
0x00001C4E, 0x00002EAE, 0x000009AA, 0x0008000C, 0x0000000D, 0x0000576C,
0x00000001, 0x0000002B, 0x00001C4E, 0x00000A0C, 0x0000008A, 0x00060052,
0x0000001D, 0x00005D3F, 0x0000576C, 0x00001D4D, 0x00000002, 0x00060052,
0x0000001D, 0x00003AEF, 0x0000008A, 0x00005D3F, 0x00000003, 0x0004003D,
0x000000A6, 0x00003FE7, 0x00000CBA, 0x00040063, 0x00003FE7, 0x00002925,
0x00003AEF, 0x000200F9, 0x00005445, 0x000200F8, 0x00005445, 0x000100FD,
0x00010038,
};

View File

@ -0,0 +1,271 @@
// Generated with `xb buildshaders`.
#if 0
; SPIR-V
; Version: 1.0
; Generator: Khronos Glslang Reference Front End; 10
; Bound: 24390
; Schema: 0
OpCapability Shader
OpCapability SampledBuffer
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %5663 "main" %gl_GlobalInvocationID
OpExecutionMode %5663 LocalSize 16 8 1
OpDecorate %gl_GlobalInvocationID BuiltIn GlobalInvocationId
OpMemberDecorate %_struct_993 0 Offset 0
OpDecorate %_struct_993 Block
OpDecorate %5759 DescriptorSet 1
OpDecorate %5759 Binding 0
OpDecorate %5945 DescriptorSet 0
OpDecorate %5945 Binding 0
OpDecorate %3258 DescriptorSet 2
OpDecorate %3258 Binding 0
OpDecorate %3258 NonReadable
OpDecorate %gl_WorkGroupSize BuiltIn WorkgroupSize
%void = OpTypeVoid
%1282 = OpTypeFunction %void
%float = OpTypeFloat 32
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
%float_0 = OpConstant %float 0
%float_1 = OpConstant %float 1
%uint_0 = OpConstant %uint 0
%uint_7 = OpConstant %uint 7
%uint_1 = OpConstant %uint 1
%float_0_125 = OpConstant %float 0.125
%float_1_52737048en05 = OpConstant %float 1.52737048e-05
%v3uint = OpTypeVector %uint 3
%_ptr_Input_v3uint = OpTypePointer Input %v3uint
%gl_GlobalInvocationID = OpVariable %_ptr_Input_v3uint Input
%_struct_993 = OpTypeStruct %v2uint
%_ptr_PushConstant__struct_993 = OpTypePointer PushConstant %_struct_993
%4495 = OpVariable %_ptr_PushConstant__struct_993 PushConstant
%int = OpTypeInt 32 1
%int_0 = OpConstant %int 0
%_ptr_PushConstant_v2uint = OpTypePointer PushConstant %v2uint
%bool = OpTypeBool
%v2bool = OpTypeVector %bool 2
%150 = OpTypeImage %float 2D 0 0 0 1 Unknown
%_ptr_UniformConstant_150 = OpTypePointer UniformConstant %150
%5759 = OpVariable %_ptr_UniformConstant_150 UniformConstant
%v2int = OpTypeVector %int 2
%v4float = OpTypeVector %float 4
%v3float = OpTypeVector %float 3
%float_1023 = OpConstant %float 1023
%float_0_5 = OpConstant %float 0.5
%152 = OpTypeImage %uint Buffer 0 0 0 1 Unknown
%_ptr_UniformConstant_152 = OpTypePointer UniformConstant %152
%5945 = OpVariable %_ptr_UniformConstant_152 UniformConstant
%uint_3 = OpConstant %uint 3
%v4uint = OpTypeVector %uint 4
%uint_2 = OpConstant %uint 2
%float_0_298999995 = OpConstant %float 0.298999995
%float_0_587000012 = OpConstant %float 0.587000012
%float_0_114 = OpConstant %float 0.114
%1268 = OpConstantComposite %v3float %float_0_298999995 %float_0_587000012 %float_0_114
%166 = OpTypeImage %float 2D 0 0 0 2 Rgba16f
%_ptr_UniformConstant_166 = OpTypePointer UniformConstant %166
%3258 = OpVariable %_ptr_UniformConstant_166 UniformConstant
%uint_16 = OpConstant %uint 16
%uint_8 = OpConstant %uint 8
%gl_WorkGroupSize = OpConstantComposite %v3uint %uint_16 %uint_8 %uint_1
%10264 = OpUndef %v4float
%939 = OpConstantComposite %v3float %float_0_5 %float_0_5 %float_0_5
%5663 = OpFunction %void None %1282
%15110 = OpLabel
OpSelectionMerge %21573 None
OpSwitch %uint_0 %12914
%12914 = OpLabel
%13761 = OpLoad %v3uint %gl_GlobalInvocationID
%21717 = OpVectorShuffle %v2uint %13761 %13761 0 1
%7760 = OpAccessChain %_ptr_PushConstant_v2uint %4495 %int_0
%13378 = OpLoad %v2uint %7760
%23437 = OpUGreaterThanEqual %v2bool %21717 %13378
%23076 = OpAny %bool %23437
OpSelectionMerge %18302 DontFlatten
OpBranchConditional %23076 %21992 %18302
%21992 = OpLabel
OpBranch %21573
%18302 = OpLabel
%24004 = OpLoad %150 %5759
%10533 = OpBitcast %v2int %21717
%6680 = OpImageFetch %v4float %24004 %10533 Lod %int_0
%16242 = OpVectorShuffle %v3float %6680 %6680 0 1 2
%13907 = OpVectorTimesScalar %v3float %16242 %float_1023
%16889 = OpFAdd %v3float %13907 %939
%11099 = OpConvertFToU %v3uint %16889
%19954 = OpLoad %152 %5945
%23099 = OpCompositeExtract %uint %11099 0
%17722 = OpShiftRightLogical %uint %23099 %uint_3
%15968 = OpIMul %uint %17722 %uint_3
%18268 = OpBitcast %int %15968
%14598 = OpImageFetch %v4uint %19954 %18268
%6376 = OpCompositeExtract %uint %14598 0
%17705 = OpConvertUToF %float %6376
%12314 = OpBitwiseAnd %uint %23099 %uint_7
%14345 = OpCompositeExtract %uint %14598 1
%16230 = OpIMul %uint %12314 %14345
%17759 = OpConvertUToF %float %16230
%22854 = OpFMul %float %17759 %float_0_125
%11948 = OpFAdd %float %17705 %22854
%7244 = OpFMul %float %11948 %float_1_52737048en05
%22361 = OpExtInst %float %1 FClamp %7244 %float_0 %float_1
%7500 = OpCompositeInsert %v4float %22361 %10264 0
%19969 = OpCompositeExtract %uint %11099 1
%18592 = OpShiftRightLogical %uint %19969 %uint_3
%15827 = OpIMul %uint %18592 %uint_3
%18887 = OpIAdd %uint %15827 %uint_1
%14460 = OpBitcast %int %18887
%17829 = OpImageFetch %v4uint %19954 %14460
%6377 = OpCompositeExtract %uint %17829 0
%17706 = OpConvertUToF %float %6377
%12315 = OpBitwiseAnd %uint %19969 %uint_7
%14346 = OpCompositeExtract %uint %17829 1
%16231 = OpIMul %uint %12315 %14346
%17760 = OpConvertUToF %float %16231
%22855 = OpFMul %float %17760 %float_0_125
%11949 = OpFAdd %float %17706 %22855
%7245 = OpFMul %float %11949 %float_1_52737048en05
%22362 = OpExtInst %float %1 FClamp %7245 %float_0 %float_1
%7501 = OpCompositeInsert %v4float %22362 %7500 1
%19970 = OpCompositeExtract %uint %11099 2
%18593 = OpShiftRightLogical %uint %19970 %uint_3
%15828 = OpIMul %uint %18593 %uint_3
%18888 = OpIAdd %uint %15828 %uint_2
%14461 = OpBitcast %int %18888
%17830 = OpImageFetch %v4uint %19954 %14461
%6378 = OpCompositeExtract %uint %17830 0
%17707 = OpConvertUToF %float %6378
%12316 = OpBitwiseAnd %uint %19970 %uint_7
%14347 = OpCompositeExtract %uint %17830 1
%16232 = OpIMul %uint %12316 %14347
%17761 = OpConvertUToF %float %16232
%22856 = OpFMul %float %17761 %float_0_125
%11950 = OpFAdd %float %17707 %22856
%7246 = OpFMul %float %11950 %float_1_52737048en05
%22323 = OpExtInst %float %1 FClamp %7246 %float_0 %float_1
%6972 = OpCompositeInsert %v4float %22323 %7501 2
%24292 = OpVectorShuffle %v3float %6972 %6972 0 1 2
%9311 = OpDot %float %24292 %1268
%21615 = OpCompositeInsert %v4float %9311 %6972 3
%24389 = OpLoad %166 %3258
OpImageWrite %24389 %10533 %21615
OpBranch %21573
%21573 = OpLabel
OpReturn
OpFunctionEnd
#endif
const uint32_t apply_gamma_pwl_fxaa_luma_cs[] = {
0x07230203, 0x00010000, 0x0008000A, 0x00005F46, 0x00000000, 0x00020011,
0x00000001, 0x00020011, 0x0000002E, 0x0006000B, 0x00000001, 0x4C534C47,
0x6474732E, 0x3035342E, 0x00000000, 0x0003000E, 0x00000000, 0x00000001,
0x0006000F, 0x00000005, 0x0000161F, 0x6E69616D, 0x00000000, 0x00000F48,
0x00060010, 0x0000161F, 0x00000011, 0x00000010, 0x00000008, 0x00000001,
0x00040047, 0x00000F48, 0x0000000B, 0x0000001C, 0x00050048, 0x000003E1,
0x00000000, 0x00000023, 0x00000000, 0x00030047, 0x000003E1, 0x00000002,
0x00040047, 0x0000167F, 0x00000022, 0x00000001, 0x00040047, 0x0000167F,
0x00000021, 0x00000000, 0x00040047, 0x00001739, 0x00000022, 0x00000000,
0x00040047, 0x00001739, 0x00000021, 0x00000000, 0x00040047, 0x00000CBA,
0x00000022, 0x00000002, 0x00040047, 0x00000CBA, 0x00000021, 0x00000000,
0x00030047, 0x00000CBA, 0x00000019, 0x00040047, 0x00000B0F, 0x0000000B,
0x00000019, 0x00020013, 0x00000008, 0x00030021, 0x00000502, 0x00000008,
0x00030016, 0x0000000D, 0x00000020, 0x00040015, 0x0000000B, 0x00000020,
0x00000000, 0x00040017, 0x00000011, 0x0000000B, 0x00000002, 0x0004002B,
0x0000000D, 0x00000A0C, 0x00000000, 0x0004002B, 0x0000000D, 0x0000008A,
0x3F800000, 0x0004002B, 0x0000000B, 0x00000A0A, 0x00000000, 0x0004002B,
0x0000000B, 0x00000A1F, 0x00000007, 0x0004002B, 0x0000000B, 0x00000A0D,
0x00000001, 0x0004002B, 0x0000000D, 0x000001E0, 0x3E000000, 0x0004002B,
0x0000000D, 0x000009AA, 0x37802008, 0x00040017, 0x00000014, 0x0000000B,
0x00000003, 0x00040020, 0x00000291, 0x00000001, 0x00000014, 0x0004003B,
0x00000291, 0x00000F48, 0x00000001, 0x0003001E, 0x000003E1, 0x00000011,
0x00040020, 0x0000065E, 0x00000009, 0x000003E1, 0x0004003B, 0x0000065E,
0x0000118F, 0x00000009, 0x00040015, 0x0000000C, 0x00000020, 0x00000001,
0x0004002B, 0x0000000C, 0x00000A0B, 0x00000000, 0x00040020, 0x0000028E,
0x00000009, 0x00000011, 0x00020014, 0x00000009, 0x00040017, 0x0000000F,
0x00000009, 0x00000002, 0x00090019, 0x00000096, 0x0000000D, 0x00000001,
0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00040020,
0x00000313, 0x00000000, 0x00000096, 0x0004003B, 0x00000313, 0x0000167F,
0x00000000, 0x00040017, 0x00000012, 0x0000000C, 0x00000002, 0x00040017,
0x0000001D, 0x0000000D, 0x00000004, 0x00040017, 0x00000018, 0x0000000D,
0x00000003, 0x0004002B, 0x0000000D, 0x00000409, 0x447FC000, 0x0004002B,
0x0000000D, 0x000000FC, 0x3F000000, 0x00090019, 0x00000098, 0x0000000B,
0x00000005, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000,
0x00040020, 0x00000315, 0x00000000, 0x00000098, 0x0004003B, 0x00000315,
0x00001739, 0x00000000, 0x0004002B, 0x0000000B, 0x00000A13, 0x00000003,
0x00040017, 0x00000017, 0x0000000B, 0x00000004, 0x0004002B, 0x0000000B,
0x00000A10, 0x00000002, 0x0004002B, 0x0000000D, 0x00000351, 0x3E991687,
0x0004002B, 0x0000000D, 0x00000458, 0x3F1645A2, 0x0004002B, 0x0000000D,
0x000001DC, 0x3DE978D5, 0x0006002C, 0x00000018, 0x000004F4, 0x00000351,
0x00000458, 0x000001DC, 0x00090019, 0x000000A6, 0x0000000D, 0x00000001,
0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000002, 0x00040020,
0x00000323, 0x00000000, 0x000000A6, 0x0004003B, 0x00000323, 0x00000CBA,
0x00000000, 0x0004002B, 0x0000000B, 0x00000A3A, 0x00000010, 0x0004002B,
0x0000000B, 0x00000A22, 0x00000008, 0x0006002C, 0x00000014, 0x00000B0F,
0x00000A3A, 0x00000A22, 0x00000A0D, 0x00030001, 0x0000001D, 0x00002818,
0x0006002C, 0x00000018, 0x000003AB, 0x000000FC, 0x000000FC, 0x000000FC,
0x00050036, 0x00000008, 0x0000161F, 0x00000000, 0x00000502, 0x000200F8,
0x00003B06, 0x000300F7, 0x00005445, 0x00000000, 0x000300FB, 0x00000A0A,
0x00003272, 0x000200F8, 0x00003272, 0x0004003D, 0x00000014, 0x000035C1,
0x00000F48, 0x0007004F, 0x00000011, 0x000054D5, 0x000035C1, 0x000035C1,
0x00000000, 0x00000001, 0x00050041, 0x0000028E, 0x00001E50, 0x0000118F,
0x00000A0B, 0x0004003D, 0x00000011, 0x00003442, 0x00001E50, 0x000500AE,
0x0000000F, 0x00005B8D, 0x000054D5, 0x00003442, 0x0004009A, 0x00000009,
0x00005A24, 0x00005B8D, 0x000300F7, 0x0000477E, 0x00000002, 0x000400FA,
0x00005A24, 0x000055E8, 0x0000477E, 0x000200F8, 0x000055E8, 0x000200F9,
0x00005445, 0x000200F8, 0x0000477E, 0x0004003D, 0x00000096, 0x00005DC4,
0x0000167F, 0x0004007C, 0x00000012, 0x00002925, 0x000054D5, 0x0007005F,
0x0000001D, 0x00001A18, 0x00005DC4, 0x00002925, 0x00000002, 0x00000A0B,
0x0008004F, 0x00000018, 0x00003F72, 0x00001A18, 0x00001A18, 0x00000000,
0x00000001, 0x00000002, 0x0005008E, 0x00000018, 0x00003653, 0x00003F72,
0x00000409, 0x00050081, 0x00000018, 0x000041F9, 0x00003653, 0x000003AB,
0x0004006D, 0x00000014, 0x00002B5B, 0x000041F9, 0x0004003D, 0x00000098,
0x00004DF2, 0x00001739, 0x00050051, 0x0000000B, 0x00005A3B, 0x00002B5B,
0x00000000, 0x000500C2, 0x0000000B, 0x0000453A, 0x00005A3B, 0x00000A13,
0x00050084, 0x0000000B, 0x00003E60, 0x0000453A, 0x00000A13, 0x0004007C,
0x0000000C, 0x0000475C, 0x00003E60, 0x0005005F, 0x00000017, 0x00003906,
0x00004DF2, 0x0000475C, 0x00050051, 0x0000000B, 0x000018E8, 0x00003906,
0x00000000, 0x00040070, 0x0000000D, 0x00004529, 0x000018E8, 0x000500C7,
0x0000000B, 0x0000301A, 0x00005A3B, 0x00000A1F, 0x00050051, 0x0000000B,
0x00003809, 0x00003906, 0x00000001, 0x00050084, 0x0000000B, 0x00003F66,
0x0000301A, 0x00003809, 0x00040070, 0x0000000D, 0x0000455F, 0x00003F66,
0x00050085, 0x0000000D, 0x00005946, 0x0000455F, 0x000001E0, 0x00050081,
0x0000000D, 0x00002EAC, 0x00004529, 0x00005946, 0x00050085, 0x0000000D,
0x00001C4C, 0x00002EAC, 0x000009AA, 0x0008000C, 0x0000000D, 0x00005759,
0x00000001, 0x0000002B, 0x00001C4C, 0x00000A0C, 0x0000008A, 0x00060052,
0x0000001D, 0x00001D4C, 0x00005759, 0x00002818, 0x00000000, 0x00050051,
0x0000000B, 0x00004E01, 0x00002B5B, 0x00000001, 0x000500C2, 0x0000000B,
0x000048A0, 0x00004E01, 0x00000A13, 0x00050084, 0x0000000B, 0x00003DD3,
0x000048A0, 0x00000A13, 0x00050080, 0x0000000B, 0x000049C7, 0x00003DD3,
0x00000A0D, 0x0004007C, 0x0000000C, 0x0000387C, 0x000049C7, 0x0005005F,
0x00000017, 0x000045A5, 0x00004DF2, 0x0000387C, 0x00050051, 0x0000000B,
0x000018E9, 0x000045A5, 0x00000000, 0x00040070, 0x0000000D, 0x0000452A,
0x000018E9, 0x000500C7, 0x0000000B, 0x0000301B, 0x00004E01, 0x00000A1F,
0x00050051, 0x0000000B, 0x0000380A, 0x000045A5, 0x00000001, 0x00050084,
0x0000000B, 0x00003F67, 0x0000301B, 0x0000380A, 0x00040070, 0x0000000D,
0x00004560, 0x00003F67, 0x00050085, 0x0000000D, 0x00005947, 0x00004560,
0x000001E0, 0x00050081, 0x0000000D, 0x00002EAD, 0x0000452A, 0x00005947,
0x00050085, 0x0000000D, 0x00001C4D, 0x00002EAD, 0x000009AA, 0x0008000C,
0x0000000D, 0x0000575A, 0x00000001, 0x0000002B, 0x00001C4D, 0x00000A0C,
0x0000008A, 0x00060052, 0x0000001D, 0x00001D4D, 0x0000575A, 0x00001D4C,
0x00000001, 0x00050051, 0x0000000B, 0x00004E02, 0x00002B5B, 0x00000002,
0x000500C2, 0x0000000B, 0x000048A1, 0x00004E02, 0x00000A13, 0x00050084,
0x0000000B, 0x00003DD4, 0x000048A1, 0x00000A13, 0x00050080, 0x0000000B,
0x000049C8, 0x00003DD4, 0x00000A10, 0x0004007C, 0x0000000C, 0x0000387D,
0x000049C8, 0x0005005F, 0x00000017, 0x000045A6, 0x00004DF2, 0x0000387D,
0x00050051, 0x0000000B, 0x000018EA, 0x000045A6, 0x00000000, 0x00040070,
0x0000000D, 0x0000452B, 0x000018EA, 0x000500C7, 0x0000000B, 0x0000301C,
0x00004E02, 0x00000A1F, 0x00050051, 0x0000000B, 0x0000380B, 0x000045A6,
0x00000001, 0x00050084, 0x0000000B, 0x00003F68, 0x0000301C, 0x0000380B,
0x00040070, 0x0000000D, 0x00004561, 0x00003F68, 0x00050085, 0x0000000D,
0x00005948, 0x00004561, 0x000001E0, 0x00050081, 0x0000000D, 0x00002EAE,
0x0000452B, 0x00005948, 0x00050085, 0x0000000D, 0x00001C4E, 0x00002EAE,
0x000009AA, 0x0008000C, 0x0000000D, 0x00005733, 0x00000001, 0x0000002B,
0x00001C4E, 0x00000A0C, 0x0000008A, 0x00060052, 0x0000001D, 0x00001B3C,
0x00005733, 0x00001D4D, 0x00000002, 0x0008004F, 0x00000018, 0x00005EE4,
0x00001B3C, 0x00001B3C, 0x00000000, 0x00000001, 0x00000002, 0x00050094,
0x0000000D, 0x0000245F, 0x00005EE4, 0x000004F4, 0x00060052, 0x0000001D,
0x0000546F, 0x0000245F, 0x00001B3C, 0x00000003, 0x0004003D, 0x000000A6,
0x00005F45, 0x00000CBA, 0x00040063, 0x00005F45, 0x00002925, 0x0000546F,
0x000200F9, 0x00005445, 0x000200F8, 0x00005445, 0x000100FD, 0x00010038,
};

View File

@ -0,0 +1,224 @@
// Generated with `xb buildshaders`.
#if 0
; SPIR-V
; Version: 1.0
; Generator: Khronos Glslang Reference Front End; 10
; Bound: 24950
; Schema: 0
OpCapability Shader
OpCapability SampledBuffer
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %5663 "main" %gl_FragCoord %3258
OpExecutionMode %5663 OriginUpperLeft
OpDecorate %gl_FragCoord BuiltIn FragCoord
OpDecorate %5759 DescriptorSet 1
OpDecorate %5759 Binding 0
OpDecorate %5945 DescriptorSet 0
OpDecorate %5945 Binding 0
OpDecorate %3258 Location 0
%void = OpTypeVoid
%1282 = OpTypeFunction %void
%float = OpTypeFloat 32
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
%float_0 = OpConstant %float 0
%float_1 = OpConstant %float 1
%uint_7 = OpConstant %uint 7
%uint_1 = OpConstant %uint 1
%float_0_125 = OpConstant %float 0.125
%float_1_52737048en05 = OpConstant %float 1.52737048e-05
%v4float = OpTypeVector %float 4
%_ptr_Input_v4float = OpTypePointer Input %v4float
%gl_FragCoord = OpVariable %_ptr_Input_v4float Input
%v2float = OpTypeVector %float 2
%v3uint = OpTypeVector %uint 3
%150 = OpTypeImage %float 2D 0 0 0 1 Unknown
%_ptr_UniformConstant_150 = OpTypePointer UniformConstant %150
%5759 = OpVariable %_ptr_UniformConstant_150 UniformConstant
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
%int_0 = OpConstant %int 0
%v3float = OpTypeVector %float 3
%float_1023 = OpConstant %float 1023
%float_0_5 = OpConstant %float 0.5
%152 = OpTypeImage %uint Buffer 0 0 0 1 Unknown
%_ptr_UniformConstant_152 = OpTypePointer UniformConstant %152
%5945 = OpVariable %_ptr_UniformConstant_152 UniformConstant
%uint_3 = OpConstant %uint 3
%v4uint = OpTypeVector %uint 4
%uint_2 = OpConstant %uint 2
%float_0_298999995 = OpConstant %float 0.298999995
%float_0_587000012 = OpConstant %float 0.587000012
%float_0_114 = OpConstant %float 0.114
%1268 = OpConstantComposite %v3float %float_0_298999995 %float_0_587000012 %float_0_114
%_ptr_Output_v4float = OpTypePointer Output %v4float
%3258 = OpVariable %_ptr_Output_v4float Output
%10264 = OpUndef %v4float
%939 = OpConstantComposite %v3float %float_0_5 %float_0_5 %float_0_5
%5663 = OpFunction %void None %1282
%24949 = OpLabel
%18552 = OpLoad %v4float %gl_FragCoord
%14105 = OpVectorShuffle %v2float %18552 %18552 0 1
%8667 = OpConvertFToU %v2uint %14105
%21665 = OpLoad %150 %5759
%11127 = OpBitcast %v2int %8667
%6680 = OpImageFetch %v4float %21665 %11127 Lod %int_0
%16242 = OpVectorShuffle %v3float %6680 %6680 0 1 2
%13907 = OpVectorTimesScalar %v3float %16242 %float_1023
%16889 = OpFAdd %v3float %13907 %939
%11099 = OpConvertFToU %v3uint %16889
%19954 = OpLoad %152 %5945
%23099 = OpCompositeExtract %uint %11099 0
%17722 = OpShiftRightLogical %uint %23099 %uint_3
%15968 = OpIMul %uint %17722 %uint_3
%18268 = OpBitcast %int %15968
%14598 = OpImageFetch %v4uint %19954 %18268
%6376 = OpCompositeExtract %uint %14598 0
%17705 = OpConvertUToF %float %6376
%12314 = OpBitwiseAnd %uint %23099 %uint_7
%14345 = OpCompositeExtract %uint %14598 1
%16230 = OpIMul %uint %12314 %14345
%17759 = OpConvertUToF %float %16230
%22854 = OpFMul %float %17759 %float_0_125
%11948 = OpFAdd %float %17705 %22854
%7244 = OpFMul %float %11948 %float_1_52737048en05
%22361 = OpExtInst %float %1 FClamp %7244 %float_0 %float_1
%7500 = OpCompositeInsert %v4float %22361 %10264 0
%19969 = OpCompositeExtract %uint %11099 1
%18592 = OpShiftRightLogical %uint %19969 %uint_3
%15827 = OpIMul %uint %18592 %uint_3
%18887 = OpIAdd %uint %15827 %uint_1
%14460 = OpBitcast %int %18887
%17829 = OpImageFetch %v4uint %19954 %14460
%6377 = OpCompositeExtract %uint %17829 0
%17706 = OpConvertUToF %float %6377
%12315 = OpBitwiseAnd %uint %19969 %uint_7
%14346 = OpCompositeExtract %uint %17829 1
%16231 = OpIMul %uint %12315 %14346
%17760 = OpConvertUToF %float %16231
%22855 = OpFMul %float %17760 %float_0_125
%11949 = OpFAdd %float %17706 %22855
%7245 = OpFMul %float %11949 %float_1_52737048en05
%22362 = OpExtInst %float %1 FClamp %7245 %float_0 %float_1
%7501 = OpCompositeInsert %v4float %22362 %7500 1
%19970 = OpCompositeExtract %uint %11099 2
%18593 = OpShiftRightLogical %uint %19970 %uint_3
%15828 = OpIMul %uint %18593 %uint_3
%18888 = OpIAdd %uint %15828 %uint_2
%14461 = OpBitcast %int %18888
%17830 = OpImageFetch %v4uint %19954 %14461
%6378 = OpCompositeExtract %uint %17830 0
%17707 = OpConvertUToF %float %6378
%12316 = OpBitwiseAnd %uint %19970 %uint_7
%14347 = OpCompositeExtract %uint %17830 1
%16232 = OpIMul %uint %12316 %14347
%17761 = OpConvertUToF %float %16232
%22856 = OpFMul %float %17761 %float_0_125
%11950 = OpFAdd %float %17707 %22856
%7246 = OpFMul %float %11950 %float_1_52737048en05
%22323 = OpExtInst %float %1 FClamp %7246 %float_0 %float_1
%6972 = OpCompositeInsert %v4float %22323 %7501 2
%24292 = OpVectorShuffle %v3float %6972 %6972 0 1 2
%9330 = OpDot %float %24292 %1268
%24368 = OpCompositeInsert %v4float %9330 %6972 3
OpStore %3258 %24368
OpReturn
OpFunctionEnd
#endif
const uint32_t apply_gamma_pwl_fxaa_luma_ps[] = {
0x07230203, 0x00010000, 0x0008000A, 0x00006176, 0x00000000, 0x00020011,
0x00000001, 0x00020011, 0x0000002E, 0x0006000B, 0x00000001, 0x4C534C47,
0x6474732E, 0x3035342E, 0x00000000, 0x0003000E, 0x00000000, 0x00000001,
0x0007000F, 0x00000004, 0x0000161F, 0x6E69616D, 0x00000000, 0x00000C93,
0x00000CBA, 0x00030010, 0x0000161F, 0x00000007, 0x00040047, 0x00000C93,
0x0000000B, 0x0000000F, 0x00040047, 0x0000167F, 0x00000022, 0x00000001,
0x00040047, 0x0000167F, 0x00000021, 0x00000000, 0x00040047, 0x00001739,
0x00000022, 0x00000000, 0x00040047, 0x00001739, 0x00000021, 0x00000000,
0x00040047, 0x00000CBA, 0x0000001E, 0x00000000, 0x00020013, 0x00000008,
0x00030021, 0x00000502, 0x00000008, 0x00030016, 0x0000000D, 0x00000020,
0x00040015, 0x0000000B, 0x00000020, 0x00000000, 0x00040017, 0x00000011,
0x0000000B, 0x00000002, 0x0004002B, 0x0000000D, 0x00000A0C, 0x00000000,
0x0004002B, 0x0000000D, 0x0000008A, 0x3F800000, 0x0004002B, 0x0000000B,
0x00000A1F, 0x00000007, 0x0004002B, 0x0000000B, 0x00000A0D, 0x00000001,
0x0004002B, 0x0000000D, 0x000001E0, 0x3E000000, 0x0004002B, 0x0000000D,
0x000009AA, 0x37802008, 0x00040017, 0x0000001D, 0x0000000D, 0x00000004,
0x00040020, 0x0000029A, 0x00000001, 0x0000001D, 0x0004003B, 0x0000029A,
0x00000C93, 0x00000001, 0x00040017, 0x00000013, 0x0000000D, 0x00000002,
0x00040017, 0x00000014, 0x0000000B, 0x00000003, 0x00090019, 0x00000096,
0x0000000D, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000001,
0x00000000, 0x00040020, 0x00000313, 0x00000000, 0x00000096, 0x0004003B,
0x00000313, 0x0000167F, 0x00000000, 0x00040015, 0x0000000C, 0x00000020,
0x00000001, 0x00040017, 0x00000012, 0x0000000C, 0x00000002, 0x0004002B,
0x0000000C, 0x00000A0B, 0x00000000, 0x00040017, 0x00000018, 0x0000000D,
0x00000003, 0x0004002B, 0x0000000D, 0x00000409, 0x447FC000, 0x0004002B,
0x0000000D, 0x000000FC, 0x3F000000, 0x00090019, 0x00000098, 0x0000000B,
0x00000005, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000,
0x00040020, 0x00000315, 0x00000000, 0x00000098, 0x0004003B, 0x00000315,
0x00001739, 0x00000000, 0x0004002B, 0x0000000B, 0x00000A13, 0x00000003,
0x00040017, 0x00000017, 0x0000000B, 0x00000004, 0x0004002B, 0x0000000B,
0x00000A10, 0x00000002, 0x0004002B, 0x0000000D, 0x00000351, 0x3E991687,
0x0004002B, 0x0000000D, 0x00000458, 0x3F1645A2, 0x0004002B, 0x0000000D,
0x000001DC, 0x3DE978D5, 0x0006002C, 0x00000018, 0x000004F4, 0x00000351,
0x00000458, 0x000001DC, 0x00040020, 0x0000029B, 0x00000003, 0x0000001D,
0x0004003B, 0x0000029B, 0x00000CBA, 0x00000003, 0x00030001, 0x0000001D,
0x00002818, 0x0006002C, 0x00000018, 0x000003AB, 0x000000FC, 0x000000FC,
0x000000FC, 0x00050036, 0x00000008, 0x0000161F, 0x00000000, 0x00000502,
0x000200F8, 0x00006175, 0x0004003D, 0x0000001D, 0x00004878, 0x00000C93,
0x0007004F, 0x00000013, 0x00003719, 0x00004878, 0x00004878, 0x00000000,
0x00000001, 0x0004006D, 0x00000011, 0x000021DB, 0x00003719, 0x0004003D,
0x00000096, 0x000054A1, 0x0000167F, 0x0004007C, 0x00000012, 0x00002B77,
0x000021DB, 0x0007005F, 0x0000001D, 0x00001A18, 0x000054A1, 0x00002B77,
0x00000002, 0x00000A0B, 0x0008004F, 0x00000018, 0x00003F72, 0x00001A18,
0x00001A18, 0x00000000, 0x00000001, 0x00000002, 0x0005008E, 0x00000018,
0x00003653, 0x00003F72, 0x00000409, 0x00050081, 0x00000018, 0x000041F9,
0x00003653, 0x000003AB, 0x0004006D, 0x00000014, 0x00002B5B, 0x000041F9,
0x0004003D, 0x00000098, 0x00004DF2, 0x00001739, 0x00050051, 0x0000000B,
0x00005A3B, 0x00002B5B, 0x00000000, 0x000500C2, 0x0000000B, 0x0000453A,
0x00005A3B, 0x00000A13, 0x00050084, 0x0000000B, 0x00003E60, 0x0000453A,
0x00000A13, 0x0004007C, 0x0000000C, 0x0000475C, 0x00003E60, 0x0005005F,
0x00000017, 0x00003906, 0x00004DF2, 0x0000475C, 0x00050051, 0x0000000B,
0x000018E8, 0x00003906, 0x00000000, 0x00040070, 0x0000000D, 0x00004529,
0x000018E8, 0x000500C7, 0x0000000B, 0x0000301A, 0x00005A3B, 0x00000A1F,
0x00050051, 0x0000000B, 0x00003809, 0x00003906, 0x00000001, 0x00050084,
0x0000000B, 0x00003F66, 0x0000301A, 0x00003809, 0x00040070, 0x0000000D,
0x0000455F, 0x00003F66, 0x00050085, 0x0000000D, 0x00005946, 0x0000455F,
0x000001E0, 0x00050081, 0x0000000D, 0x00002EAC, 0x00004529, 0x00005946,
0x00050085, 0x0000000D, 0x00001C4C, 0x00002EAC, 0x000009AA, 0x0008000C,
0x0000000D, 0x00005759, 0x00000001, 0x0000002B, 0x00001C4C, 0x00000A0C,
0x0000008A, 0x00060052, 0x0000001D, 0x00001D4C, 0x00005759, 0x00002818,
0x00000000, 0x00050051, 0x0000000B, 0x00004E01, 0x00002B5B, 0x00000001,
0x000500C2, 0x0000000B, 0x000048A0, 0x00004E01, 0x00000A13, 0x00050084,
0x0000000B, 0x00003DD3, 0x000048A0, 0x00000A13, 0x00050080, 0x0000000B,
0x000049C7, 0x00003DD3, 0x00000A0D, 0x0004007C, 0x0000000C, 0x0000387C,
0x000049C7, 0x0005005F, 0x00000017, 0x000045A5, 0x00004DF2, 0x0000387C,
0x00050051, 0x0000000B, 0x000018E9, 0x000045A5, 0x00000000, 0x00040070,
0x0000000D, 0x0000452A, 0x000018E9, 0x000500C7, 0x0000000B, 0x0000301B,
0x00004E01, 0x00000A1F, 0x00050051, 0x0000000B, 0x0000380A, 0x000045A5,
0x00000001, 0x00050084, 0x0000000B, 0x00003F67, 0x0000301B, 0x0000380A,
0x00040070, 0x0000000D, 0x00004560, 0x00003F67, 0x00050085, 0x0000000D,
0x00005947, 0x00004560, 0x000001E0, 0x00050081, 0x0000000D, 0x00002EAD,
0x0000452A, 0x00005947, 0x00050085, 0x0000000D, 0x00001C4D, 0x00002EAD,
0x000009AA, 0x0008000C, 0x0000000D, 0x0000575A, 0x00000001, 0x0000002B,
0x00001C4D, 0x00000A0C, 0x0000008A, 0x00060052, 0x0000001D, 0x00001D4D,
0x0000575A, 0x00001D4C, 0x00000001, 0x00050051, 0x0000000B, 0x00004E02,
0x00002B5B, 0x00000002, 0x000500C2, 0x0000000B, 0x000048A1, 0x00004E02,
0x00000A13, 0x00050084, 0x0000000B, 0x00003DD4, 0x000048A1, 0x00000A13,
0x00050080, 0x0000000B, 0x000049C8, 0x00003DD4, 0x00000A10, 0x0004007C,
0x0000000C, 0x0000387D, 0x000049C8, 0x0005005F, 0x00000017, 0x000045A6,
0x00004DF2, 0x0000387D, 0x00050051, 0x0000000B, 0x000018EA, 0x000045A6,
0x00000000, 0x00040070, 0x0000000D, 0x0000452B, 0x000018EA, 0x000500C7,
0x0000000B, 0x0000301C, 0x00004E02, 0x00000A1F, 0x00050051, 0x0000000B,
0x0000380B, 0x000045A6, 0x00000001, 0x00050084, 0x0000000B, 0x00003F68,
0x0000301C, 0x0000380B, 0x00040070, 0x0000000D, 0x00004561, 0x00003F68,
0x00050085, 0x0000000D, 0x00005948, 0x00004561, 0x000001E0, 0x00050081,
0x0000000D, 0x00002EAE, 0x0000452B, 0x00005948, 0x00050085, 0x0000000D,
0x00001C4E, 0x00002EAE, 0x000009AA, 0x0008000C, 0x0000000D, 0x00005733,
0x00000001, 0x0000002B, 0x00001C4E, 0x00000A0C, 0x0000008A, 0x00060052,
0x0000001D, 0x00001B3C, 0x00005733, 0x00001D4D, 0x00000002, 0x0008004F,
0x00000018, 0x00005EE4, 0x00001B3C, 0x00001B3C, 0x00000000, 0x00000001,
0x00000002, 0x00050094, 0x0000000D, 0x00002472, 0x00005EE4, 0x000004F4,
0x00060052, 0x0000001D, 0x00005F30, 0x00002472, 0x00001B3C, 0x00000003,
0x0003003E, 0x00000CBA, 0x00005F30, 0x000100FD, 0x00010038,
};

View File

@ -0,0 +1,213 @@
// Generated with `xb buildshaders`.
#if 0
; SPIR-V
; Version: 1.0
; Generator: Khronos Glslang Reference Front End; 10
; Bound: 24950
; Schema: 0
OpCapability Shader
OpCapability SampledBuffer
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %5663 "main" %gl_FragCoord %3258
OpExecutionMode %5663 OriginUpperLeft
OpDecorate %gl_FragCoord BuiltIn FragCoord
OpDecorate %5759 DescriptorSet 1
OpDecorate %5759 Binding 0
OpDecorate %5945 DescriptorSet 0
OpDecorate %5945 Binding 0
OpDecorate %3258 Location 0
%void = OpTypeVoid
%1282 = OpTypeFunction %void
%float = OpTypeFloat 32
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
%float_0 = OpConstant %float 0
%float_1 = OpConstant %float 1
%uint_7 = OpConstant %uint 7
%uint_1 = OpConstant %uint 1
%float_0_125 = OpConstant %float 0.125
%float_1_52737048en05 = OpConstant %float 1.52737048e-05
%v4float = OpTypeVector %float 4
%_ptr_Input_v4float = OpTypePointer Input %v4float
%gl_FragCoord = OpVariable %_ptr_Input_v4float Input
%v2float = OpTypeVector %float 2
%v3uint = OpTypeVector %uint 3
%150 = OpTypeImage %float 2D 0 0 0 1 Unknown
%_ptr_UniformConstant_150 = OpTypePointer UniformConstant %150
%5759 = OpVariable %_ptr_UniformConstant_150 UniformConstant
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
%int_0 = OpConstant %int 0
%v3float = OpTypeVector %float 3
%float_1023 = OpConstant %float 1023
%float_0_5 = OpConstant %float 0.5
%152 = OpTypeImage %uint Buffer 0 0 0 1 Unknown
%_ptr_UniformConstant_152 = OpTypePointer UniformConstant %152
%5945 = OpVariable %_ptr_UniformConstant_152 UniformConstant
%uint_3 = OpConstant %uint 3
%v4uint = OpTypeVector %uint 4
%uint_2 = OpConstant %uint 2
%_ptr_Output_v4float = OpTypePointer Output %v4float
%3258 = OpVariable %_ptr_Output_v4float Output
%10264 = OpUndef %v4float
%939 = OpConstantComposite %v3float %float_0_5 %float_0_5 %float_0_5
%5663 = OpFunction %void None %1282
%24949 = OpLabel
%18552 = OpLoad %v4float %gl_FragCoord
%14105 = OpVectorShuffle %v2float %18552 %18552 0 1
%8667 = OpConvertFToU %v2uint %14105
%21665 = OpLoad %150 %5759
%11127 = OpBitcast %v2int %8667
%6680 = OpImageFetch %v4float %21665 %11127 Lod %int_0
%16242 = OpVectorShuffle %v3float %6680 %6680 0 1 2
%13907 = OpVectorTimesScalar %v3float %16242 %float_1023
%16889 = OpFAdd %v3float %13907 %939
%11099 = OpConvertFToU %v3uint %16889
%19954 = OpLoad %152 %5945
%23099 = OpCompositeExtract %uint %11099 0
%17722 = OpShiftRightLogical %uint %23099 %uint_3
%15968 = OpIMul %uint %17722 %uint_3
%18268 = OpBitcast %int %15968
%14598 = OpImageFetch %v4uint %19954 %18268
%6376 = OpCompositeExtract %uint %14598 0
%17705 = OpConvertUToF %float %6376
%12314 = OpBitwiseAnd %uint %23099 %uint_7
%14345 = OpCompositeExtract %uint %14598 1
%16230 = OpIMul %uint %12314 %14345
%17759 = OpConvertUToF %float %16230
%22854 = OpFMul %float %17759 %float_0_125
%11948 = OpFAdd %float %17705 %22854
%7244 = OpFMul %float %11948 %float_1_52737048en05
%22361 = OpExtInst %float %1 FClamp %7244 %float_0 %float_1
%7500 = OpCompositeInsert %v4float %22361 %10264 0
%19969 = OpCompositeExtract %uint %11099 1
%18592 = OpShiftRightLogical %uint %19969 %uint_3
%15827 = OpIMul %uint %18592 %uint_3
%18887 = OpIAdd %uint %15827 %uint_1
%14460 = OpBitcast %int %18887
%17829 = OpImageFetch %v4uint %19954 %14460
%6377 = OpCompositeExtract %uint %17829 0
%17706 = OpConvertUToF %float %6377
%12315 = OpBitwiseAnd %uint %19969 %uint_7
%14346 = OpCompositeExtract %uint %17829 1
%16231 = OpIMul %uint %12315 %14346
%17760 = OpConvertUToF %float %16231
%22855 = OpFMul %float %17760 %float_0_125
%11949 = OpFAdd %float %17706 %22855
%7245 = OpFMul %float %11949 %float_1_52737048en05
%22362 = OpExtInst %float %1 FClamp %7245 %float_0 %float_1
%7501 = OpCompositeInsert %v4float %22362 %7500 1
%19970 = OpCompositeExtract %uint %11099 2
%18593 = OpShiftRightLogical %uint %19970 %uint_3
%15828 = OpIMul %uint %18593 %uint_3
%18888 = OpIAdd %uint %15828 %uint_2
%14461 = OpBitcast %int %18888
%17830 = OpImageFetch %v4uint %19954 %14461
%6378 = OpCompositeExtract %uint %17830 0
%17707 = OpConvertUToF %float %6378
%12316 = OpBitwiseAnd %uint %19970 %uint_7
%14347 = OpCompositeExtract %uint %17830 1
%16232 = OpIMul %uint %12316 %14347
%17761 = OpConvertUToF %float %16232
%22856 = OpFMul %float %17761 %float_0_125
%11950 = OpFAdd %float %17707 %22856
%7246 = OpFMul %float %11950 %float_1_52737048en05
%22380 = OpExtInst %float %1 FClamp %7246 %float_0 %float_1
%23890 = OpCompositeInsert %v4float %22380 %7501 2
%17840 = OpCompositeInsert %v4float %float_1 %23890 3
OpStore %3258 %17840
OpReturn
OpFunctionEnd
#endif
const uint32_t apply_gamma_pwl_ps[] = {
0x07230203, 0x00010000, 0x0008000A, 0x00006176, 0x00000000, 0x00020011,
0x00000001, 0x00020011, 0x0000002E, 0x0006000B, 0x00000001, 0x4C534C47,
0x6474732E, 0x3035342E, 0x00000000, 0x0003000E, 0x00000000, 0x00000001,
0x0007000F, 0x00000004, 0x0000161F, 0x6E69616D, 0x00000000, 0x00000C93,
0x00000CBA, 0x00030010, 0x0000161F, 0x00000007, 0x00040047, 0x00000C93,
0x0000000B, 0x0000000F, 0x00040047, 0x0000167F, 0x00000022, 0x00000001,
0x00040047, 0x0000167F, 0x00000021, 0x00000000, 0x00040047, 0x00001739,
0x00000022, 0x00000000, 0x00040047, 0x00001739, 0x00000021, 0x00000000,
0x00040047, 0x00000CBA, 0x0000001E, 0x00000000, 0x00020013, 0x00000008,
0x00030021, 0x00000502, 0x00000008, 0x00030016, 0x0000000D, 0x00000020,
0x00040015, 0x0000000B, 0x00000020, 0x00000000, 0x00040017, 0x00000011,
0x0000000B, 0x00000002, 0x0004002B, 0x0000000D, 0x00000A0C, 0x00000000,
0x0004002B, 0x0000000D, 0x0000008A, 0x3F800000, 0x0004002B, 0x0000000B,
0x00000A1F, 0x00000007, 0x0004002B, 0x0000000B, 0x00000A0D, 0x00000001,
0x0004002B, 0x0000000D, 0x000001E0, 0x3E000000, 0x0004002B, 0x0000000D,
0x000009AA, 0x37802008, 0x00040017, 0x0000001D, 0x0000000D, 0x00000004,
0x00040020, 0x0000029A, 0x00000001, 0x0000001D, 0x0004003B, 0x0000029A,
0x00000C93, 0x00000001, 0x00040017, 0x00000013, 0x0000000D, 0x00000002,
0x00040017, 0x00000014, 0x0000000B, 0x00000003, 0x00090019, 0x00000096,
0x0000000D, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000001,
0x00000000, 0x00040020, 0x00000313, 0x00000000, 0x00000096, 0x0004003B,
0x00000313, 0x0000167F, 0x00000000, 0x00040015, 0x0000000C, 0x00000020,
0x00000001, 0x00040017, 0x00000012, 0x0000000C, 0x00000002, 0x0004002B,
0x0000000C, 0x00000A0B, 0x00000000, 0x00040017, 0x00000018, 0x0000000D,
0x00000003, 0x0004002B, 0x0000000D, 0x00000409, 0x447FC000, 0x0004002B,
0x0000000D, 0x000000FC, 0x3F000000, 0x00090019, 0x00000098, 0x0000000B,
0x00000005, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000,
0x00040020, 0x00000315, 0x00000000, 0x00000098, 0x0004003B, 0x00000315,
0x00001739, 0x00000000, 0x0004002B, 0x0000000B, 0x00000A13, 0x00000003,
0x00040017, 0x00000017, 0x0000000B, 0x00000004, 0x0004002B, 0x0000000B,
0x00000A10, 0x00000002, 0x00040020, 0x0000029B, 0x00000003, 0x0000001D,
0x0004003B, 0x0000029B, 0x00000CBA, 0x00000003, 0x00030001, 0x0000001D,
0x00002818, 0x0006002C, 0x00000018, 0x000003AB, 0x000000FC, 0x000000FC,
0x000000FC, 0x00050036, 0x00000008, 0x0000161F, 0x00000000, 0x00000502,
0x000200F8, 0x00006175, 0x0004003D, 0x0000001D, 0x00004878, 0x00000C93,
0x0007004F, 0x00000013, 0x00003719, 0x00004878, 0x00004878, 0x00000000,
0x00000001, 0x0004006D, 0x00000011, 0x000021DB, 0x00003719, 0x0004003D,
0x00000096, 0x000054A1, 0x0000167F, 0x0004007C, 0x00000012, 0x00002B77,
0x000021DB, 0x0007005F, 0x0000001D, 0x00001A18, 0x000054A1, 0x00002B77,
0x00000002, 0x00000A0B, 0x0008004F, 0x00000018, 0x00003F72, 0x00001A18,
0x00001A18, 0x00000000, 0x00000001, 0x00000002, 0x0005008E, 0x00000018,
0x00003653, 0x00003F72, 0x00000409, 0x00050081, 0x00000018, 0x000041F9,
0x00003653, 0x000003AB, 0x0004006D, 0x00000014, 0x00002B5B, 0x000041F9,
0x0004003D, 0x00000098, 0x00004DF2, 0x00001739, 0x00050051, 0x0000000B,
0x00005A3B, 0x00002B5B, 0x00000000, 0x000500C2, 0x0000000B, 0x0000453A,
0x00005A3B, 0x00000A13, 0x00050084, 0x0000000B, 0x00003E60, 0x0000453A,
0x00000A13, 0x0004007C, 0x0000000C, 0x0000475C, 0x00003E60, 0x0005005F,
0x00000017, 0x00003906, 0x00004DF2, 0x0000475C, 0x00050051, 0x0000000B,
0x000018E8, 0x00003906, 0x00000000, 0x00040070, 0x0000000D, 0x00004529,
0x000018E8, 0x000500C7, 0x0000000B, 0x0000301A, 0x00005A3B, 0x00000A1F,
0x00050051, 0x0000000B, 0x00003809, 0x00003906, 0x00000001, 0x00050084,
0x0000000B, 0x00003F66, 0x0000301A, 0x00003809, 0x00040070, 0x0000000D,
0x0000455F, 0x00003F66, 0x00050085, 0x0000000D, 0x00005946, 0x0000455F,
0x000001E0, 0x00050081, 0x0000000D, 0x00002EAC, 0x00004529, 0x00005946,
0x00050085, 0x0000000D, 0x00001C4C, 0x00002EAC, 0x000009AA, 0x0008000C,
0x0000000D, 0x00005759, 0x00000001, 0x0000002B, 0x00001C4C, 0x00000A0C,
0x0000008A, 0x00060052, 0x0000001D, 0x00001D4C, 0x00005759, 0x00002818,
0x00000000, 0x00050051, 0x0000000B, 0x00004E01, 0x00002B5B, 0x00000001,
0x000500C2, 0x0000000B, 0x000048A0, 0x00004E01, 0x00000A13, 0x00050084,
0x0000000B, 0x00003DD3, 0x000048A0, 0x00000A13, 0x00050080, 0x0000000B,
0x000049C7, 0x00003DD3, 0x00000A0D, 0x0004007C, 0x0000000C, 0x0000387C,
0x000049C7, 0x0005005F, 0x00000017, 0x000045A5, 0x00004DF2, 0x0000387C,
0x00050051, 0x0000000B, 0x000018E9, 0x000045A5, 0x00000000, 0x00040070,
0x0000000D, 0x0000452A, 0x000018E9, 0x000500C7, 0x0000000B, 0x0000301B,
0x00004E01, 0x00000A1F, 0x00050051, 0x0000000B, 0x0000380A, 0x000045A5,
0x00000001, 0x00050084, 0x0000000B, 0x00003F67, 0x0000301B, 0x0000380A,
0x00040070, 0x0000000D, 0x00004560, 0x00003F67, 0x00050085, 0x0000000D,
0x00005947, 0x00004560, 0x000001E0, 0x00050081, 0x0000000D, 0x00002EAD,
0x0000452A, 0x00005947, 0x00050085, 0x0000000D, 0x00001C4D, 0x00002EAD,
0x000009AA, 0x0008000C, 0x0000000D, 0x0000575A, 0x00000001, 0x0000002B,
0x00001C4D, 0x00000A0C, 0x0000008A, 0x00060052, 0x0000001D, 0x00001D4D,
0x0000575A, 0x00001D4C, 0x00000001, 0x00050051, 0x0000000B, 0x00004E02,
0x00002B5B, 0x00000002, 0x000500C2, 0x0000000B, 0x000048A1, 0x00004E02,
0x00000A13, 0x00050084, 0x0000000B, 0x00003DD4, 0x000048A1, 0x00000A13,
0x00050080, 0x0000000B, 0x000049C8, 0x00003DD4, 0x00000A10, 0x0004007C,
0x0000000C, 0x0000387D, 0x000049C8, 0x0005005F, 0x00000017, 0x000045A6,
0x00004DF2, 0x0000387D, 0x00050051, 0x0000000B, 0x000018EA, 0x000045A6,
0x00000000, 0x00040070, 0x0000000D, 0x0000452B, 0x000018EA, 0x000500C7,
0x0000000B, 0x0000301C, 0x00004E02, 0x00000A1F, 0x00050051, 0x0000000B,
0x0000380B, 0x000045A6, 0x00000001, 0x00050084, 0x0000000B, 0x00003F68,
0x0000301C, 0x0000380B, 0x00040070, 0x0000000D, 0x00004561, 0x00003F68,
0x00050085, 0x0000000D, 0x00005948, 0x00004561, 0x000001E0, 0x00050081,
0x0000000D, 0x00002EAE, 0x0000452B, 0x00005948, 0x00050085, 0x0000000D,
0x00001C4E, 0x00002EAE, 0x000009AA, 0x0008000C, 0x0000000D, 0x0000576C,
0x00000001, 0x0000002B, 0x00001C4E, 0x00000A0C, 0x0000008A, 0x00060052,
0x0000001D, 0x00005D52, 0x0000576C, 0x00001D4D, 0x00000002, 0x00060052,
0x0000001D, 0x000045B0, 0x0000008A, 0x00005D52, 0x00000003, 0x0003003E,
0x00000CBA, 0x000045B0, 0x000100FD, 0x00010038,
};

View File

@ -0,0 +1,185 @@
// Generated with `xb buildshaders`.
#if 0
; SPIR-V
; Version: 1.0
; Generator: Khronos Glslang Reference Front End; 10
; Bound: 24687
; Schema: 0
OpCapability Shader
OpCapability SampledBuffer
OpCapability StorageImageExtendedFormats
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %5663 "main" %gl_GlobalInvocationID
OpExecutionMode %5663 LocalSize 16 8 1
OpDecorate %gl_GlobalInvocationID BuiltIn GlobalInvocationId
OpMemberDecorate %_struct_993 0 Offset 0
OpDecorate %_struct_993 Block
OpDecorate %5759 DescriptorSet 1
OpDecorate %5759 Binding 0
OpDecorate %5945 DescriptorSet 0
OpDecorate %5945 Binding 0
OpDecorate %3258 DescriptorSet 2
OpDecorate %3258 Binding 0
OpDecorate %3258 NonReadable
OpDecorate %gl_WorkGroupSize BuiltIn WorkgroupSize
%void = OpTypeVoid
%1282 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
%v3uint = OpTypeVector %uint 3
%_ptr_Input_v3uint = OpTypePointer Input %v3uint
%gl_GlobalInvocationID = OpVariable %_ptr_Input_v3uint Input
%_struct_993 = OpTypeStruct %v2uint
%_ptr_PushConstant__struct_993 = OpTypePointer PushConstant %_struct_993
%4495 = OpVariable %_ptr_PushConstant__struct_993 PushConstant
%int = OpTypeInt 32 1
%int_0 = OpConstant %int 0
%_ptr_PushConstant_v2uint = OpTypePointer PushConstant %v2uint
%bool = OpTypeBool
%v2bool = OpTypeVector %bool 2
%float = OpTypeFloat 32
%150 = OpTypeImage %float 2D 0 0 0 1 Unknown
%_ptr_UniformConstant_150 = OpTypePointer UniformConstant %150
%5759 = OpVariable %_ptr_UniformConstant_150 UniformConstant
%v2int = OpTypeVector %int 2
%v4float = OpTypeVector %float 4
%v3float = OpTypeVector %float 3
%float_255 = OpConstant %float 255
%float_0_5 = OpConstant %float 0.5
%154 = OpTypeImage %float Buffer 0 0 0 1 Unknown
%_ptr_UniformConstant_154 = OpTypePointer UniformConstant %154
%5945 = OpVariable %_ptr_UniformConstant_154 UniformConstant
%uint_0 = OpConstant %uint 0
%uint_1 = OpConstant %uint 1
%float_1 = OpConstant %float 1
%166 = OpTypeImage %float 2D 0 0 0 2 Rgb10A2
%_ptr_UniformConstant_166 = OpTypePointer UniformConstant %166
%3258 = OpVariable %_ptr_UniformConstant_166 UniformConstant
%uint_16 = OpConstant %uint 16
%uint_8 = OpConstant %uint 8
%gl_WorkGroupSize = OpConstantComposite %v3uint %uint_16 %uint_8 %uint_1
%10264 = OpUndef %v4float
%939 = OpConstantComposite %v3float %float_0_5 %float_0_5 %float_0_5
%5663 = OpFunction %void None %1282
%15110 = OpLabel
OpSelectionMerge %21573 None
OpSwitch %uint_0 %12914
%12914 = OpLabel
%13761 = OpLoad %v3uint %gl_GlobalInvocationID
%21717 = OpVectorShuffle %v2uint %13761 %13761 0 1
%7760 = OpAccessChain %_ptr_PushConstant_v2uint %4495 %int_0
%13378 = OpLoad %v2uint %7760
%23437 = OpUGreaterThanEqual %v2bool %21717 %13378
%23076 = OpAny %bool %23437
OpSelectionMerge %18302 DontFlatten
OpBranchConditional %23076 %21992 %18302
%21992 = OpLabel
OpBranch %21573
%18302 = OpLabel
%24004 = OpLoad %150 %5759
%10533 = OpBitcast %v2int %21717
%6680 = OpImageFetch %v4float %24004 %10533 Lod %int_0
%16242 = OpVectorShuffle %v3float %6680 %6680 0 1 2
%13907 = OpVectorTimesScalar %v3float %16242 %float_255
%16889 = OpFAdd %v3float %13907 %939
%11099 = OpConvertFToU %v3uint %16889
%18624 = OpLoad %154 %5945
%15435 = OpCompositeExtract %uint %11099 0
%24686 = OpBitcast %int %15435
%8410 = OpImageFetch %v4float %18624 %24686
%9324 = OpCompositeExtract %float %8410 2
%17732 = OpCompositeInsert %v4float %9324 %10264 0
%12852 = OpCompositeExtract %uint %11099 1
%12866 = OpBitcast %int %12852
%8411 = OpImageFetch %v4float %18624 %12866
%9325 = OpCompositeExtract %float %8411 1
%17733 = OpCompositeInsert %v4float %9325 %17732 1
%12853 = OpCompositeExtract %uint %11099 2
%12867 = OpBitcast %int %12853
%8412 = OpImageFetch %v4float %18624 %12867
%9343 = OpCompositeExtract %float %8412 0
%16362 = OpCompositeInsert %v4float %9343 %17733 2
%15634 = OpCompositeInsert %v4float %float_1 %16362 3
%16359 = OpLoad %166 %3258
OpImageWrite %16359 %10533 %15634
OpBranch %21573
%21573 = OpLabel
OpReturn
OpFunctionEnd
#endif
const uint32_t apply_gamma_table_cs[] = {
0x07230203, 0x00010000, 0x0008000A, 0x0000606F, 0x00000000, 0x00020011,
0x00000001, 0x00020011, 0x0000002E, 0x00020011, 0x00000031, 0x0006000B,
0x00000001, 0x4C534C47, 0x6474732E, 0x3035342E, 0x00000000, 0x0003000E,
0x00000000, 0x00000001, 0x0006000F, 0x00000005, 0x0000161F, 0x6E69616D,
0x00000000, 0x00000F48, 0x00060010, 0x0000161F, 0x00000011, 0x00000010,
0x00000008, 0x00000001, 0x00040047, 0x00000F48, 0x0000000B, 0x0000001C,
0x00050048, 0x000003E1, 0x00000000, 0x00000023, 0x00000000, 0x00030047,
0x000003E1, 0x00000002, 0x00040047, 0x0000167F, 0x00000022, 0x00000001,
0x00040047, 0x0000167F, 0x00000021, 0x00000000, 0x00040047, 0x00001739,
0x00000022, 0x00000000, 0x00040047, 0x00001739, 0x00000021, 0x00000000,
0x00040047, 0x00000CBA, 0x00000022, 0x00000002, 0x00040047, 0x00000CBA,
0x00000021, 0x00000000, 0x00030047, 0x00000CBA, 0x00000019, 0x00040047,
0x00000B0F, 0x0000000B, 0x00000019, 0x00020013, 0x00000008, 0x00030021,
0x00000502, 0x00000008, 0x00040015, 0x0000000B, 0x00000020, 0x00000000,
0x00040017, 0x00000011, 0x0000000B, 0x00000002, 0x00040017, 0x00000014,
0x0000000B, 0x00000003, 0x00040020, 0x00000291, 0x00000001, 0x00000014,
0x0004003B, 0x00000291, 0x00000F48, 0x00000001, 0x0003001E, 0x000003E1,
0x00000011, 0x00040020, 0x0000065E, 0x00000009, 0x000003E1, 0x0004003B,
0x0000065E, 0x0000118F, 0x00000009, 0x00040015, 0x0000000C, 0x00000020,
0x00000001, 0x0004002B, 0x0000000C, 0x00000A0B, 0x00000000, 0x00040020,
0x0000028E, 0x00000009, 0x00000011, 0x00020014, 0x00000009, 0x00040017,
0x0000000F, 0x00000009, 0x00000002, 0x00030016, 0x0000000D, 0x00000020,
0x00090019, 0x00000096, 0x0000000D, 0x00000001, 0x00000000, 0x00000000,
0x00000000, 0x00000001, 0x00000000, 0x00040020, 0x00000313, 0x00000000,
0x00000096, 0x0004003B, 0x00000313, 0x0000167F, 0x00000000, 0x00040017,
0x00000012, 0x0000000C, 0x00000002, 0x00040017, 0x0000001D, 0x0000000D,
0x00000004, 0x00040017, 0x00000018, 0x0000000D, 0x00000003, 0x0004002B,
0x0000000D, 0x00000540, 0x437F0000, 0x0004002B, 0x0000000D, 0x000000FC,
0x3F000000, 0x00090019, 0x0000009A, 0x0000000D, 0x00000005, 0x00000000,
0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00040020, 0x00000317,
0x00000000, 0x0000009A, 0x0004003B, 0x00000317, 0x00001739, 0x00000000,
0x0004002B, 0x0000000B, 0x00000A0A, 0x00000000, 0x0004002B, 0x0000000B,
0x00000A0D, 0x00000001, 0x0004002B, 0x0000000D, 0x0000008A, 0x3F800000,
0x00090019, 0x000000A6, 0x0000000D, 0x00000001, 0x00000000, 0x00000000,
0x00000000, 0x00000002, 0x0000000B, 0x00040020, 0x00000323, 0x00000000,
0x000000A6, 0x0004003B, 0x00000323, 0x00000CBA, 0x00000000, 0x0004002B,
0x0000000B, 0x00000A3A, 0x00000010, 0x0004002B, 0x0000000B, 0x00000A22,
0x00000008, 0x0006002C, 0x00000014, 0x00000B0F, 0x00000A3A, 0x00000A22,
0x00000A0D, 0x00030001, 0x0000001D, 0x00002818, 0x0006002C, 0x00000018,
0x000003AB, 0x000000FC, 0x000000FC, 0x000000FC, 0x00050036, 0x00000008,
0x0000161F, 0x00000000, 0x00000502, 0x000200F8, 0x00003B06, 0x000300F7,
0x00005445, 0x00000000, 0x000300FB, 0x00000A0A, 0x00003272, 0x000200F8,
0x00003272, 0x0004003D, 0x00000014, 0x000035C1, 0x00000F48, 0x0007004F,
0x00000011, 0x000054D5, 0x000035C1, 0x000035C1, 0x00000000, 0x00000001,
0x00050041, 0x0000028E, 0x00001E50, 0x0000118F, 0x00000A0B, 0x0004003D,
0x00000011, 0x00003442, 0x00001E50, 0x000500AE, 0x0000000F, 0x00005B8D,
0x000054D5, 0x00003442, 0x0004009A, 0x00000009, 0x00005A24, 0x00005B8D,
0x000300F7, 0x0000477E, 0x00000002, 0x000400FA, 0x00005A24, 0x000055E8,
0x0000477E, 0x000200F8, 0x000055E8, 0x000200F9, 0x00005445, 0x000200F8,
0x0000477E, 0x0004003D, 0x00000096, 0x00005DC4, 0x0000167F, 0x0004007C,
0x00000012, 0x00002925, 0x000054D5, 0x0007005F, 0x0000001D, 0x00001A18,
0x00005DC4, 0x00002925, 0x00000002, 0x00000A0B, 0x0008004F, 0x00000018,
0x00003F72, 0x00001A18, 0x00001A18, 0x00000000, 0x00000001, 0x00000002,
0x0005008E, 0x00000018, 0x00003653, 0x00003F72, 0x00000540, 0x00050081,
0x00000018, 0x000041F9, 0x00003653, 0x000003AB, 0x0004006D, 0x00000014,
0x00002B5B, 0x000041F9, 0x0004003D, 0x0000009A, 0x000048C0, 0x00001739,
0x00050051, 0x0000000B, 0x00003C4B, 0x00002B5B, 0x00000000, 0x0004007C,
0x0000000C, 0x0000606E, 0x00003C4B, 0x0005005F, 0x0000001D, 0x000020DA,
0x000048C0, 0x0000606E, 0x00050051, 0x0000000D, 0x0000246C, 0x000020DA,
0x00000002, 0x00060052, 0x0000001D, 0x00004544, 0x0000246C, 0x00002818,
0x00000000, 0x00050051, 0x0000000B, 0x00003234, 0x00002B5B, 0x00000001,
0x0004007C, 0x0000000C, 0x00003242, 0x00003234, 0x0005005F, 0x0000001D,
0x000020DB, 0x000048C0, 0x00003242, 0x00050051, 0x0000000D, 0x0000246D,
0x000020DB, 0x00000001, 0x00060052, 0x0000001D, 0x00004545, 0x0000246D,
0x00004544, 0x00000001, 0x00050051, 0x0000000B, 0x00003235, 0x00002B5B,
0x00000002, 0x0004007C, 0x0000000C, 0x00003243, 0x00003235, 0x0005005F,
0x0000001D, 0x000020DC, 0x000048C0, 0x00003243, 0x00050051, 0x0000000D,
0x0000247F, 0x000020DC, 0x00000000, 0x00060052, 0x0000001D, 0x00003FEA,
0x0000247F, 0x00004545, 0x00000002, 0x00060052, 0x0000001D, 0x00003D12,
0x0000008A, 0x00003FEA, 0x00000003, 0x0004003D, 0x000000A6, 0x00003FE7,
0x00000CBA, 0x00040063, 0x00003FE7, 0x00002925, 0x00003D12, 0x000200F9,
0x00005445, 0x000200F8, 0x00005445, 0x000100FD, 0x00010038,
};

View File

@ -0,0 +1,193 @@
// Generated with `xb buildshaders`.
#if 0
; SPIR-V
; Version: 1.0
; Generator: Khronos Glslang Reference Front End; 10
; Bound: 24840
; Schema: 0
OpCapability Shader
OpCapability SampledBuffer
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %5663 "main" %gl_GlobalInvocationID
OpExecutionMode %5663 LocalSize 16 8 1
OpDecorate %gl_GlobalInvocationID BuiltIn GlobalInvocationId
OpMemberDecorate %_struct_993 0 Offset 0
OpDecorate %_struct_993 Block
OpDecorate %5759 DescriptorSet 1
OpDecorate %5759 Binding 0
OpDecorate %5945 DescriptorSet 0
OpDecorate %5945 Binding 0
OpDecorate %3258 DescriptorSet 2
OpDecorate %3258 Binding 0
OpDecorate %3258 NonReadable
OpDecorate %gl_WorkGroupSize BuiltIn WorkgroupSize
%void = OpTypeVoid
%1282 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
%v3uint = OpTypeVector %uint 3
%_ptr_Input_v3uint = OpTypePointer Input %v3uint
%gl_GlobalInvocationID = OpVariable %_ptr_Input_v3uint Input
%_struct_993 = OpTypeStruct %v2uint
%_ptr_PushConstant__struct_993 = OpTypePointer PushConstant %_struct_993
%4495 = OpVariable %_ptr_PushConstant__struct_993 PushConstant
%int = OpTypeInt 32 1
%int_0 = OpConstant %int 0
%_ptr_PushConstant_v2uint = OpTypePointer PushConstant %v2uint
%bool = OpTypeBool
%v2bool = OpTypeVector %bool 2
%float = OpTypeFloat 32
%150 = OpTypeImage %float 2D 0 0 0 1 Unknown
%_ptr_UniformConstant_150 = OpTypePointer UniformConstant %150
%5759 = OpVariable %_ptr_UniformConstant_150 UniformConstant
%v2int = OpTypeVector %int 2
%v4float = OpTypeVector %float 4
%v3float = OpTypeVector %float 3
%float_255 = OpConstant %float 255
%float_0_5 = OpConstant %float 0.5
%154 = OpTypeImage %float Buffer 0 0 0 1 Unknown
%_ptr_UniformConstant_154 = OpTypePointer UniformConstant %154
%5945 = OpVariable %_ptr_UniformConstant_154 UniformConstant
%uint_0 = OpConstant %uint 0
%uint_1 = OpConstant %uint 1
%float_0_298999995 = OpConstant %float 0.298999995
%float_0_587000012 = OpConstant %float 0.587000012
%float_0_114 = OpConstant %float 0.114
%1268 = OpConstantComposite %v3float %float_0_298999995 %float_0_587000012 %float_0_114
%166 = OpTypeImage %float 2D 0 0 0 2 Rgba16f
%_ptr_UniformConstant_166 = OpTypePointer UniformConstant %166
%3258 = OpVariable %_ptr_UniformConstant_166 UniformConstant
%uint_16 = OpConstant %uint 16
%uint_8 = OpConstant %uint 8
%gl_WorkGroupSize = OpConstantComposite %v3uint %uint_16 %uint_8 %uint_1
%10264 = OpUndef %v4float
%939 = OpConstantComposite %v3float %float_0_5 %float_0_5 %float_0_5
%5663 = OpFunction %void None %1282
%15110 = OpLabel
OpSelectionMerge %21573 None
OpSwitch %uint_0 %12914
%12914 = OpLabel
%13761 = OpLoad %v3uint %gl_GlobalInvocationID
%21717 = OpVectorShuffle %v2uint %13761 %13761 0 1
%7760 = OpAccessChain %_ptr_PushConstant_v2uint %4495 %int_0
%13378 = OpLoad %v2uint %7760
%23437 = OpUGreaterThanEqual %v2bool %21717 %13378
%23076 = OpAny %bool %23437
OpSelectionMerge %18302 DontFlatten
OpBranchConditional %23076 %21992 %18302
%21992 = OpLabel
OpBranch %21573
%18302 = OpLabel
%24004 = OpLoad %150 %5759
%10533 = OpBitcast %v2int %21717
%6680 = OpImageFetch %v4float %24004 %10533 Lod %int_0
%16242 = OpVectorShuffle %v3float %6680 %6680 0 1 2
%13907 = OpVectorTimesScalar %v3float %16242 %float_255
%16889 = OpFAdd %v3float %13907 %939
%11099 = OpConvertFToU %v3uint %16889
%18624 = OpLoad %154 %5945
%15435 = OpCompositeExtract %uint %11099 0
%24686 = OpBitcast %int %15435
%8410 = OpImageFetch %v4float %18624 %24686
%9324 = OpCompositeExtract %float %8410 2
%17732 = OpCompositeInsert %v4float %9324 %10264 0
%12852 = OpCompositeExtract %uint %11099 1
%12866 = OpBitcast %int %12852
%8411 = OpImageFetch %v4float %18624 %12866
%9325 = OpCompositeExtract %float %8411 1
%17733 = OpCompositeInsert %v4float %9325 %17732 1
%12853 = OpCompositeExtract %uint %11099 2
%12867 = OpBitcast %int %12853
%8412 = OpImageFetch %v4float %18624 %12867
%9286 = OpCompositeExtract %float %8412 0
%18534 = OpCompositeInsert %v4float %9286 %17733 2
%24839 = OpVectorShuffle %v3float %18534 %18534 0 1 2
%9311 = OpDot %float %24839 %1268
%21615 = OpCompositeInsert %v4float %9311 %18534 3
%24389 = OpLoad %166 %3258
OpImageWrite %24389 %10533 %21615
OpBranch %21573
%21573 = OpLabel
OpReturn
OpFunctionEnd
#endif
const uint32_t apply_gamma_table_fxaa_luma_cs[] = {
0x07230203, 0x00010000, 0x0008000A, 0x00006108, 0x00000000, 0x00020011,
0x00000001, 0x00020011, 0x0000002E, 0x0006000B, 0x00000001, 0x4C534C47,
0x6474732E, 0x3035342E, 0x00000000, 0x0003000E, 0x00000000, 0x00000001,
0x0006000F, 0x00000005, 0x0000161F, 0x6E69616D, 0x00000000, 0x00000F48,
0x00060010, 0x0000161F, 0x00000011, 0x00000010, 0x00000008, 0x00000001,
0x00040047, 0x00000F48, 0x0000000B, 0x0000001C, 0x00050048, 0x000003E1,
0x00000000, 0x00000023, 0x00000000, 0x00030047, 0x000003E1, 0x00000002,
0x00040047, 0x0000167F, 0x00000022, 0x00000001, 0x00040047, 0x0000167F,
0x00000021, 0x00000000, 0x00040047, 0x00001739, 0x00000022, 0x00000000,
0x00040047, 0x00001739, 0x00000021, 0x00000000, 0x00040047, 0x00000CBA,
0x00000022, 0x00000002, 0x00040047, 0x00000CBA, 0x00000021, 0x00000000,
0x00030047, 0x00000CBA, 0x00000019, 0x00040047, 0x00000B0F, 0x0000000B,
0x00000019, 0x00020013, 0x00000008, 0x00030021, 0x00000502, 0x00000008,
0x00040015, 0x0000000B, 0x00000020, 0x00000000, 0x00040017, 0x00000011,
0x0000000B, 0x00000002, 0x00040017, 0x00000014, 0x0000000B, 0x00000003,
0x00040020, 0x00000291, 0x00000001, 0x00000014, 0x0004003B, 0x00000291,
0x00000F48, 0x00000001, 0x0003001E, 0x000003E1, 0x00000011, 0x00040020,
0x0000065E, 0x00000009, 0x000003E1, 0x0004003B, 0x0000065E, 0x0000118F,
0x00000009, 0x00040015, 0x0000000C, 0x00000020, 0x00000001, 0x0004002B,
0x0000000C, 0x00000A0B, 0x00000000, 0x00040020, 0x0000028E, 0x00000009,
0x00000011, 0x00020014, 0x00000009, 0x00040017, 0x0000000F, 0x00000009,
0x00000002, 0x00030016, 0x0000000D, 0x00000020, 0x00090019, 0x00000096,
0x0000000D, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000001,
0x00000000, 0x00040020, 0x00000313, 0x00000000, 0x00000096, 0x0004003B,
0x00000313, 0x0000167F, 0x00000000, 0x00040017, 0x00000012, 0x0000000C,
0x00000002, 0x00040017, 0x0000001D, 0x0000000D, 0x00000004, 0x00040017,
0x00000018, 0x0000000D, 0x00000003, 0x0004002B, 0x0000000D, 0x00000540,
0x437F0000, 0x0004002B, 0x0000000D, 0x000000FC, 0x3F000000, 0x00090019,
0x0000009A, 0x0000000D, 0x00000005, 0x00000000, 0x00000000, 0x00000000,
0x00000001, 0x00000000, 0x00040020, 0x00000317, 0x00000000, 0x0000009A,
0x0004003B, 0x00000317, 0x00001739, 0x00000000, 0x0004002B, 0x0000000B,
0x00000A0A, 0x00000000, 0x0004002B, 0x0000000B, 0x00000A0D, 0x00000001,
0x0004002B, 0x0000000D, 0x00000351, 0x3E991687, 0x0004002B, 0x0000000D,
0x00000458, 0x3F1645A2, 0x0004002B, 0x0000000D, 0x000001DC, 0x3DE978D5,
0x0006002C, 0x00000018, 0x000004F4, 0x00000351, 0x00000458, 0x000001DC,
0x00090019, 0x000000A6, 0x0000000D, 0x00000001, 0x00000000, 0x00000000,
0x00000000, 0x00000002, 0x00000002, 0x00040020, 0x00000323, 0x00000000,
0x000000A6, 0x0004003B, 0x00000323, 0x00000CBA, 0x00000000, 0x0004002B,
0x0000000B, 0x00000A3A, 0x00000010, 0x0004002B, 0x0000000B, 0x00000A22,
0x00000008, 0x0006002C, 0x00000014, 0x00000B0F, 0x00000A3A, 0x00000A22,
0x00000A0D, 0x00030001, 0x0000001D, 0x00002818, 0x0006002C, 0x00000018,
0x000003AB, 0x000000FC, 0x000000FC, 0x000000FC, 0x00050036, 0x00000008,
0x0000161F, 0x00000000, 0x00000502, 0x000200F8, 0x00003B06, 0x000300F7,
0x00005445, 0x00000000, 0x000300FB, 0x00000A0A, 0x00003272, 0x000200F8,
0x00003272, 0x0004003D, 0x00000014, 0x000035C1, 0x00000F48, 0x0007004F,
0x00000011, 0x000054D5, 0x000035C1, 0x000035C1, 0x00000000, 0x00000001,
0x00050041, 0x0000028E, 0x00001E50, 0x0000118F, 0x00000A0B, 0x0004003D,
0x00000011, 0x00003442, 0x00001E50, 0x000500AE, 0x0000000F, 0x00005B8D,
0x000054D5, 0x00003442, 0x0004009A, 0x00000009, 0x00005A24, 0x00005B8D,
0x000300F7, 0x0000477E, 0x00000002, 0x000400FA, 0x00005A24, 0x000055E8,
0x0000477E, 0x000200F8, 0x000055E8, 0x000200F9, 0x00005445, 0x000200F8,
0x0000477E, 0x0004003D, 0x00000096, 0x00005DC4, 0x0000167F, 0x0004007C,
0x00000012, 0x00002925, 0x000054D5, 0x0007005F, 0x0000001D, 0x00001A18,
0x00005DC4, 0x00002925, 0x00000002, 0x00000A0B, 0x0008004F, 0x00000018,
0x00003F72, 0x00001A18, 0x00001A18, 0x00000000, 0x00000001, 0x00000002,
0x0005008E, 0x00000018, 0x00003653, 0x00003F72, 0x00000540, 0x00050081,
0x00000018, 0x000041F9, 0x00003653, 0x000003AB, 0x0004006D, 0x00000014,
0x00002B5B, 0x000041F9, 0x0004003D, 0x0000009A, 0x000048C0, 0x00001739,
0x00050051, 0x0000000B, 0x00003C4B, 0x00002B5B, 0x00000000, 0x0004007C,
0x0000000C, 0x0000606E, 0x00003C4B, 0x0005005F, 0x0000001D, 0x000020DA,
0x000048C0, 0x0000606E, 0x00050051, 0x0000000D, 0x0000246C, 0x000020DA,
0x00000002, 0x00060052, 0x0000001D, 0x00004544, 0x0000246C, 0x00002818,
0x00000000, 0x00050051, 0x0000000B, 0x00003234, 0x00002B5B, 0x00000001,
0x0004007C, 0x0000000C, 0x00003242, 0x00003234, 0x0005005F, 0x0000001D,
0x000020DB, 0x000048C0, 0x00003242, 0x00050051, 0x0000000D, 0x0000246D,
0x000020DB, 0x00000001, 0x00060052, 0x0000001D, 0x00004545, 0x0000246D,
0x00004544, 0x00000001, 0x00050051, 0x0000000B, 0x00003235, 0x00002B5B,
0x00000002, 0x0004007C, 0x0000000C, 0x00003243, 0x00003235, 0x0005005F,
0x0000001D, 0x000020DC, 0x000048C0, 0x00003243, 0x00050051, 0x0000000D,
0x00002446, 0x000020DC, 0x00000000, 0x00060052, 0x0000001D, 0x00004866,
0x00002446, 0x00004545, 0x00000002, 0x0008004F, 0x00000018, 0x00006107,
0x00004866, 0x00004866, 0x00000000, 0x00000001, 0x00000002, 0x00050094,
0x0000000D, 0x0000245F, 0x00006107, 0x000004F4, 0x00060052, 0x0000001D,
0x0000546F, 0x0000245F, 0x00004866, 0x00000003, 0x0004003D, 0x000000A6,
0x00005F45, 0x00000CBA, 0x00040063, 0x00005F45, 0x00002925, 0x0000546F,
0x000200F9, 0x00005445, 0x000200F8, 0x00005445, 0x000100FD, 0x00010038,
};

View File

@ -0,0 +1,145 @@
// Generated with `xb buildshaders`.
#if 0
; SPIR-V
; Version: 1.0
; Generator: Khronos Glslang Reference Front End; 10
; Bound: 24950
; Schema: 0
OpCapability Shader
OpCapability SampledBuffer
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %5663 "main" %gl_FragCoord %3258
OpExecutionMode %5663 OriginUpperLeft
OpDecorate %gl_FragCoord BuiltIn FragCoord
OpDecorate %5759 DescriptorSet 1
OpDecorate %5759 Binding 0
OpDecorate %5945 DescriptorSet 0
OpDecorate %5945 Binding 0
OpDecorate %3258 Location 0
%void = OpTypeVoid
%1282 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Input_v4float = OpTypePointer Input %v4float
%gl_FragCoord = OpVariable %_ptr_Input_v4float Input
%v2float = OpTypeVector %float 2
%v3uint = OpTypeVector %uint 3
%150 = OpTypeImage %float 2D 0 0 0 1 Unknown
%_ptr_UniformConstant_150 = OpTypePointer UniformConstant %150
%5759 = OpVariable %_ptr_UniformConstant_150 UniformConstant
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
%int_0 = OpConstant %int 0
%v3float = OpTypeVector %float 3
%float_255 = OpConstant %float 255
%float_0_5 = OpConstant %float 0.5
%154 = OpTypeImage %float Buffer 0 0 0 1 Unknown
%_ptr_UniformConstant_154 = OpTypePointer UniformConstant %154
%5945 = OpVariable %_ptr_UniformConstant_154 UniformConstant
%float_0_298999995 = OpConstant %float 0.298999995
%float_0_587000012 = OpConstant %float 0.587000012
%float_0_114 = OpConstant %float 0.114
%1268 = OpConstantComposite %v3float %float_0_298999995 %float_0_587000012 %float_0_114
%_ptr_Output_v4float = OpTypePointer Output %v4float
%3258 = OpVariable %_ptr_Output_v4float Output
%10264 = OpUndef %v4float
%939 = OpConstantComposite %v3float %float_0_5 %float_0_5 %float_0_5
%5663 = OpFunction %void None %1282
%24949 = OpLabel
%18552 = OpLoad %v4float %gl_FragCoord
%14105 = OpVectorShuffle %v2float %18552 %18552 0 1
%8667 = OpConvertFToU %v2uint %14105
%21665 = OpLoad %150 %5759
%11127 = OpBitcast %v2int %8667
%6680 = OpImageFetch %v4float %21665 %11127 Lod %int_0
%16242 = OpVectorShuffle %v3float %6680 %6680 0 1 2
%13907 = OpVectorTimesScalar %v3float %16242 %float_255
%16889 = OpFAdd %v3float %13907 %939
%11099 = OpConvertFToU %v3uint %16889
%18624 = OpLoad %154 %5945
%15435 = OpCompositeExtract %uint %11099 0
%24686 = OpBitcast %int %15435
%8410 = OpImageFetch %v4float %18624 %24686
%9324 = OpCompositeExtract %float %8410 2
%17732 = OpCompositeInsert %v4float %9324 %10264 0
%12852 = OpCompositeExtract %uint %11099 1
%12866 = OpBitcast %int %12852
%8411 = OpImageFetch %v4float %18624 %12866
%9325 = OpCompositeExtract %float %8411 1
%17733 = OpCompositeInsert %v4float %9325 %17732 1
%12853 = OpCompositeExtract %uint %11099 2
%12867 = OpBitcast %int %12853
%8412 = OpImageFetch %v4float %18624 %12867
%9286 = OpCompositeExtract %float %8412 0
%18534 = OpCompositeInsert %v4float %9286 %17733 2
%24839 = OpVectorShuffle %v3float %18534 %18534 0 1 2
%9330 = OpDot %float %24839 %1268
%24368 = OpCompositeInsert %v4float %9330 %18534 3
OpStore %3258 %24368
OpReturn
OpFunctionEnd
#endif
const uint32_t apply_gamma_table_fxaa_luma_ps[] = {
0x07230203, 0x00010000, 0x0008000A, 0x00006176, 0x00000000, 0x00020011,
0x00000001, 0x00020011, 0x0000002E, 0x0006000B, 0x00000001, 0x4C534C47,
0x6474732E, 0x3035342E, 0x00000000, 0x0003000E, 0x00000000, 0x00000001,
0x0007000F, 0x00000004, 0x0000161F, 0x6E69616D, 0x00000000, 0x00000C93,
0x00000CBA, 0x00030010, 0x0000161F, 0x00000007, 0x00040047, 0x00000C93,
0x0000000B, 0x0000000F, 0x00040047, 0x0000167F, 0x00000022, 0x00000001,
0x00040047, 0x0000167F, 0x00000021, 0x00000000, 0x00040047, 0x00001739,
0x00000022, 0x00000000, 0x00040047, 0x00001739, 0x00000021, 0x00000000,
0x00040047, 0x00000CBA, 0x0000001E, 0x00000000, 0x00020013, 0x00000008,
0x00030021, 0x00000502, 0x00000008, 0x00040015, 0x0000000B, 0x00000020,
0x00000000, 0x00040017, 0x00000011, 0x0000000B, 0x00000002, 0x00030016,
0x0000000D, 0x00000020, 0x00040017, 0x0000001D, 0x0000000D, 0x00000004,
0x00040020, 0x0000029A, 0x00000001, 0x0000001D, 0x0004003B, 0x0000029A,
0x00000C93, 0x00000001, 0x00040017, 0x00000013, 0x0000000D, 0x00000002,
0x00040017, 0x00000014, 0x0000000B, 0x00000003, 0x00090019, 0x00000096,
0x0000000D, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000001,
0x00000000, 0x00040020, 0x00000313, 0x00000000, 0x00000096, 0x0004003B,
0x00000313, 0x0000167F, 0x00000000, 0x00040015, 0x0000000C, 0x00000020,
0x00000001, 0x00040017, 0x00000012, 0x0000000C, 0x00000002, 0x0004002B,
0x0000000C, 0x00000A0B, 0x00000000, 0x00040017, 0x00000018, 0x0000000D,
0x00000003, 0x0004002B, 0x0000000D, 0x00000540, 0x437F0000, 0x0004002B,
0x0000000D, 0x000000FC, 0x3F000000, 0x00090019, 0x0000009A, 0x0000000D,
0x00000005, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000,
0x00040020, 0x00000317, 0x00000000, 0x0000009A, 0x0004003B, 0x00000317,
0x00001739, 0x00000000, 0x0004002B, 0x0000000D, 0x00000351, 0x3E991687,
0x0004002B, 0x0000000D, 0x00000458, 0x3F1645A2, 0x0004002B, 0x0000000D,
0x000001DC, 0x3DE978D5, 0x0006002C, 0x00000018, 0x000004F4, 0x00000351,
0x00000458, 0x000001DC, 0x00040020, 0x0000029B, 0x00000003, 0x0000001D,
0x0004003B, 0x0000029B, 0x00000CBA, 0x00000003, 0x00030001, 0x0000001D,
0x00002818, 0x0006002C, 0x00000018, 0x000003AB, 0x000000FC, 0x000000FC,
0x000000FC, 0x00050036, 0x00000008, 0x0000161F, 0x00000000, 0x00000502,
0x000200F8, 0x00006175, 0x0004003D, 0x0000001D, 0x00004878, 0x00000C93,
0x0007004F, 0x00000013, 0x00003719, 0x00004878, 0x00004878, 0x00000000,
0x00000001, 0x0004006D, 0x00000011, 0x000021DB, 0x00003719, 0x0004003D,
0x00000096, 0x000054A1, 0x0000167F, 0x0004007C, 0x00000012, 0x00002B77,
0x000021DB, 0x0007005F, 0x0000001D, 0x00001A18, 0x000054A1, 0x00002B77,
0x00000002, 0x00000A0B, 0x0008004F, 0x00000018, 0x00003F72, 0x00001A18,
0x00001A18, 0x00000000, 0x00000001, 0x00000002, 0x0005008E, 0x00000018,
0x00003653, 0x00003F72, 0x00000540, 0x00050081, 0x00000018, 0x000041F9,
0x00003653, 0x000003AB, 0x0004006D, 0x00000014, 0x00002B5B, 0x000041F9,
0x0004003D, 0x0000009A, 0x000048C0, 0x00001739, 0x00050051, 0x0000000B,
0x00003C4B, 0x00002B5B, 0x00000000, 0x0004007C, 0x0000000C, 0x0000606E,
0x00003C4B, 0x0005005F, 0x0000001D, 0x000020DA, 0x000048C0, 0x0000606E,
0x00050051, 0x0000000D, 0x0000246C, 0x000020DA, 0x00000002, 0x00060052,
0x0000001D, 0x00004544, 0x0000246C, 0x00002818, 0x00000000, 0x00050051,
0x0000000B, 0x00003234, 0x00002B5B, 0x00000001, 0x0004007C, 0x0000000C,
0x00003242, 0x00003234, 0x0005005F, 0x0000001D, 0x000020DB, 0x000048C0,
0x00003242, 0x00050051, 0x0000000D, 0x0000246D, 0x000020DB, 0x00000001,
0x00060052, 0x0000001D, 0x00004545, 0x0000246D, 0x00004544, 0x00000001,
0x00050051, 0x0000000B, 0x00003235, 0x00002B5B, 0x00000002, 0x0004007C,
0x0000000C, 0x00003243, 0x00003235, 0x0005005F, 0x0000001D, 0x000020DC,
0x000048C0, 0x00003243, 0x00050051, 0x0000000D, 0x00002446, 0x000020DC,
0x00000000, 0x00060052, 0x0000001D, 0x00004866, 0x00002446, 0x00004545,
0x00000002, 0x0008004F, 0x00000018, 0x00006107, 0x00004866, 0x00004866,
0x00000000, 0x00000001, 0x00000002, 0x00050094, 0x0000000D, 0x00002472,
0x00006107, 0x000004F4, 0x00060052, 0x0000001D, 0x00005F30, 0x00002472,
0x00004866, 0x00000003, 0x0003003E, 0x00000CBA, 0x00005F30, 0x000100FD,
0x00010038,
};

View File

@ -0,0 +1,135 @@
// Generated with `xb buildshaders`.
#if 0
; SPIR-V
; Version: 1.0
; Generator: Khronos Glslang Reference Front End; 10
; Bound: 24950
; Schema: 0
OpCapability Shader
OpCapability SampledBuffer
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %5663 "main" %gl_FragCoord %3258
OpExecutionMode %5663 OriginUpperLeft
OpDecorate %gl_FragCoord BuiltIn FragCoord
OpDecorate %5759 DescriptorSet 1
OpDecorate %5759 Binding 0
OpDecorate %5945 DescriptorSet 0
OpDecorate %5945 Binding 0
OpDecorate %3258 Location 0
%void = OpTypeVoid
%1282 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Input_v4float = OpTypePointer Input %v4float
%gl_FragCoord = OpVariable %_ptr_Input_v4float Input
%v2float = OpTypeVector %float 2
%v3uint = OpTypeVector %uint 3
%150 = OpTypeImage %float 2D 0 0 0 1 Unknown
%_ptr_UniformConstant_150 = OpTypePointer UniformConstant %150
%5759 = OpVariable %_ptr_UniformConstant_150 UniformConstant
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
%int_0 = OpConstant %int 0
%v3float = OpTypeVector %float 3
%float_255 = OpConstant %float 255
%float_0_5 = OpConstant %float 0.5
%154 = OpTypeImage %float Buffer 0 0 0 1 Unknown
%_ptr_UniformConstant_154 = OpTypePointer UniformConstant %154
%5945 = OpVariable %_ptr_UniformConstant_154 UniformConstant
%float_1 = OpConstant %float 1
%_ptr_Output_v4float = OpTypePointer Output %v4float
%3258 = OpVariable %_ptr_Output_v4float Output
%10264 = OpUndef %v4float
%939 = OpConstantComposite %v3float %float_0_5 %float_0_5 %float_0_5
%5663 = OpFunction %void None %1282
%24949 = OpLabel
%18552 = OpLoad %v4float %gl_FragCoord
%14105 = OpVectorShuffle %v2float %18552 %18552 0 1
%8667 = OpConvertFToU %v2uint %14105
%21665 = OpLoad %150 %5759
%11127 = OpBitcast %v2int %8667
%6680 = OpImageFetch %v4float %21665 %11127 Lod %int_0
%16242 = OpVectorShuffle %v3float %6680 %6680 0 1 2
%13907 = OpVectorTimesScalar %v3float %16242 %float_255
%16889 = OpFAdd %v3float %13907 %939
%11099 = OpConvertFToU %v3uint %16889
%18624 = OpLoad %154 %5945
%15435 = OpCompositeExtract %uint %11099 0
%24686 = OpBitcast %int %15435
%8410 = OpImageFetch %v4float %18624 %24686
%9324 = OpCompositeExtract %float %8410 2
%17732 = OpCompositeInsert %v4float %9324 %10264 0
%12852 = OpCompositeExtract %uint %11099 1
%12866 = OpBitcast %int %12852
%8411 = OpImageFetch %v4float %18624 %12866
%9325 = OpCompositeExtract %float %8411 1
%17733 = OpCompositeInsert %v4float %9325 %17732 1
%12853 = OpCompositeExtract %uint %11099 2
%12867 = OpBitcast %int %12853
%8412 = OpImageFetch %v4float %18624 %12867
%9343 = OpCompositeExtract %float %8412 0
%16381 = OpCompositeInsert %v4float %9343 %17733 2
%18387 = OpCompositeInsert %v4float %float_1 %16381 3
OpStore %3258 %18387
OpReturn
OpFunctionEnd
#endif
const uint32_t apply_gamma_table_ps[] = {
0x07230203, 0x00010000, 0x0008000A, 0x00006176, 0x00000000, 0x00020011,
0x00000001, 0x00020011, 0x0000002E, 0x0006000B, 0x00000001, 0x4C534C47,
0x6474732E, 0x3035342E, 0x00000000, 0x0003000E, 0x00000000, 0x00000001,
0x0007000F, 0x00000004, 0x0000161F, 0x6E69616D, 0x00000000, 0x00000C93,
0x00000CBA, 0x00030010, 0x0000161F, 0x00000007, 0x00040047, 0x00000C93,
0x0000000B, 0x0000000F, 0x00040047, 0x0000167F, 0x00000022, 0x00000001,
0x00040047, 0x0000167F, 0x00000021, 0x00000000, 0x00040047, 0x00001739,
0x00000022, 0x00000000, 0x00040047, 0x00001739, 0x00000021, 0x00000000,
0x00040047, 0x00000CBA, 0x0000001E, 0x00000000, 0x00020013, 0x00000008,
0x00030021, 0x00000502, 0x00000008, 0x00040015, 0x0000000B, 0x00000020,
0x00000000, 0x00040017, 0x00000011, 0x0000000B, 0x00000002, 0x00030016,
0x0000000D, 0x00000020, 0x00040017, 0x0000001D, 0x0000000D, 0x00000004,
0x00040020, 0x0000029A, 0x00000001, 0x0000001D, 0x0004003B, 0x0000029A,
0x00000C93, 0x00000001, 0x00040017, 0x00000013, 0x0000000D, 0x00000002,
0x00040017, 0x00000014, 0x0000000B, 0x00000003, 0x00090019, 0x00000096,
0x0000000D, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000001,
0x00000000, 0x00040020, 0x00000313, 0x00000000, 0x00000096, 0x0004003B,
0x00000313, 0x0000167F, 0x00000000, 0x00040015, 0x0000000C, 0x00000020,
0x00000001, 0x00040017, 0x00000012, 0x0000000C, 0x00000002, 0x0004002B,
0x0000000C, 0x00000A0B, 0x00000000, 0x00040017, 0x00000018, 0x0000000D,
0x00000003, 0x0004002B, 0x0000000D, 0x00000540, 0x437F0000, 0x0004002B,
0x0000000D, 0x000000FC, 0x3F000000, 0x00090019, 0x0000009A, 0x0000000D,
0x00000005, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000,
0x00040020, 0x00000317, 0x00000000, 0x0000009A, 0x0004003B, 0x00000317,
0x00001739, 0x00000000, 0x0004002B, 0x0000000D, 0x0000008A, 0x3F800000,
0x00040020, 0x0000029B, 0x00000003, 0x0000001D, 0x0004003B, 0x0000029B,
0x00000CBA, 0x00000003, 0x00030001, 0x0000001D, 0x00002818, 0x0006002C,
0x00000018, 0x000003AB, 0x000000FC, 0x000000FC, 0x000000FC, 0x00050036,
0x00000008, 0x0000161F, 0x00000000, 0x00000502, 0x000200F8, 0x00006175,
0x0004003D, 0x0000001D, 0x00004878, 0x00000C93, 0x0007004F, 0x00000013,
0x00003719, 0x00004878, 0x00004878, 0x00000000, 0x00000001, 0x0004006D,
0x00000011, 0x000021DB, 0x00003719, 0x0004003D, 0x00000096, 0x000054A1,
0x0000167F, 0x0004007C, 0x00000012, 0x00002B77, 0x000021DB, 0x0007005F,
0x0000001D, 0x00001A18, 0x000054A1, 0x00002B77, 0x00000002, 0x00000A0B,
0x0008004F, 0x00000018, 0x00003F72, 0x00001A18, 0x00001A18, 0x00000000,
0x00000001, 0x00000002, 0x0005008E, 0x00000018, 0x00003653, 0x00003F72,
0x00000540, 0x00050081, 0x00000018, 0x000041F9, 0x00003653, 0x000003AB,
0x0004006D, 0x00000014, 0x00002B5B, 0x000041F9, 0x0004003D, 0x0000009A,
0x000048C0, 0x00001739, 0x00050051, 0x0000000B, 0x00003C4B, 0x00002B5B,
0x00000000, 0x0004007C, 0x0000000C, 0x0000606E, 0x00003C4B, 0x0005005F,
0x0000001D, 0x000020DA, 0x000048C0, 0x0000606E, 0x00050051, 0x0000000D,
0x0000246C, 0x000020DA, 0x00000002, 0x00060052, 0x0000001D, 0x00004544,
0x0000246C, 0x00002818, 0x00000000, 0x00050051, 0x0000000B, 0x00003234,
0x00002B5B, 0x00000001, 0x0004007C, 0x0000000C, 0x00003242, 0x00003234,
0x0005005F, 0x0000001D, 0x000020DB, 0x000048C0, 0x00003242, 0x00050051,
0x0000000D, 0x0000246D, 0x000020DB, 0x00000001, 0x00060052, 0x0000001D,
0x00004545, 0x0000246D, 0x00004544, 0x00000001, 0x00050051, 0x0000000B,
0x00003235, 0x00002B5B, 0x00000002, 0x0004007C, 0x0000000C, 0x00003243,
0x00003235, 0x0005005F, 0x0000001D, 0x000020DC, 0x000048C0, 0x00003243,
0x00050051, 0x0000000D, 0x0000247F, 0x000020DC, 0x00000000, 0x00060052,
0x0000001D, 0x00003FFD, 0x0000247F, 0x00004545, 0x00000002, 0x00060052,
0x0000001D, 0x000047D3, 0x0000008A, 0x00003FFD, 0x00000003, 0x0003003E,
0x00000CBA, 0x000047D3, 0x000100FD, 0x00010038,
};

View File

@ -0,0 +1,102 @@
// Generated with `xb buildshaders`.
#if 0
; SPIR-V
; Version: 1.0
; Generator: Khronos Glslang Reference Front End; 10
; Bound: 22213
; Schema: 0
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %5663 "main" %4930 %gl_VertexIndex
OpMemberDecorate %_struct_419 0 BuiltIn Position
OpMemberDecorate %_struct_419 1 BuiltIn PointSize
OpMemberDecorate %_struct_419 2 BuiltIn ClipDistance
OpMemberDecorate %_struct_419 3 BuiltIn CullDistance
OpDecorate %_struct_419 Block
OpDecorate %gl_VertexIndex BuiltIn VertexIndex
%void = OpTypeVoid
%1282 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%uint_1 = OpConstant %uint 1
%_arr_float_uint_1 = OpTypeArray %float %uint_1
%_struct_419 = OpTypeStruct %v4float %float %_arr_float_uint_1 %_arr_float_uint_1
%_ptr_Output__struct_419 = OpTypePointer Output %_struct_419
%4930 = OpVariable %_ptr_Output__struct_419 Output
%int = OpTypeInt 32 1
%int_0 = OpConstant %int 0
%_ptr_Input_int = OpTypePointer Input %int
%gl_VertexIndex = OpVariable %_ptr_Input_int Input
%uint_0 = OpConstant %uint 0
%1819 = OpConstantComposite %v2uint %uint_0 %uint_1
%v2float = OpTypeVector %float 2
%float_4 = OpConstant %float 4
%2183 = OpConstantComposite %v2float %float_4 %float_4
%float_n1 = OpConstant %float -1
%73 = OpConstantComposite %v2float %float_n1 %float_n1
%float_0 = OpConstant %float 0
%float_1 = OpConstant %float 1
%_ptr_Output_v4float = OpTypePointer Output %v4float
%1828 = OpConstantComposite %v2uint %uint_1 %uint_1
%5663 = OpFunction %void None %1282
%6733 = OpLabel
%10216 = OpLoad %int %gl_VertexIndex
%15313 = OpBitcast %uint %10216
%15408 = OpCompositeConstruct %v2uint %15313 %15313
%14991 = OpShiftRightLogical %v2uint %15408 %1819
%18859 = OpBitwiseAnd %v2uint %14991 %1828
%16455 = OpConvertUToF %v2float %18859
%8403 = OpFMul %v2float %16455 %2183
%22212 = OpFAdd %v2float %8403 %73
%10599 = OpCompositeExtract %float %22212 0
%13956 = OpCompositeExtract %float %22212 1
%18260 = OpCompositeConstruct %v4float %10599 %13956 %float_0 %float_1
%12055 = OpAccessChain %_ptr_Output_v4float %4930 %int_0
OpStore %12055 %18260
OpReturn
OpFunctionEnd
#endif
const uint32_t fullscreen_cw_vs[] = {
0x07230203, 0x00010000, 0x0008000A, 0x000056C5, 0x00000000, 0x00020011,
0x00000001, 0x0006000B, 0x00000001, 0x4C534C47, 0x6474732E, 0x3035342E,
0x00000000, 0x0003000E, 0x00000000, 0x00000001, 0x0007000F, 0x00000000,
0x0000161F, 0x6E69616D, 0x00000000, 0x00001342, 0x00001029, 0x00050048,
0x000001A3, 0x00000000, 0x0000000B, 0x00000000, 0x00050048, 0x000001A3,
0x00000001, 0x0000000B, 0x00000001, 0x00050048, 0x000001A3, 0x00000002,
0x0000000B, 0x00000003, 0x00050048, 0x000001A3, 0x00000003, 0x0000000B,
0x00000004, 0x00030047, 0x000001A3, 0x00000002, 0x00040047, 0x00001029,
0x0000000B, 0x0000002A, 0x00020013, 0x00000008, 0x00030021, 0x00000502,
0x00000008, 0x00040015, 0x0000000B, 0x00000020, 0x00000000, 0x00040017,
0x00000011, 0x0000000B, 0x00000002, 0x00030016, 0x0000000D, 0x00000020,
0x00040017, 0x0000001D, 0x0000000D, 0x00000004, 0x0004002B, 0x0000000B,
0x00000A0D, 0x00000001, 0x0004001C, 0x00000261, 0x0000000D, 0x00000A0D,
0x0006001E, 0x000001A3, 0x0000001D, 0x0000000D, 0x00000261, 0x00000261,
0x00040020, 0x00000420, 0x00000003, 0x000001A3, 0x0004003B, 0x00000420,
0x00001342, 0x00000003, 0x00040015, 0x0000000C, 0x00000020, 0x00000001,
0x0004002B, 0x0000000C, 0x00000A0B, 0x00000000, 0x00040020, 0x00000289,
0x00000001, 0x0000000C, 0x0004003B, 0x00000289, 0x00001029, 0x00000001,
0x0004002B, 0x0000000B, 0x00000A0A, 0x00000000, 0x0005002C, 0x00000011,
0x0000071B, 0x00000A0A, 0x00000A0D, 0x00040017, 0x00000013, 0x0000000D,
0x00000002, 0x0004002B, 0x0000000D, 0x00000B69, 0x40800000, 0x0005002C,
0x00000013, 0x00000887, 0x00000B69, 0x00000B69, 0x0004002B, 0x0000000D,
0x00000341, 0xBF800000, 0x0005002C, 0x00000013, 0x00000049, 0x00000341,
0x00000341, 0x0004002B, 0x0000000D, 0x00000A0C, 0x00000000, 0x0004002B,
0x0000000D, 0x0000008A, 0x3F800000, 0x00040020, 0x0000029A, 0x00000003,
0x0000001D, 0x0005002C, 0x00000011, 0x00000724, 0x00000A0D, 0x00000A0D,
0x00050036, 0x00000008, 0x0000161F, 0x00000000, 0x00000502, 0x000200F8,
0x00001A4D, 0x0004003D, 0x0000000C, 0x000027E8, 0x00001029, 0x0004007C,
0x0000000B, 0x00003BD1, 0x000027E8, 0x00050050, 0x00000011, 0x00003C30,
0x00003BD1, 0x00003BD1, 0x000500C2, 0x00000011, 0x00003A8F, 0x00003C30,
0x0000071B, 0x000500C7, 0x00000011, 0x000049AB, 0x00003A8F, 0x00000724,
0x00040070, 0x00000013, 0x00004047, 0x000049AB, 0x00050085, 0x00000013,
0x000020D3, 0x00004047, 0x00000887, 0x00050081, 0x00000013, 0x000056C4,
0x000020D3, 0x00000049, 0x00050051, 0x0000000D, 0x00002967, 0x000056C4,
0x00000000, 0x00050051, 0x0000000D, 0x00003684, 0x000056C4, 0x00000001,
0x00070050, 0x0000001D, 0x00004754, 0x00002967, 0x00003684, 0x00000A0C,
0x0000008A, 0x00050041, 0x0000029A, 0x00002F17, 0x00001342, 0x00000A0B,
0x0003003E, 0x00002F17, 0x00004754, 0x000100FD, 0x00010038,
};

View File

@ -1,5 +0,0 @@
// A triangle covering the whole viewport.
float4 main(uint xe_vertex_id : SV_VertexID) : SV_Position {
return float4(((xe_vertex_id.xx >> uint2(0u, 1u)) & 1u) * 4.0 - 1.0, 0.0,
1.0);
}

View File

@ -0,0 +1,26 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2022 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#include "../../ui/shaders/xesl.xesli"
// A clockwise triangle covering the whole viewport.
xesl_entry_outputs_begin
xesl_entry_output_position
xesl_entry_outputs_end_stageInputs_begin
xesl_entry_stageInputs_end_bindings_begin_vertex
xesl_entry_bindings_empty_end_inputs_begin
xesl_entry_input_vertexID
xesl_entry_inputs_end_code_begin
xesl_Position = xesl_float4(
xesl_float2((xesl_uint_x2(xesl_VertexID) >> xesl_uint2(0u, 1u)) & 1u) *
xesl_float2(4.0, 4.0 * XESL_Y_SCREEN_DIRECTION) +
xesl_float2(-1.0, -XESL_Y_SCREEN_DIRECTION),
0.0, 1.0);
xesl_entry_code_end

View File

@ -22,7 +22,7 @@ SamplerState xe_sampler_linear_clamp : register(s0);
#define FXAA_HLSL_5 1 #define FXAA_HLSL_5 1
#include "../../../../third_party/fxaa/FXAA3_11.h" #include "../../../../third_party/fxaa/FXAA3_11.h"
[numthreads(8, 8, 1)] [numthreads(16, 8, 1)]
void main(uint3 xe_thread_id : SV_DispatchThreadID) { void main(uint3 xe_thread_id : SV_DispatchThreadID) {
[branch] if (any(xe_thread_id.xy >= xe_fxaa_size)) { [branch] if (any(xe_thread_id.xy >= xe_fxaa_size)) {
return; return;

View File

@ -649,9 +649,16 @@ xesl_float4 xesl_float_x4(float xesl_var_value) {
#if XESL_LANGUAGE_GLSL #if XESL_LANGUAGE_GLSL
#define XESL_COMBINED_TEXTURE_SAMPLER 1 #define XESL_COMBINED_TEXTURE_SAMPLER 1
// Types. // Types.
#define xesl_textureBuffer textureBuffer
#define xesl_utextureBuffer utextureBuffer
#define xesl_texture2D texture2D #define xesl_texture2D texture2D
#define xesl_texture2DMS texture2DMS #define xesl_texture2DMS texture2DMS
#define xesl_samplerBuffer samplerBuffer
#define xesl_usamplerBuffer usamplerBuffer
#define xesl_sampler2D sampler2D #define xesl_sampler2D sampler2D
#define xesl_image2D image2D
#define xesl_imageFormat_rgb10_a2 rgb10_a2
#define xesl_imageFormat_rgba16f rgba16f
// Binding declarations. // Binding declarations.
#define xesl_texture(texture_type, name, glsl_set, glsl_binding, hlsl_t, \ #define xesl_texture(texture_type, name, glsl_set, glsl_binding, hlsl_t, \
hlsl_t_space, msl_texture) \ hlsl_t_space, msl_texture) \
@ -663,7 +670,12 @@ xesl_float4 xesl_float_x4(float xesl_var_value) {
hlsl_t_space, hlsl_s, hlsl_s_space, msl_texture, \ hlsl_t_space, hlsl_s, hlsl_s_space, msl_texture, \
msl_sampler) \ msl_sampler) \
layout(glsl_set, glsl_binding) uniform sampler_type name; layout(glsl_set, glsl_binding) uniform sampler_type name;
#define xesl_writeImage(type, format, name, glsl_set, glsl_binding, hlsl_u, \
hlsl_u_space, msl_texture) \
layout(format, glsl_set, glsl_binding) uniform writeonly type name;
// Fetching and storing. // Fetching and storing.
#define xesl_texelFetchBuffer(texture_name, position) \
texelFetch(texture_name, int(position))
#define xesl_texelFetch2D(texture_name, position, lod) \ #define xesl_texelFetch2D(texture_name, position, lod) \
texelFetch(texture_name, xesl_int2(position), int(lod)) texelFetch(texture_name, xesl_int2(position), int(lod))
#define xesl_texelFetch2DMS(texture_name, position, sample_index) \ #define xesl_texelFetch2DMS(texture_name, position, sample_index) \
@ -689,10 +701,17 @@ xesl_float4 xesl_float_x4(float xesl_var_value) {
textureGather(texture_sampler_name, position, 2) textureGather(texture_sampler_name, position, 2)
#define xesl_textureGatherAlpha2D_comb(texture_sampler_name, position) \ #define xesl_textureGatherAlpha2D_comb(texture_sampler_name, position) \
textureGather(texture_sampler_name, position, 3) textureGather(texture_sampler_name, position, 3)
#define xesl_imageStore2DRGBA(name, position, data) \
imageStore(name, xesl_int2(position), data)
#elif XESL_LANGUAGE_HLSL #elif XESL_LANGUAGE_HLSL
// Types. // Types.
#define xesl_textureBuffer Buffer<xesl_float4>
#define xesl_utextureBuffer Buffer<xesl_uint4>
#define xesl_texture2D Texture2D<xesl_float4> #define xesl_texture2D Texture2D<xesl_float4>
#define xesl_texture2DMS Texture2DMS<xesl_float4> #define xesl_texture2DMS Texture2DMS<xesl_float4>
#define xesl_image2D RWTexture2D
#define xesl_imageFormat_rgb10_a2 unorm float4
#define xesl_imageFormat_rgba16f float4
// Binding declarations. // Binding declarations.
#define xesl_texture(texture_type, name, glsl_set, glsl_binding, hlsl_t, \ #define xesl_texture(texture_type, name, glsl_set, glsl_binding, hlsl_t, \
hlsl_t_space, msl_texture) \ hlsl_t_space, msl_texture) \
@ -700,7 +719,12 @@ xesl_float4 xesl_float_x4(float xesl_var_value) {
#define xesl_samplerState(name, glsl_set, glsl_binding, hlsl_s, \ #define xesl_samplerState(name, glsl_set, glsl_binding, hlsl_s, \
hlsl_s_space, msl_sampler) \ hlsl_s_space, msl_sampler) \
SamplerState name : register(hlsl_s, hlsl_s_space); SamplerState name : register(hlsl_s, hlsl_s_space);
#define xesl_writeImage(type, format, name, glsl_set, glsl_binding, hlsl_u, \
hlsl_u_space, msl_texture) \
type<format> name : register(hlsl_u, hlsl_u_space);
// Fetching and storing. // Fetching and storing.
#define xesl_texelFetchBuffer(texture_name, position) \
((texture_name).Load(int(position)))
#define xesl_texelFetch2D(texture_name, position, lod) \ #define xesl_texelFetch2D(texture_name, position, lod) \
((texture_name).Load(xesl_int3(position, lod))) ((texture_name).Load(xesl_int3(position, lod)))
#define xesl_texelFetch2DMS(texture_name, position, sample_index) \ #define xesl_texelFetch2DMS(texture_name, position, sample_index) \
@ -716,10 +740,17 @@ xesl_float4 xesl_float_x4(float xesl_var_value) {
((texture_name).GatherBlue(sampler_name, position)) ((texture_name).GatherBlue(sampler_name, position))
#define xesl_textureGatherAlpha2D_sep(texture_name, sampler_name, position) \ #define xesl_textureGatherAlpha2D_sep(texture_name, sampler_name, position) \
((texture_name).GatherAlpha(sampler_name, position)) ((texture_name).GatherAlpha(sampler_name, position))
#define xesl_imageStore2DRGBA(name, position, data) \
((name)[xesl_int2(position)] = (data))
#elif XESL_LANGUAGE_MSL #elif XESL_LANGUAGE_MSL
// Types. // Types.
#define xesl_textureBuffer texture_buffer<float>
#define xesl_utextureBuffer texture_buffer<uint>
#define xesl_texture2D texture2d<float> #define xesl_texture2D texture2d<float>
#define xesl_texture2DMS texture2d_ms<float> #define xesl_texture2DMS texture2d_ms<float>
#define xesl_image2D texture2d
#define xesl_imageFormat_rgb10_a2 float
#define xesl_imageFormat_rgba16f float
// Binding declarations. // Binding declarations.
#define xesl_texture(texture_type, name, glsl_set, glsl_binding, hlsl_t, \ #define xesl_texture(texture_type, name, glsl_set, glsl_binding, hlsl_t, \
hlsl_t_space, msl_texture) \ hlsl_t_space, msl_texture) \
@ -727,7 +758,12 @@ xesl_float4 xesl_float_x4(float xesl_var_value) {
#define xesl_samplerState(name, glsl_set, glsl_binding, hlsl_s, \ #define xesl_samplerState(name, glsl_set, glsl_binding, hlsl_s, \
hlsl_s_space, msl_sampler) \ hlsl_s_space, msl_sampler) \
sampler name [[msl_sampler]] sampler name [[msl_sampler]]
#define xesl_writeImage(type, format, name, glsl_set, glsl_binding, hlsl_u, \
hlsl_u_space, msl_texture) \
type<format, access::write> name [[msl_texture]]
// Fetching and storing. // Fetching and storing.
#define xesl_texelFetchBuffer(texture_name, position) \
((texture_name).read(uint(position)))
#define xesl_texelFetch2D(texture_name, position, lod) \ #define xesl_texelFetch2D(texture_name, position, lod) \
((texture_name).read(xesl_uint2(position), uint(lod))) ((texture_name).read(xesl_uint2(position), uint(lod)))
#define xesl_texelFetch2DMS(texture_name, position, sample_index) \ #define xesl_texelFetch2DMS(texture_name, position, sample_index) \
@ -747,6 +783,8 @@ xesl_float4 xesl_float_x4(float xesl_var_value) {
#define xesl_textureGatherAlpha2D_sep(texture_name, sampler_name, position) \ #define xesl_textureGatherAlpha2D_sep(texture_name, sampler_name, position) \
((texture_name).gather(sampler_name, position, xesl_int2(0), \ ((texture_name).gather(sampler_name, position, xesl_int2(0), \
component::w)) component::w))
#define xesl_imageStore2DRGBA(name, position, data) \
((name).write(data, xesl_uint2(position)))
#else #else
#error Buffers and textures not defined for the target language. #error Buffers and textures not defined for the target language.
#endif // XESL_LANGUAGE #endif // XESL_LANGUAGE