Merge branch 'master' of https://github.com/xenia-project/xenia into canary_experimental
This commit is contained in:
commit
e6898fda66
|
@ -1239,7 +1239,7 @@ bool D3D12CommandProcessor::SetupContext() {
|
|||
apply_gamma_root_descriptor_range_source.RangeType =
|
||||
D3D12_DESCRIPTOR_RANGE_TYPE_SRV;
|
||||
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.OffsetInDescriptorsFromTableStart =
|
||||
0;
|
||||
|
@ -1258,7 +1258,7 @@ bool D3D12CommandProcessor::SetupContext() {
|
|||
apply_gamma_root_descriptor_range_ramp.RangeType =
|
||||
D3D12_DESCRIPTOR_RANGE_TYPE_SRV;
|
||||
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.OffsetInDescriptorsFromTableStart = 0;
|
||||
{
|
||||
|
@ -1968,7 +1968,7 @@ void D3D12CommandProcessor::IssueSwap(uint32_t frontbuffer_ptr,
|
|||
}
|
||||
SetExternalPipeline(apply_gamma_pipeline);
|
||||
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;
|
||||
deferred_command_list_.D3DDispatch(group_count_x, group_count_y, 1);
|
||||
|
||||
|
@ -2189,7 +2189,9 @@ bool D3D12CommandProcessor::IssueDraw(xenos::PrimitiveType primitive_type,
|
|||
return false;
|
||||
}
|
||||
|
||||
// Translate the shaders and create the pipeline if needed.
|
||||
// Create the pipeline (for this, need the actually used render target formats
|
||||
// from the render target cache), translating the shaders - doing this now to
|
||||
// obtain the used textures.
|
||||
D3D12Shader::D3D12Translation* vertex_shader_translation =
|
||||
static_cast<D3D12Shader::D3D12Translation*>(
|
||||
vertex_shader->GetOrCreateTranslation(
|
||||
|
@ -3479,7 +3481,7 @@ void D3D12CommandProcessor::UpdateSystemConstantValues(
|
|||
edram_32bpp_tile_pitch_dwords_scaled;
|
||||
}
|
||||
|
||||
// Color exponent bias and output index mapping or ROV render target writing.
|
||||
// Color exponent bias and ROV render target writing.
|
||||
for (uint32_t i = 0; i < 4; ++i) {
|
||||
reg::RB_COLOR_INFO color_info = color_infos[i];
|
||||
// Exponent bias is in bits 20:25 of RB_COLOR_INFO.
|
||||
|
|
|
@ -78,7 +78,7 @@ namespace d3d12 {
|
|||
// Generated with `xb buildshaders`.
|
||||
namespace shaders {
|
||||
#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_2xmsaa_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 = {};
|
||||
uint32_rtv_clear_pipeline_desc.pRootSignature =
|
||||
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 =
|
||||
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.BytecodeLength =
|
||||
sizeof(shaders::clear_uint2_ps);
|
||||
|
|
|
@ -971,9 +971,9 @@ D3D12TextureCache::SamplerParameters D3D12TextureCache::GetSamplerParameters(
|
|||
parameters.border_color = fetch.border_color;
|
||||
|
||||
uint32_t mip_min_level;
|
||||
texture_util::GetSubresourcesFromFetchConstant(
|
||||
fetch, nullptr, nullptr, nullptr, nullptr, nullptr, &mip_min_level,
|
||||
nullptr, binding.mip_filter);
|
||||
texture_util::GetSubresourcesFromFetchConstant(fetch, nullptr, nullptr,
|
||||
nullptr, nullptr, nullptr,
|
||||
&mip_min_level, nullptr);
|
||||
parameters.mip_min_level = mip_min_level;
|
||||
|
||||
xenos::AnisoFilter aniso_filter =
|
||||
|
@ -982,6 +982,10 @@ D3D12TextureCache::SamplerParameters D3D12TextureCache::GetSamplerParameters(
|
|||
: binding.aniso_filter;
|
||||
aniso_filter = std::min(aniso_filter, xenos::AnisoFilter::kMax_16_1);
|
||||
parameters.aniso_filter = aniso_filter;
|
||||
xenos::TextureFilter mip_filter =
|
||||
binding.mip_filter == xenos::TextureFilter::kUseFetchConst
|
||||
? fetch.mip_filter
|
||||
: binding.mip_filter;
|
||||
if (aniso_filter != xenos::AnisoFilter::kDisabled) {
|
||||
parameters.mag_linear = 1;
|
||||
parameters.min_linear = 1;
|
||||
|
@ -997,12 +1001,9 @@ D3D12TextureCache::SamplerParameters D3D12TextureCache::GetSamplerParameters(
|
|||
? fetch.min_filter
|
||||
: binding.min_filter;
|
||||
parameters.min_linear = min_filter == xenos::TextureFilter::kLinear;
|
||||
xenos::TextureFilter mip_filter =
|
||||
binding.mip_filter == xenos::TextureFilter::kUseFetchConst
|
||||
? fetch.mip_filter
|
||||
: binding.mip_filter;
|
||||
parameters.mip_linear = mip_filter == xenos::TextureFilter::kLinear;
|
||||
}
|
||||
parameters.mip_base_map = mip_filter == xenos::TextureFilter::kBaseMap;
|
||||
|
||||
return parameters;
|
||||
}
|
||||
|
@ -1046,24 +1047,57 @@ void D3D12TextureCache::WriteSampler(SamplerParameters parameters,
|
|||
desc.AddressU = kAddressModeMap[uint32_t(parameters.clamp_x)];
|
||||
desc.AddressV = kAddressModeMap[uint32_t(parameters.clamp_y)];
|
||||
desc.AddressW = kAddressModeMap[uint32_t(parameters.clamp_z)];
|
||||
// LOD is calculated in shaders.
|
||||
// LOD biasing is performed in shaders.
|
||||
desc.MipLODBias = 0.0f;
|
||||
desc.ComparisonFunc = D3D12_COMPARISON_FUNC_NEVER;
|
||||
// TODO(Triang3l): Border colors k_ACBYCR_BLACK and k_ACBCRY_BLACK.
|
||||
if (parameters.border_color == xenos::BorderColor::k_AGBR_White) {
|
||||
desc.BorderColor[0] = 1.0f;
|
||||
desc.BorderColor[1] = 1.0f;
|
||||
desc.BorderColor[2] = 1.0f;
|
||||
desc.BorderColor[3] = 1.0f;
|
||||
} else {
|
||||
desc.BorderColor[0] = 0.0f;
|
||||
desc.BorderColor[1] = 0.0f;
|
||||
desc.BorderColor[2] = 0.0f;
|
||||
desc.BorderColor[3] = 0.0f;
|
||||
switch (parameters.border_color) {
|
||||
case xenos::BorderColor::k_ABGR_White:
|
||||
desc.BorderColor[0] = 1.0f;
|
||||
desc.BorderColor[1] = 1.0f;
|
||||
desc.BorderColor[2] = 1.0f;
|
||||
desc.BorderColor[3] = 1.0f;
|
||||
break;
|
||||
case xenos::BorderColor::k_ACBYCR_Black:
|
||||
desc.BorderColor[0] = 0.5f;
|
||||
desc.BorderColor[1] = 0.0f;
|
||||
desc.BorderColor[2] = 0.5f;
|
||||
desc.BorderColor[3] = 0.0f;
|
||||
break;
|
||||
case xenos::BorderColor::k_ACBCRY_Black:
|
||||
desc.BorderColor[0] = 0.0f;
|
||||
desc.BorderColor[1] = 0.5f;
|
||||
desc.BorderColor[2] = 0.5f;
|
||||
desc.BorderColor[3] = 0.0f;
|
||||
break;
|
||||
default:
|
||||
assert_true(parameters.border_color == xenos::BorderColor::k_ABGR_Black);
|
||||
desc.BorderColor[0] = 0.0f;
|
||||
desc.BorderColor[1] = 0.0f;
|
||||
desc.BorderColor[2] = 0.0f;
|
||||
desc.BorderColor[3] = 0.0f;
|
||||
break;
|
||||
}
|
||||
desc.MinLOD = float(parameters.mip_min_level);
|
||||
// Maximum mip level is in the texture resource itself.
|
||||
desc.MaxLOD = FLT_MAX;
|
||||
if (parameters.mip_base_map) {
|
||||
// "It is undefined whether LOD clamping based on MinLOD and MaxLOD Sampler
|
||||
// states should happen before or after deciding if magnification is
|
||||
// occuring" - Direct3D 11.3 Functional Specification.
|
||||
// Using the GL_NEAREST / GL_LINEAR minification filter emulation logic
|
||||
// described in the Vulkan VkSamplerCreateInfo specification, preserving
|
||||
// magnification vs. minification - point mip sampling (usable only without
|
||||
// anisotropic filtering on Direct3D 12) and MaxLOD 0.25. With anisotropic
|
||||
// filtering, magnification vs. minification doesn't matter as the filter is
|
||||
// always linear for both on Direct3D 12 - but linear filtering specifically
|
||||
// is what must not be done for kBaseMap, so setting MaxLOD to MinLOD.
|
||||
desc.MaxLOD = desc.MinLOD;
|
||||
if (parameters.aniso_filter == xenos::AnisoFilter::kDisabled) {
|
||||
assert_false(parameters.mip_linear);
|
||||
desc.MaxLOD += 0.25f;
|
||||
}
|
||||
} else {
|
||||
// Maximum mip level is in the texture resource itself.
|
||||
desc.MaxLOD = FLT_MAX;
|
||||
}
|
||||
ID3D12Device* device = command_processor_.GetD3D12Provider().GetDevice();
|
||||
device->CreateSampler(&desc, handle);
|
||||
}
|
||||
|
|
|
@ -58,7 +58,9 @@ class D3D12TextureCache final : public TextureCache {
|
|||
uint32_t mip_linear : 1; // 14
|
||||
xenos::AnisoFilter aniso_filter : 3; // 17
|
||||
uint32_t mip_min_level : 4; // 21
|
||||
// Maximum mip level is in the texture resource itself.
|
||||
uint32_t mip_base_map : 1; // 22
|
||||
// Maximum mip level is in the texture resource itself, but mip_base_map
|
||||
// can be used to limit fetching to mip_min_level.
|
||||
};
|
||||
|
||||
SamplerParameters() : value(0) { static_assert_size(*this, sizeof(value)); }
|
||||
|
@ -150,9 +152,9 @@ class D3D12TextureCache final : public TextureCache {
|
|||
}
|
||||
|
||||
// Returns the ID3D12Resource of the front buffer texture (in
|
||||
// PIXEL_SHADER_RESOURCE state), or nullptr in case of failure, and writes the
|
||||
// description of its SRV. May call LoadTextureData, so the same restrictions
|
||||
// (such as about descriptor heap change possibility) apply.
|
||||
// NON_PIXEL_SHADER_RESOURCE state), or nullptr in case of failure, and writes
|
||||
// the description of its SRV. May call LoadTextureData, so the same
|
||||
// restrictions (such as about descriptor heap change possibility) apply.
|
||||
ID3D12Resource* RequestSwapTexture(
|
||||
D3D12_SHADER_RESOURCE_VIEW_DESC& srv_desc_out,
|
||||
xenos::TextureFormat& format_out);
|
||||
|
|
|
@ -112,7 +112,8 @@ uint32_t DrawExtentEstimator::EstimateVertexMaxY(const Shader& vertex_shader) {
|
|||
xenos::IndexFormat index_format = vgt_draw_initiator.index_size;
|
||||
uint32_t index_buffer_base = regs[XE_GPU_REG_VGT_DMA_BASE].u32;
|
||||
uint32_t index_buffer_read_count =
|
||||
std::min(vgt_draw_initiator.num_indices, vgt_dma_size.num_words);
|
||||
std::min(uint32_t(vgt_draw_initiator.num_indices),
|
||||
uint32_t(vgt_dma_size.num_words));
|
||||
if (vgt_draw_initiator.index_size == xenos::IndexFormat::kInt16) {
|
||||
// Handle the index endianness to same way as the PrimitiveProcessor.
|
||||
if (index_endian == xenos::Endian::k8in32) {
|
||||
|
@ -281,7 +282,8 @@ uint32_t DrawExtentEstimator::EstimateMaxY(bool try_to_estimate_vertex_max_y,
|
|||
scissor_bottom += window_y_offset;
|
||||
}
|
||||
auto pa_sc_screen_scissor_br = regs.Get<reg::PA_SC_SCREEN_SCISSOR_BR>();
|
||||
scissor_bottom = std::min(scissor_bottom, pa_sc_screen_scissor_br.br_y);
|
||||
scissor_bottom =
|
||||
std::min(scissor_bottom, int32_t(pa_sc_screen_scissor_br.br_y));
|
||||
uint32_t max_y = uint32_t(std::max(scissor_bottom, int32_t(0)));
|
||||
|
||||
if (regs.Get<reg::PA_CL_CLIP_CNTL>().clip_disable) {
|
||||
|
@ -302,7 +304,8 @@ uint32_t DrawExtentEstimator::EstimateMaxY(bool try_to_estimate_vertex_max_y,
|
|||
if (scissor_window_offset) {
|
||||
scissor_right += pa_sc_window_offset.window_x_offset;
|
||||
}
|
||||
scissor_right = std::min(scissor_right, pa_sc_screen_scissor_br.br_x);
|
||||
scissor_right =
|
||||
std::min(scissor_right, int32_t(pa_sc_screen_scissor_br.br_x));
|
||||
if (scissor_right >= xenos::kTexture2DCubeMaxWidthHeight) {
|
||||
estimate_vertex_max_y = true;
|
||||
}
|
||||
|
|
|
@ -576,11 +576,11 @@ void GetScissor(const RegisterFile& regs, Scissor& scissor_out,
|
|||
// Screen scissor is not used by Direct3D 9 (always 0, 0 to 8192, 8192), but
|
||||
// still handled here for completeness.
|
||||
auto pa_sc_screen_scissor_tl = regs.Get<reg::PA_SC_SCREEN_SCISSOR_TL>();
|
||||
tl_x = std::max(tl_x, pa_sc_screen_scissor_tl.tl_x);
|
||||
tl_y = std::max(tl_y, pa_sc_screen_scissor_tl.tl_y);
|
||||
tl_x = std::max(tl_x, int32_t(pa_sc_screen_scissor_tl.tl_x));
|
||||
tl_y = std::max(tl_y, int32_t(pa_sc_screen_scissor_tl.tl_y));
|
||||
auto pa_sc_screen_scissor_br = regs.Get<reg::PA_SC_SCREEN_SCISSOR_BR>();
|
||||
br_x = std::min(br_x, pa_sc_screen_scissor_br.br_x);
|
||||
br_y = std::min(br_y, pa_sc_screen_scissor_br.br_y);
|
||||
br_x = std::min(br_x, int32_t(pa_sc_screen_scissor_br.br_x));
|
||||
br_y = std::min(br_y, int32_t(pa_sc_screen_scissor_br.br_y));
|
||||
if (clamp_to_surface_pitch) {
|
||||
// Clamp the horizontal scissor to surface_pitch for safety, in case that's
|
||||
// not done by the guest for some reason (it's not when doing draws without
|
||||
|
|
|
@ -3236,7 +3236,8 @@ void DxbcShaderTranslator::WriteOutputSignature() {
|
|||
|
||||
// Coverage output for alpha to mask (SV_Coverage).
|
||||
size_t coverage_position = SIZE_MAX;
|
||||
if (color_targets_written & 0b1) {
|
||||
if ((color_targets_written & 0b1) &&
|
||||
!IsForceEarlyDepthStencilGlobalFlagEnabled()) {
|
||||
coverage_position = shader_object_.size();
|
||||
shader_object_.resize(shader_object_.size() + kParameterDwords);
|
||||
++parameter_count;
|
||||
|
@ -3364,14 +3365,11 @@ void DxbcShaderTranslator::WriteShaderCode() {
|
|||
|
||||
// Don't allow refactoring when converting to native code to maintain position
|
||||
// invariance (needed even in pixel shaders for oDepth invariance).
|
||||
uint32_t global_flags = 0;
|
||||
if (is_pixel_shader() &&
|
||||
GetDxbcShaderModification().pixel.depth_stencil_mode ==
|
||||
Modification::DepthStencilMode::kEarlyHint &&
|
||||
!edram_rov_used_ && current_shader().implicit_early_z_write_allowed()) {
|
||||
global_flags |= dxbc::kGlobalFlagForceEarlyDepthStencil;
|
||||
}
|
||||
ao_.OpDclGlobalFlags(global_flags);
|
||||
bool global_flag_force_early_depth_stencil =
|
||||
IsForceEarlyDepthStencilGlobalFlagEnabled();
|
||||
ao_.OpDclGlobalFlags(global_flag_force_early_depth_stencil
|
||||
? dxbc::kGlobalFlagForceEarlyDepthStencil
|
||||
: 0);
|
||||
|
||||
// Constant buffers, from most frequenly accessed to least frequently accessed
|
||||
// (the order is a hint to the driver according to the DXBC header).
|
||||
|
@ -3655,7 +3653,8 @@ void DxbcShaderTranslator::WriteShaderCode() {
|
|||
}
|
||||
}
|
||||
// Coverage output for alpha to mask.
|
||||
if (color_targets_written & 0b1) {
|
||||
if ((color_targets_written & 0b1) &&
|
||||
!global_flag_force_early_depth_stencil) {
|
||||
ao_.OpDclOutput(dxbc::Dest::OMask());
|
||||
}
|
||||
// Depth output.
|
||||
|
|
|
@ -656,6 +656,14 @@ class DxbcShaderTranslator : public ShaderTranslator {
|
|||
GetDxbcShaderModification().vertex.host_vertex_shader_type);
|
||||
}
|
||||
|
||||
bool IsForceEarlyDepthStencilGlobalFlagEnabled() const {
|
||||
return is_pixel_shader() &&
|
||||
GetDxbcShaderModification().pixel.depth_stencil_mode ==
|
||||
Modification::DepthStencilMode::kEarlyHint &&
|
||||
!edram_rov_used_ &&
|
||||
current_shader().implicit_early_z_write_allowed();
|
||||
}
|
||||
|
||||
// Whether to use switch-case rather than if (pc >= label) for control flow.
|
||||
bool UseSwitchForControlFlow() const;
|
||||
|
||||
|
|
|
@ -1979,7 +1979,8 @@ void DxbcShaderTranslator::CompletePixelShader_AlphaToMaskSample(
|
|||
|
||||
void DxbcShaderTranslator::CompletePixelShader_AlphaToMask() {
|
||||
// Check if alpha to coverage can be done at all in this shader.
|
||||
if (!current_shader().writes_color_target(0)) {
|
||||
if (!current_shader().writes_color_target(0) ||
|
||||
IsForceEarlyDepthStencilGlobalFlagEnabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2987,7 +2988,8 @@ void DxbcShaderTranslator::CompletePixelShader() {
|
|||
return;
|
||||
}
|
||||
|
||||
if (current_shader().writes_color_target(0)) {
|
||||
if (current_shader().writes_color_target(0) &&
|
||||
!IsForceEarlyDepthStencilGlobalFlagEnabled()) {
|
||||
// Alpha test.
|
||||
// X - mask, then masked result (SGPR for loading, VGPR for masking).
|
||||
// Y - operation result (SGPR for mask operations, VGPR for alpha
|
||||
|
|
|
@ -498,7 +498,7 @@ bool RenderTargetCache::Update(bool is_rasterization_done,
|
|||
// std::min for safety, to avoid negative numbers in case it's completely
|
||||
// wrong.
|
||||
edram_bases[0] =
|
||||
std::min(rb_depth_info.depth_base, xenos::kEdramTileCount);
|
||||
std::min(uint32_t(rb_depth_info.depth_base), xenos::kEdramTileCount);
|
||||
// With pixel shader interlock, always the same addressing disregarding
|
||||
// the format.
|
||||
resource_formats[0] =
|
||||
|
@ -513,7 +513,7 @@ bool RenderTargetCache::Update(bool is_rasterization_done,
|
|||
uint32_t rt_bit_index = 1 + i;
|
||||
depth_and_color_rts_used_bits |= uint32_t(1) << rt_bit_index;
|
||||
edram_bases[rt_bit_index] =
|
||||
std::min(color_info.color_base, xenos::kEdramTileCount);
|
||||
std::min(uint32_t(color_info.color_base), xenos::kEdramTileCount);
|
||||
xenos::ColorRenderTargetFormat color_format =
|
||||
regs.Get<reg::RB_COLOR_INFO>(
|
||||
reg::RB_COLOR_INFO::rt_register_indices[i])
|
||||
|
@ -1054,22 +1054,22 @@ bool RenderTargetCache::PrepareHostRenderTargetsResolveClear(
|
|||
uint32_t base_offset_rows_at_32bpp =
|
||||
base_offset_tiles_at_32bpp / pitch_tiles_at_32bpp;
|
||||
Transfer::Rectangle clear_rectangle;
|
||||
clear_rectangle.x_pixels =
|
||||
std::min((base_offset_tiles_at_32bpp -
|
||||
base_offset_rows_at_32bpp * pitch_tiles_at_32bpp) *
|
||||
(xenos::kEdramTileWidthSamples >> msaa_samples_x_log2) +
|
||||
(resolve_info.coordinate_info.edram_offset_x_div_8 << 3),
|
||||
pitch_pixels);
|
||||
clear_rectangle.y_pixels =
|
||||
std::min(base_offset_rows_at_32bpp *
|
||||
(xenos::kEdramTileHeightSamples >> msaa_samples_y_log2) +
|
||||
(resolve_info.coordinate_info.edram_offset_y_div_8 << 3),
|
||||
render_target_height_pixels);
|
||||
clear_rectangle.x_pixels = std::min(
|
||||
(base_offset_tiles_at_32bpp -
|
||||
base_offset_rows_at_32bpp * pitch_tiles_at_32bpp) *
|
||||
(xenos::kEdramTileWidthSamples >> msaa_samples_x_log2) +
|
||||
(uint32_t(resolve_info.coordinate_info.edram_offset_x_div_8) << 3),
|
||||
pitch_pixels);
|
||||
clear_rectangle.y_pixels = std::min(
|
||||
base_offset_rows_at_32bpp *
|
||||
(xenos::kEdramTileHeightSamples >> msaa_samples_y_log2) +
|
||||
(uint32_t(resolve_info.coordinate_info.edram_offset_y_div_8) << 3),
|
||||
render_target_height_pixels);
|
||||
clear_rectangle.width_pixels =
|
||||
std::min(resolve_info.coordinate_info.width_div_8 << 3,
|
||||
std::min(uint32_t(resolve_info.coordinate_info.width_div_8) << 3,
|
||||
pitch_pixels - clear_rectangle.x_pixels);
|
||||
clear_rectangle.height_pixels =
|
||||
std::min(resolve_info.coordinate_info.height_div_8 << 3,
|
||||
std::min(uint32_t(resolve_info.coordinate_info.height_div_8) << 3,
|
||||
render_target_height_pixels - clear_rectangle.y_pixels);
|
||||
if (!clear_rectangle.width_pixels || !clear_rectangle.height_pixels) {
|
||||
// Outside the pitch / height (or initially specified as 0).
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include "xenia/gpu/dxbc_shader_translator.h"
|
||||
#include "xenia/gpu/shader_translator.h"
|
||||
#include "xenia/gpu/spirv_shader_translator.h"
|
||||
#include "xenia/gpu/xenos.h"
|
||||
#include "xenia/ui/spirv/spirv_disassembler.h"
|
||||
|
||||
// For D3DDisassemble:
|
||||
|
@ -164,10 +165,11 @@ int shader_compiler_main(const std::vector<std::string>& args) {
|
|||
switch (shader_type) {
|
||||
case xenos::ShaderType::kVertex:
|
||||
modification = translator->GetDefaultVertexShaderModification(
|
||||
64, host_vertex_shader_type);
|
||||
xenos::kMaxShaderTempRegisters, host_vertex_shader_type);
|
||||
break;
|
||||
case xenos::ShaderType::kPixel:
|
||||
modification = translator->GetDefaultPixelShaderModification(64);
|
||||
modification = translator->GetDefaultPixelShaderModification(
|
||||
xenos::kMaxShaderTempRegisters);
|
||||
break;
|
||||
default:
|
||||
assert_unhandled_case(shader_type);
|
||||
|
|
|
@ -110,14 +110,15 @@ class ShaderInterpreter {
|
|||
return *reinterpret_cast<const float*>(&bits);
|
||||
}
|
||||
|
||||
const float* GetTempRegister(uint32_t address, bool is_relative) const {
|
||||
return temp_registers_[(
|
||||
int32_t(address) + (is_relative ? state_.GetLoopAddress() : 0) & 63)];
|
||||
uint32_t GetTempRegisterIndex(uint32_t address, bool is_relative) const {
|
||||
return (int32_t(address) + (is_relative ? state_.GetLoopAddress() : 0)) &
|
||||
((UINT32_C(1) << xenos::kMaxShaderTempRegistersLog2) - 1);
|
||||
}
|
||||
const float* GetTempRegister(uint32_t address, bool is_relative) const {
|
||||
return temp_registers_[GetTempRegisterIndex(address, is_relative)];
|
||||
}
|
||||
// For simplicity (due to writability), not bounds-checking.
|
||||
float* GetTempRegister(uint32_t address, bool is_relative) {
|
||||
return temp_registers_[(
|
||||
int32_t(address) + (is_relative ? state_.GetLoopAddress() : 0) & 63)];
|
||||
return temp_registers_[GetTempRegisterIndex(address, is_relative)];
|
||||
}
|
||||
const float* GetFloatConstant(uint32_t address, bool is_relative,
|
||||
bool relative_address_is_a0) const;
|
||||
|
@ -138,7 +139,7 @@ class ShaderInterpreter {
|
|||
const uint32_t* ucode_ = nullptr;
|
||||
|
||||
// For both inputs and locals.
|
||||
float temp_registers_[64][4];
|
||||
float temp_registers_[xenos::kMaxShaderTempRegisters][4];
|
||||
|
||||
State state_;
|
||||
};
|
||||
|
|
|
@ -55,7 +55,9 @@ class ShaderTranslator {
|
|||
|
||||
// Register count from SQ_PROGRAM_CNTL, stored by the implementation in its
|
||||
// modification bits.
|
||||
virtual uint32_t GetModificationRegisterCount() const { return 64; }
|
||||
virtual uint32_t GetModificationRegisterCount() const {
|
||||
return xenos::kMaxShaderTempRegisters;
|
||||
}
|
||||
|
||||
// True if the current shader is a vertex shader.
|
||||
bool is_vertex_shader() const {
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
float XeApplyGammaGetAlpha(float3 color) { return 1.0f; }
|
||||
#include "apply_gamma_pwl.hlsli"
|
|
@ -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"
|
|
@ -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));
|
||||
}
|
|
@ -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"
|
|
@ -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
|
|
@ -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"
|
|
@ -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"
|
|
@ -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"
|
|
@ -1,2 +0,0 @@
|
|||
float XeApplyGammaGetAlpha(float3 color) { return 1.0f; }
|
||||
#include "apply_gamma_table.hlsli"
|
|
@ -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"
|
|
@ -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));
|
||||
}
|
|
@ -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"
|
|
@ -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
|
|
@ -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"
|
|
@ -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"
|
|
@ -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"
|
|
@ -5,7 +5,7 @@
|
|||
//
|
||||
// Buffer Definitions:
|
||||
//
|
||||
// cbuffer XeApplyGammaRampConstants
|
||||
// cbuffer xesl_pushConstants
|
||||
// {
|
||||
//
|
||||
// uint2 xe_apply_gamma_size; // Offset: 0 Size: 8
|
||||
|
@ -17,10 +17,10 @@
|
|||
//
|
||||
// Name Type Format Dim ID HLSL Bind Count
|
||||
// ------------------------------ ---------- ------- ----------- ------- -------------- ------
|
||||
// xe_apply_gamma_source texture float3 2d T0 t0 1
|
||||
// xe_apply_gamma_ramp texture uint2 buf T1 t1 1
|
||||
// xe_apply_gamma_ramp texture uint4 buf T0 t0 1
|
||||
// xe_apply_gamma_source texture float4 2d T1 t1 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
|
||||
dcl_globalFlags refactoringAllowed
|
||||
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) T1[1:1], space=0
|
||||
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_uav_typed_texture2d (unorm,unorm,unorm,unorm) U0[0:0], space=0
|
||||
dcl_input vThreadID.xy
|
||||
dcl_temps 3
|
||||
dcl_thread_group 8, 8, 1
|
||||
dcl_thread_group 16, 8, 1
|
||||
uge r0.xy, vThreadID.xyxx, CB0[0][0].xyxx
|
||||
or r0.x, r0.y, r0.x
|
||||
if_nz r0.x
|
||||
|
@ -51,12 +51,12 @@ if_nz r0.x
|
|||
endif
|
||||
mov r0.xy, vThreadID.xyxx
|
||||
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)
|
||||
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, T1[1].xzwy
|
||||
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
|
||||
|
@ -65,14 +65,14 @@ 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, T1[1].xyzw
|
||||
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, T1[1].xyzw
|
||||
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
|
||||
|
@ -86,38 +86,38 @@ ret
|
|||
|
||||
const BYTE apply_gamma_pwl_cs[] =
|
||||
{
|
||||
68, 88, 66, 67, 134, 193,
|
||||
189, 188, 150, 246, 151, 78,
|
||||
29, 10, 33, 117, 212, 145,
|
||||
204, 130, 1, 0, 0, 0,
|
||||
128, 7, 0, 0, 5, 0,
|
||||
68, 88, 66, 67, 224, 86,
|
||||
115, 97, 130, 102, 85, 194,
|
||||
154, 33, 68, 74, 161, 205,
|
||||
242, 94, 1, 0, 0, 0,
|
||||
124, 7, 0, 0, 5, 0,
|
||||
0, 0, 52, 0, 0, 0,
|
||||
24, 2, 0, 0, 40, 2,
|
||||
0, 0, 56, 2, 0, 0,
|
||||
228, 6, 0, 0, 82, 68,
|
||||
69, 70, 220, 1, 0, 0,
|
||||
1, 0, 0, 0, 52, 1,
|
||||
20, 2, 0, 0, 36, 2,
|
||||
0, 0, 52, 2, 0, 0,
|
||||
224, 6, 0, 0, 82, 68,
|
||||
69, 70, 216, 1, 0, 0,
|
||||
1, 0, 0, 0, 48, 1,
|
||||
0, 0, 4, 0, 0, 0,
|
||||
60, 0, 0, 0, 1, 5,
|
||||
83, 67, 0, 5, 0, 0,
|
||||
180, 1, 0, 0, 19, 19,
|
||||
176, 1, 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,
|
||||
220, 0, 0, 0, 2, 0,
|
||||
0, 0, 5, 0, 0, 0,
|
||||
4, 0, 0, 0, 255, 255,
|
||||
0, 0, 4, 0, 0, 0,
|
||||
1, 0, 0, 0, 255, 255,
|
||||
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, 242, 0,
|
||||
0, 0, 0, 0, 240, 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,
|
||||
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, 6, 1, 0, 0,
|
||||
4, 0, 0, 0, 1, 0,
|
||||
|
@ -135,226 +135,196 @@ const BYTE apply_gamma_pwl_cs[] =
|
|||
0, 0, 0, 0, 120, 101,
|
||||
95, 97, 112, 112, 108, 121,
|
||||
95, 103, 97, 109, 109, 97,
|
||||
95, 115, 111, 117, 114, 99,
|
||||
101, 0, 120, 101, 95, 97,
|
||||
112, 112, 108, 121, 95, 103,
|
||||
97, 109, 109, 97, 95, 114,
|
||||
97, 109, 112, 0, 120, 101,
|
||||
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, 120, 101,
|
||||
95, 97, 112, 112, 108, 121,
|
||||
95, 103, 97, 109, 109, 97,
|
||||
95, 100, 101, 115, 116, 0,
|
||||
88, 101, 65, 112, 112, 108,
|
||||
121, 71, 97, 109, 109, 97,
|
||||
82, 97, 109, 112, 67, 111,
|
||||
110, 115, 116, 97, 110, 116,
|
||||
115, 0, 26, 1, 0, 0,
|
||||
1, 0, 0, 0, 76, 1,
|
||||
0, 0, 16, 0, 0, 0,
|
||||
120, 101, 115, 108, 95, 112,
|
||||
117, 115, 104, 67, 111, 110,
|
||||
115, 116, 97, 110, 116, 115,
|
||||
0, 171, 171, 171, 26, 1,
|
||||
0, 0, 1, 0, 0, 0,
|
||||
72, 1, 0, 0, 16, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 116, 1, 0, 0,
|
||||
0, 0, 0, 0, 8, 0,
|
||||
0, 0, 2, 0, 0, 0,
|
||||
144, 1, 0, 0, 0, 0,
|
||||
0, 0, 255, 255, 255, 255,
|
||||
0, 0, 0, 0, 112, 1,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
8, 0, 0, 0, 2, 0,
|
||||
0, 0, 140, 1, 0, 0,
|
||||
0, 0, 0, 0, 255, 255,
|
||||
255, 255, 0, 0, 0, 0,
|
||||
120, 101, 95, 97, 112, 112,
|
||||
108, 121, 95, 103, 97, 109,
|
||||
109, 97, 95, 115, 105, 122,
|
||||
101, 0, 117, 105, 110, 116,
|
||||
50, 0, 171, 171, 1, 0,
|
||||
19, 0, 1, 0, 2, 0,
|
||||
255, 255, 255, 255, 0, 0,
|
||||
0, 0, 120, 101, 95, 97,
|
||||
112, 112, 108, 121, 95, 103,
|
||||
97, 109, 109, 97, 95, 115,
|
||||
105, 122, 101, 0, 117, 105,
|
||||
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,
|
||||
136, 1, 0, 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, 73, 83, 71, 78,
|
||||
0, 0, 132, 1, 0, 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, 73, 83,
|
||||
71, 78, 8, 0, 0, 0,
|
||||
0, 0, 0, 0, 8, 0,
|
||||
0, 0, 79, 83, 71, 78,
|
||||
8, 0, 0, 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,
|
||||
8, 0, 0, 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,
|
||||
0, 0, 0, 0, 1, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
88, 8, 0, 7, 70, 126,
|
||||
48, 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, 7, 70, 126, 48, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
1, 0, 0, 0, 1, 0,
|
||||
0, 0, 1, 0, 0, 0,
|
||||
85, 85, 0, 0, 0, 0,
|
||||
0, 0, 88, 8, 0, 7,
|
||||
70, 126, 48, 0, 1, 0,
|
||||
0, 0, 1, 0, 0, 0,
|
||||
1, 0, 0, 0, 68, 68,
|
||||
0, 0, 156, 24, 0, 7,
|
||||
70, 238, 49, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
156, 24, 0, 7, 70, 238,
|
||||
49, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 17, 17,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 17, 17, 0, 0,
|
||||
0, 0, 0, 0, 95, 0,
|
||||
0, 2, 50, 0, 2, 0,
|
||||
104, 0, 0, 2, 3, 0,
|
||||
0, 0, 155, 0, 0, 4,
|
||||
8, 0, 0, 0, 8, 0,
|
||||
0, 0, 1, 0, 0, 0,
|
||||
80, 0, 0, 8, 50, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
70, 0, 2, 0, 70, 128,
|
||||
48, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 60, 0, 0, 7,
|
||||
18, 0, 16, 0, 0, 0,
|
||||
0, 0, 26, 0, 16, 0,
|
||||
0, 0, 0, 0, 10, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
31, 0, 4, 3, 10, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
62, 0, 0, 1, 21, 0,
|
||||
0, 1, 54, 0, 0, 4,
|
||||
95, 0, 0, 2, 50, 0,
|
||||
2, 0, 104, 0, 0, 2,
|
||||
3, 0, 0, 0, 155, 0,
|
||||
0, 4, 16, 0, 0, 0,
|
||||
8, 0, 0, 0, 1, 0,
|
||||
0, 0, 80, 0, 0, 8,
|
||||
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,
|
||||
70, 128, 48, 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, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 50, 0,
|
||||
0, 15, 114, 0, 16, 0,
|
||||
0, 0, 0, 0, 70, 2,
|
||||
0, 0, 0, 0, 60, 0,
|
||||
0, 7, 18, 0, 16, 0,
|
||||
0, 0, 0, 0, 26, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
2, 64, 0, 0, 0, 192,
|
||||
127, 68, 0, 192, 127, 68,
|
||||
0, 192, 127, 68, 0, 0,
|
||||
10, 0, 16, 0, 0, 0,
|
||||
0, 0, 31, 0, 4, 3,
|
||||
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, 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,
|
||||
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,
|
||||
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, 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,
|
||||
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,
|
||||
1, 0, 0, 0, 1, 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,
|
||||
18, 0, 16, 0, 0, 0,
|
||||
0, 0, 58, 0, 16, 0,
|
||||
1, 0, 0, 0, 10, 0,
|
||||
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, 0,
|
||||
86, 0, 0, 5, 18, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
10, 0, 16, 0, 0, 0,
|
||||
0, 0, 1, 64, 0, 0,
|
||||
0, 0, 0, 62, 58, 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, 18, 0, 16, 0,
|
||||
2, 0, 0, 0, 10, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
1, 64, 0, 0, 0, 0,
|
||||
128, 63, 35, 0, 0, 15,
|
||||
146, 0, 16, 0, 0, 0,
|
||||
0, 0, 86, 9, 16, 0,
|
||||
1, 0, 0, 0, 2, 64,
|
||||
0, 0, 3, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 3, 0, 0, 0,
|
||||
2, 64, 0, 0, 1, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 2, 0,
|
||||
0, 0, 45, 0, 0, 8,
|
||||
50, 0, 16, 0, 1, 0,
|
||||
0, 0, 6, 0, 16, 0,
|
||||
0, 0, 0, 0, 70, 126,
|
||||
32, 0, 1, 0, 0, 0,
|
||||
1, 0, 0, 0, 86, 0,
|
||||
0, 5, 18, 0, 16, 0,
|
||||
0, 0, 0, 0, 10, 0,
|
||||
16, 0, 1, 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,
|
||||
26, 0, 16, 0, 1, 0,
|
||||
0, 0, 86, 0, 0, 5,
|
||||
34, 0, 16, 0, 0, 0,
|
||||
0, 0, 26, 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,
|
||||
34, 0, 16, 0, 2, 0,
|
||||
0, 0, 50, 0, 0, 9,
|
||||
18, 0, 16, 0, 0, 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,
|
||||
0, 0, 0, 0, 0, 62,
|
||||
58, 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, 18, 0,
|
||||
16, 0, 2, 0, 0, 0,
|
||||
10, 0, 16, 0, 0, 0,
|
||||
0, 0, 1, 64, 0, 0,
|
||||
0, 0, 128, 63, 35, 0,
|
||||
0, 15, 146, 0, 16, 0,
|
||||
0, 0, 0, 0, 86, 9,
|
||||
16, 0, 1, 0, 0, 0,
|
||||
2, 64, 0, 0, 3, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 3, 0,
|
||||
0, 0, 2, 64, 0, 0,
|
||||
1, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
2, 0, 0, 0, 45, 0,
|
||||
0, 8, 50, 0, 16, 0,
|
||||
1, 0, 0, 0, 6, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
246, 15, 16, 0, 0, 0,
|
||||
0, 0, 70, 126, 32, 0,
|
||||
1, 0, 0, 0, 1, 0,
|
||||
70, 126, 32, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
86, 0, 0, 5, 18, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
10, 0, 16, 0, 1, 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,
|
||||
0, 0, 26, 0, 16, 0,
|
||||
1, 0, 0, 0, 86, 0,
|
||||
0, 5, 34, 0, 16, 0,
|
||||
0, 0, 0, 0, 26, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
50, 0, 0, 9, 18, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
|
@ -367,35 +337,64 @@ const BYTE apply_gamma_pwl_cs[] =
|
|||
10, 0, 16, 0, 0, 0,
|
||||
0, 0, 1, 64, 0, 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,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
1, 64, 0, 0, 0, 0,
|
||||
128, 63, 54, 0, 0, 5,
|
||||
130, 0, 16, 0, 2, 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, 164, 0,
|
||||
0, 7, 242, 224, 33, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 70, 5, 2, 0,
|
||||
70, 14, 16, 0, 2, 0,
|
||||
0, 0, 62, 0, 0, 1,
|
||||
83, 84, 65, 84, 148, 0,
|
||||
0, 0, 37, 0, 0, 0,
|
||||
3, 0, 0, 0, 0, 0,
|
||||
0, 0, 1, 0, 0, 0,
|
||||
10, 0, 0, 0, 5, 0,
|
||||
0, 0, 4, 0, 0, 0,
|
||||
2, 0, 0, 0, 1, 0,
|
||||
0, 0, 128, 63, 54, 0,
|
||||
0, 5, 130, 0, 16, 0,
|
||||
2, 0, 0, 0, 1, 64,
|
||||
0, 0, 0, 0, 128, 63,
|
||||
164, 0, 0, 7, 242, 224,
|
||||
33, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 70, 5,
|
||||
2, 0, 70, 14, 16, 0,
|
||||
2, 0, 0, 0, 62, 0,
|
||||
0, 1, 83, 84, 65, 84,
|
||||
148, 0, 0, 0, 37, 0,
|
||||
0, 0, 3, 0, 0, 0,
|
||||
0, 0, 0, 0, 1, 0,
|
||||
0, 0, 10, 0, 0, 0,
|
||||
5, 0, 0, 0, 4, 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, 4, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
3, 0, 0, 0, 0, 0,
|
||||
0, 0, 6, 0, 0, 0,
|
||||
0, 0, 3, 0, 0, 0,
|
||||
0, 0, 0, 0, 6, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
|
@ -405,5 +404,6 @@ const BYTE apply_gamma_pwl_cs[] =
|
|||
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
|
||||
};
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
//
|
||||
// Buffer Definitions:
|
||||
//
|
||||
// cbuffer XeApplyGammaRampConstants
|
||||
// cbuffer xesl_pushConstants
|
||||
// {
|
||||
//
|
||||
// uint2 xe_apply_gamma_size; // Offset: 0 Size: 8
|
||||
|
@ -17,10 +17,10 @@
|
|||
//
|
||||
// Name Type Format Dim ID HLSL Bind Count
|
||||
// ------------------------------ ---------- ------- ----------- ------- -------------- ------
|
||||
// xe_apply_gamma_source texture float3 2d T0 t0 1
|
||||
// xe_apply_gamma_ramp texture uint2 buf T1 t1 1
|
||||
// xe_apply_gamma_dest UAV unorm4 2d U0 u0 1
|
||||
// XeApplyGammaRampConstants cbuffer NA NA CB0 cb0 1
|
||||
// xe_apply_gamma_ramp texture uint4 buf T0 t0 1
|
||||
// xe_apply_gamma_source texture float4 2d T1 t1 1
|
||||
// xe_apply_gamma_dest UAV float4 2d U0 u0 1
|
||||
// xesl_pushConstants cbuffer NA NA CB0 cb0 1
|
||||
//
|
||||
//
|
||||
//
|
||||
|
@ -38,12 +38,12 @@
|
|||
cs_5_1
|
||||
dcl_globalFlags refactoringAllowed
|
||||
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) T1[1:1], space=0
|
||||
dcl_uav_typed_texture2d (unorm,unorm,unorm,unorm) U0[0:0], space=0
|
||||
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_uav_typed_texture2d (float,float,float,float) U0[0:0], space=0
|
||||
dcl_input vThreadID.xy
|
||||
dcl_temps 3
|
||||
dcl_thread_group 8, 8, 1
|
||||
dcl_thread_group 16, 8, 1
|
||||
uge r0.xy, vThreadID.xyxx, CB0[0][0].xyxx
|
||||
or r0.x, r0.y, r0.x
|
||||
if_nz r0.x
|
||||
|
@ -51,12 +51,12 @@ if_nz r0.x
|
|||
endif
|
||||
mov r0.xy, vThreadID.xyxx
|
||||
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)
|
||||
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, T1[1].xzwy
|
||||
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
|
||||
|
@ -65,14 +65,14 @@ 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, T1[1].xyzw
|
||||
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, T1[1].xyzw
|
||||
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
|
||||
|
@ -86,41 +86,41 @@ ret
|
|||
|
||||
const BYTE apply_gamma_pwl_fxaa_luma_cs[] =
|
||||
{
|
||||
68, 88, 66, 67, 115, 68,
|
||||
69, 234, 116, 212, 118, 193,
|
||||
71, 10, 44, 165, 244, 209,
|
||||
63, 198, 1, 0, 0, 0,
|
||||
148, 7, 0, 0, 5, 0,
|
||||
68, 88, 66, 67, 13, 117,
|
||||
49, 45, 162, 194, 216, 203,
|
||||
130, 175, 100, 187, 97, 44,
|
||||
87, 212, 1, 0, 0, 0,
|
||||
144, 7, 0, 0, 5, 0,
|
||||
0, 0, 52, 0, 0, 0,
|
||||
24, 2, 0, 0, 40, 2,
|
||||
0, 0, 56, 2, 0, 0,
|
||||
248, 6, 0, 0, 82, 68,
|
||||
69, 70, 220, 1, 0, 0,
|
||||
1, 0, 0, 0, 52, 1,
|
||||
20, 2, 0, 0, 36, 2,
|
||||
0, 0, 52, 2, 0, 0,
|
||||
244, 6, 0, 0, 82, 68,
|
||||
69, 70, 216, 1, 0, 0,
|
||||
1, 0, 0, 0, 48, 1,
|
||||
0, 0, 4, 0, 0, 0,
|
||||
60, 0, 0, 0, 1, 5,
|
||||
83, 67, 0, 5, 0, 0,
|
||||
180, 1, 0, 0, 19, 19,
|
||||
176, 1, 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,
|
||||
220, 0, 0, 0, 2, 0,
|
||||
0, 0, 5, 0, 0, 0,
|
||||
4, 0, 0, 0, 255, 255,
|
||||
0, 0, 4, 0, 0, 0,
|
||||
1, 0, 0, 0, 255, 255,
|
||||
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, 242, 0,
|
||||
0, 0, 0, 0, 240, 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,
|
||||
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, 6, 1, 0, 0,
|
||||
4, 0, 0, 0, 1, 0,
|
||||
4, 0, 0, 0, 5, 0,
|
||||
0, 0, 4, 0, 0, 0,
|
||||
255, 255, 255, 255, 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,
|
||||
95, 97, 112, 112, 108, 121,
|
||||
95, 103, 97, 109, 109, 97,
|
||||
95, 115, 111, 117, 114, 99,
|
||||
101, 0, 120, 101, 95, 97,
|
||||
112, 112, 108, 121, 95, 103,
|
||||
97, 109, 109, 97, 95, 114,
|
||||
97, 109, 112, 0, 120, 101,
|
||||
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, 120, 101,
|
||||
95, 97, 112, 112, 108, 121,
|
||||
95, 103, 97, 109, 109, 97,
|
||||
95, 100, 101, 115, 116, 0,
|
||||
88, 101, 65, 112, 112, 108,
|
||||
121, 71, 97, 109, 109, 97,
|
||||
82, 97, 109, 112, 67, 111,
|
||||
110, 115, 116, 97, 110, 116,
|
||||
115, 0, 26, 1, 0, 0,
|
||||
1, 0, 0, 0, 76, 1,
|
||||
0, 0, 16, 0, 0, 0,
|
||||
120, 101, 115, 108, 95, 112,
|
||||
117, 115, 104, 67, 111, 110,
|
||||
115, 116, 97, 110, 116, 115,
|
||||
0, 171, 171, 171, 26, 1,
|
||||
0, 0, 1, 0, 0, 0,
|
||||
72, 1, 0, 0, 16, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 116, 1, 0, 0,
|
||||
0, 0, 0, 0, 8, 0,
|
||||
0, 0, 2, 0, 0, 0,
|
||||
144, 1, 0, 0, 0, 0,
|
||||
0, 0, 255, 255, 255, 255,
|
||||
0, 0, 0, 0, 112, 1,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
8, 0, 0, 0, 2, 0,
|
||||
0, 0, 140, 1, 0, 0,
|
||||
0, 0, 0, 0, 255, 255,
|
||||
255, 255, 0, 0, 0, 0,
|
||||
120, 101, 95, 97, 112, 112,
|
||||
108, 121, 95, 103, 97, 109,
|
||||
109, 97, 95, 115, 105, 122,
|
||||
101, 0, 117, 105, 110, 116,
|
||||
50, 0, 171, 171, 1, 0,
|
||||
19, 0, 1, 0, 2, 0,
|
||||
255, 255, 255, 255, 0, 0,
|
||||
0, 0, 120, 101, 95, 97,
|
||||
112, 112, 108, 121, 95, 103,
|
||||
97, 109, 109, 97, 95, 115,
|
||||
105, 122, 101, 0, 117, 105,
|
||||
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,
|
||||
136, 1, 0, 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, 73, 83, 71, 78,
|
||||
0, 0, 132, 1, 0, 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, 73, 83,
|
||||
71, 78, 8, 0, 0, 0,
|
||||
0, 0, 0, 0, 8, 0,
|
||||
0, 0, 79, 83, 71, 78,
|
||||
8, 0, 0, 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,
|
||||
8, 0, 0, 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,
|
||||
0, 0, 0, 0, 1, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
88, 8, 0, 7, 70, 126,
|
||||
48, 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, 7, 70, 126, 48, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
1, 0, 0, 0, 1, 0,
|
||||
0, 0, 1, 0, 0, 0,
|
||||
85, 85, 0, 0, 0, 0,
|
||||
0, 0, 88, 8, 0, 7,
|
||||
70, 126, 48, 0, 1, 0,
|
||||
0, 0, 1, 0, 0, 0,
|
||||
1, 0, 0, 0, 68, 68,
|
||||
0, 0, 156, 24, 0, 7,
|
||||
70, 238, 49, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
156, 24, 0, 7, 70, 238,
|
||||
49, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 85, 85,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 17, 17, 0, 0,
|
||||
0, 0, 0, 0, 95, 0,
|
||||
0, 2, 50, 0, 2, 0,
|
||||
104, 0, 0, 2, 3, 0,
|
||||
0, 0, 155, 0, 0, 4,
|
||||
8, 0, 0, 0, 8, 0,
|
||||
0, 0, 1, 0, 0, 0,
|
||||
80, 0, 0, 8, 50, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
70, 0, 2, 0, 70, 128,
|
||||
48, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 60, 0, 0, 7,
|
||||
18, 0, 16, 0, 0, 0,
|
||||
0, 0, 26, 0, 16, 0,
|
||||
0, 0, 0, 0, 10, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
31, 0, 4, 3, 10, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
62, 0, 0, 1, 21, 0,
|
||||
0, 1, 54, 0, 0, 4,
|
||||
95, 0, 0, 2, 50, 0,
|
||||
2, 0, 104, 0, 0, 2,
|
||||
3, 0, 0, 0, 155, 0,
|
||||
0, 4, 16, 0, 0, 0,
|
||||
8, 0, 0, 0, 1, 0,
|
||||
0, 0, 80, 0, 0, 8,
|
||||
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,
|
||||
70, 128, 48, 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, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 50, 0,
|
||||
0, 15, 114, 0, 16, 0,
|
||||
0, 0, 0, 0, 70, 2,
|
||||
0, 0, 0, 0, 60, 0,
|
||||
0, 7, 18, 0, 16, 0,
|
||||
0, 0, 0, 0, 26, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
2, 64, 0, 0, 0, 192,
|
||||
127, 68, 0, 192, 127, 68,
|
||||
0, 192, 127, 68, 0, 0,
|
||||
10, 0, 16, 0, 0, 0,
|
||||
0, 0, 31, 0, 4, 3,
|
||||
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, 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,
|
||||
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,
|
||||
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, 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,
|
||||
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,
|
||||
1, 0, 0, 0, 1, 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,
|
||||
18, 0, 16, 0, 0, 0,
|
||||
0, 0, 58, 0, 16, 0,
|
||||
1, 0, 0, 0, 10, 0,
|
||||
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, 0,
|
||||
86, 0, 0, 5, 18, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
10, 0, 16, 0, 0, 0,
|
||||
0, 0, 1, 64, 0, 0,
|
||||
0, 0, 0, 62, 58, 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, 18, 0, 16, 0,
|
||||
2, 0, 0, 0, 10, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
1, 64, 0, 0, 0, 0,
|
||||
128, 63, 35, 0, 0, 15,
|
||||
146, 0, 16, 0, 0, 0,
|
||||
0, 0, 86, 9, 16, 0,
|
||||
1, 0, 0, 0, 2, 64,
|
||||
0, 0, 3, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 3, 0, 0, 0,
|
||||
2, 64, 0, 0, 1, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 2, 0,
|
||||
0, 0, 45, 0, 0, 8,
|
||||
50, 0, 16, 0, 1, 0,
|
||||
0, 0, 6, 0, 16, 0,
|
||||
0, 0, 0, 0, 70, 126,
|
||||
32, 0, 1, 0, 0, 0,
|
||||
1, 0, 0, 0, 86, 0,
|
||||
0, 5, 18, 0, 16, 0,
|
||||
0, 0, 0, 0, 10, 0,
|
||||
16, 0, 1, 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,
|
||||
26, 0, 16, 0, 1, 0,
|
||||
0, 0, 86, 0, 0, 5,
|
||||
34, 0, 16, 0, 0, 0,
|
||||
0, 0, 26, 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,
|
||||
34, 0, 16, 0, 2, 0,
|
||||
0, 0, 50, 0, 0, 9,
|
||||
18, 0, 16, 0, 0, 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,
|
||||
0, 0, 0, 0, 0, 62,
|
||||
58, 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, 18, 0,
|
||||
16, 0, 2, 0, 0, 0,
|
||||
10, 0, 16, 0, 0, 0,
|
||||
0, 0, 1, 64, 0, 0,
|
||||
0, 0, 128, 63, 35, 0,
|
||||
0, 15, 146, 0, 16, 0,
|
||||
0, 0, 0, 0, 86, 9,
|
||||
16, 0, 1, 0, 0, 0,
|
||||
2, 64, 0, 0, 3, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 3, 0,
|
||||
0, 0, 2, 64, 0, 0,
|
||||
1, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
2, 0, 0, 0, 45, 0,
|
||||
0, 8, 50, 0, 16, 0,
|
||||
1, 0, 0, 0, 6, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
246, 15, 16, 0, 0, 0,
|
||||
0, 0, 70, 126, 32, 0,
|
||||
1, 0, 0, 0, 1, 0,
|
||||
70, 126, 32, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
86, 0, 0, 5, 18, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
10, 0, 16, 0, 1, 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,
|
||||
0, 0, 26, 0, 16, 0,
|
||||
1, 0, 0, 0, 86, 0,
|
||||
0, 5, 34, 0, 16, 0,
|
||||
0, 0, 0, 0, 26, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
50, 0, 0, 9, 18, 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,
|
||||
0, 0, 1, 64, 0, 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,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
1, 64, 0, 0, 0, 0,
|
||||
128, 63, 16, 0, 0, 10,
|
||||
130, 0, 16, 0, 2, 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,
|
||||
164, 0, 0, 7, 242, 224,
|
||||
33, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 70, 5,
|
||||
2, 0, 70, 14, 16, 0,
|
||||
2, 0, 0, 0, 62, 0,
|
||||
0, 1, 83, 84, 65, 84,
|
||||
148, 0, 0, 0, 37, 0,
|
||||
0, 0, 3, 0, 0, 0,
|
||||
0, 0, 0, 0, 1, 0,
|
||||
0, 0, 11, 0, 0, 0,
|
||||
5, 0, 0, 0, 4, 0,
|
||||
0, 0, 2, 0, 0, 0,
|
||||
1, 0, 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, 0, 16, 0,
|
||||
2, 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, 164, 0, 0, 7,
|
||||
242, 224, 33, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
70, 5, 2, 0, 70, 14,
|
||||
16, 0, 2, 0, 0, 0,
|
||||
62, 0, 0, 1, 83, 84,
|
||||
65, 84, 148, 0, 0, 0,
|
||||
37, 0, 0, 0, 3, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
1, 0, 0, 0, 11, 0,
|
||||
0, 0, 5, 0, 0, 0,
|
||||
4, 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, 4, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
4, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 2, 0, 0, 0,
|
||||
0, 0, 0, 0, 6, 0,
|
||||
0, 0, 0, 0, 2, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
6, 0, 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, 1, 0,
|
||||
0, 0
|
||||
1, 0, 0, 0
|
||||
};
|
||||
|
|
|
@ -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, 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, 0, 16, 0,
|
||||
0, 0, 0, 0, 10, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
1, 64, 0, 0, 0, 0,
|
||||
0, 62, 58, 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,
|
||||
18, 0, 16, 0, 2, 0,
|
||||
0, 0, 10, 0, 16, 0,
|
||||
0, 0, 0, 0, 1, 64,
|
||||
0, 0, 0, 0, 128, 63,
|
||||
35, 0, 0, 15, 146, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
86, 9, 16, 0, 1, 0,
|
||||
0, 0, 2, 64, 0, 0,
|
||||
3, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
3, 0, 0, 0, 2, 64,
|
||||
0, 0, 1, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 2, 0, 0, 0,
|
||||
45, 0, 0, 8, 50, 0,
|
||||
16, 0, 1, 0, 0, 0,
|
||||
6, 0, 16, 0, 0, 0,
|
||||
0, 0, 70, 126, 32, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 86, 0, 0, 5,
|
||||
18, 0, 16, 0, 0, 0,
|
||||
0, 0, 10, 0, 16, 0,
|
||||
1, 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, 26, 0,
|
||||
16, 0, 1, 0, 0, 0,
|
||||
86, 0, 0, 5, 34, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
26, 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, 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
|
||||
};
|
|
@ -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, 0, 16, 0,
|
||||
0, 0, 0, 0, 10, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
1, 64, 0, 0, 0, 0,
|
||||
0, 62, 58, 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,
|
||||
18, 32, 16, 0, 0, 0,
|
||||
0, 0, 10, 0, 16, 0,
|
||||
0, 0, 0, 0, 1, 64,
|
||||
0, 0, 0, 0, 128, 63,
|
||||
35, 0, 0, 15, 146, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
86, 9, 16, 0, 1, 0,
|
||||
0, 0, 2, 64, 0, 0,
|
||||
3, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
3, 0, 0, 0, 2, 64,
|
||||
0, 0, 1, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 2, 0, 0, 0,
|
||||
45, 0, 0, 8, 50, 0,
|
||||
16, 0, 1, 0, 0, 0,
|
||||
6, 0, 16, 0, 0, 0,
|
||||
0, 0, 70, 126, 32, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 86, 0, 0, 5,
|
||||
18, 0, 16, 0, 0, 0,
|
||||
0, 0, 10, 0, 16, 0,
|
||||
1, 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, 26, 0,
|
||||
16, 0, 1, 0, 0, 0,
|
||||
86, 0, 0, 5, 34, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
26, 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, 34, 32,
|
||||
16, 0, 0, 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, 32, 16, 0, 0, 0,
|
||||
0, 0, 10, 0, 16, 0,
|
||||
0, 0, 0, 0, 1, 64,
|
||||
0, 0, 0, 0, 128, 63,
|
||||
54, 0, 0, 5, 130, 32,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
1, 64, 0, 0, 0, 0,
|
||||
128, 63, 62, 0, 0, 1,
|
||||
83, 84, 65, 84, 148, 0,
|
||||
0, 0, 31, 0, 0, 0,
|
||||
2, 0, 0, 0, 0, 0,
|
||||
0, 0, 2, 0, 0, 0,
|
||||
10, 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
|
||||
};
|
|
@ -5,7 +5,7 @@
|
|||
//
|
||||
// Buffer Definitions:
|
||||
//
|
||||
// cbuffer XeApplyGammaRampConstants
|
||||
// cbuffer xesl_pushConstants
|
||||
// {
|
||||
//
|
||||
// uint2 xe_apply_gamma_size; // Offset: 0 Size: 8
|
||||
|
@ -17,10 +17,10 @@
|
|||
//
|
||||
// Name Type Format Dim ID HLSL Bind Count
|
||||
// ------------------------------ ---------- ------- ----------- ------- -------------- ------
|
||||
// xe_apply_gamma_source texture float3 2d T0 t0 1
|
||||
// xe_apply_gamma_ramp texture float3 buf T1 t1 1
|
||||
// xe_apply_gamma_ramp texture float4 buf T0 t0 1
|
||||
// xe_apply_gamma_source texture float4 2d T1 t1 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
|
||||
dcl_globalFlags refactoringAllowed
|
||||
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) T1[1:1], space=0
|
||||
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_uav_typed_texture2d (unorm,unorm,unorm,unorm) U0[0:0], space=0
|
||||
dcl_input vThreadID.xy
|
||||
dcl_temps 2
|
||||
dcl_thread_group 8, 8, 1
|
||||
dcl_thread_group 16, 8, 1
|
||||
uge r0.xy, vThreadID.xyxx, CB0[0][0].xyxx
|
||||
or r0.x, r0.y, r0.x
|
||||
if_nz r0.x
|
||||
|
@ -51,12 +51,12 @@ if_nz r0.x
|
|||
endif
|
||||
mov r0.xy, vThreadID.xyxx
|
||||
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)
|
||||
ftou r0.xyz, r0.xyzx
|
||||
ld r1.x, r0.xxxx, T1[1].zxyw
|
||||
ld r1.y, r0.yyyy, T1[1].xyzw
|
||||
ld r1.z, r0.zzzz, T1[1].yzxw
|
||||
ld r1.x, r0.xxxx, T0[0].zxyw
|
||||
ld r1.y, r0.yyyy, T0[0].xyzw
|
||||
ld r1.z, r0.zzzz, T0[0].yzxw
|
||||
mov r1.w, l(1.000000)
|
||||
store_uav_typed U0[0].xyzw, vThreadID.xyyy, r1.xyzw
|
||||
ret
|
||||
|
@ -65,21 +65,21 @@ ret
|
|||
|
||||
const BYTE apply_gamma_table_cs[] =
|
||||
{
|
||||
68, 88, 66, 67, 20, 63,
|
||||
31, 100, 63, 232, 227, 64,
|
||||
21, 8, 34, 27, 205, 36,
|
||||
202, 71, 1, 0, 0, 0,
|
||||
252, 4, 0, 0, 5, 0,
|
||||
68, 88, 66, 67, 194, 111,
|
||||
19, 70, 56, 133, 74, 123,
|
||||
197, 56, 69, 13, 51, 156,
|
||||
77, 169, 1, 0, 0, 0,
|
||||
248, 4, 0, 0, 5, 0,
|
||||
0, 0, 52, 0, 0, 0,
|
||||
24, 2, 0, 0, 40, 2,
|
||||
0, 0, 56, 2, 0, 0,
|
||||
96, 4, 0, 0, 82, 68,
|
||||
69, 70, 220, 1, 0, 0,
|
||||
1, 0, 0, 0, 52, 1,
|
||||
20, 2, 0, 0, 36, 2,
|
||||
0, 0, 52, 2, 0, 0,
|
||||
92, 4, 0, 0, 82, 68,
|
||||
69, 70, 216, 1, 0, 0,
|
||||
1, 0, 0, 0, 48, 1,
|
||||
0, 0, 4, 0, 0, 0,
|
||||
60, 0, 0, 0, 1, 5,
|
||||
83, 67, 0, 5, 0, 0,
|
||||
180, 1, 0, 0, 19, 19,
|
||||
176, 1, 0, 0, 19, 19,
|
||||
68, 37, 60, 0, 0, 0,
|
||||
24, 0, 0, 0, 40, 0,
|
||||
0, 0, 40, 0, 0, 0,
|
||||
|
@ -87,16 +87,16 @@ const BYTE apply_gamma_table_cs[] =
|
|||
0, 0, 0, 0, 0, 0,
|
||||
220, 0, 0, 0, 2, 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,
|
||||
1, 0, 0, 0, 8, 0,
|
||||
1, 0, 0, 0, 12, 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,
|
||||
5, 0, 0, 0, 1, 0,
|
||||
5, 0, 0, 0, 4, 0,
|
||||
0, 0, 255, 255, 255, 255,
|
||||
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, 6, 1, 0, 0,
|
||||
4, 0, 0, 0, 1, 0,
|
||||
|
@ -114,160 +114,159 @@ const BYTE apply_gamma_table_cs[] =
|
|||
0, 0, 0, 0, 120, 101,
|
||||
95, 97, 112, 112, 108, 121,
|
||||
95, 103, 97, 109, 109, 97,
|
||||
95, 115, 111, 117, 114, 99,
|
||||
101, 0, 120, 101, 95, 97,
|
||||
112, 112, 108, 121, 95, 103,
|
||||
97, 109, 109, 97, 95, 114,
|
||||
97, 109, 112, 0, 120, 101,
|
||||
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, 120, 101,
|
||||
95, 97, 112, 112, 108, 121,
|
||||
95, 103, 97, 109, 109, 97,
|
||||
95, 100, 101, 115, 116, 0,
|
||||
88, 101, 65, 112, 112, 108,
|
||||
121, 71, 97, 109, 109, 97,
|
||||
82, 97, 109, 112, 67, 111,
|
||||
110, 115, 116, 97, 110, 116,
|
||||
115, 0, 26, 1, 0, 0,
|
||||
1, 0, 0, 0, 76, 1,
|
||||
0, 0, 16, 0, 0, 0,
|
||||
120, 101, 115, 108, 95, 112,
|
||||
117, 115, 104, 67, 111, 110,
|
||||
115, 116, 97, 110, 116, 115,
|
||||
0, 171, 171, 171, 26, 1,
|
||||
0, 0, 1, 0, 0, 0,
|
||||
72, 1, 0, 0, 16, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 116, 1, 0, 0,
|
||||
0, 0, 0, 0, 8, 0,
|
||||
0, 0, 2, 0, 0, 0,
|
||||
144, 1, 0, 0, 0, 0,
|
||||
0, 0, 255, 255, 255, 255,
|
||||
0, 0, 0, 0, 112, 1,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
8, 0, 0, 0, 2, 0,
|
||||
0, 0, 140, 1, 0, 0,
|
||||
0, 0, 0, 0, 255, 255,
|
||||
255, 255, 0, 0, 0, 0,
|
||||
120, 101, 95, 97, 112, 112,
|
||||
108, 121, 95, 103, 97, 109,
|
||||
109, 97, 95, 115, 105, 122,
|
||||
101, 0, 117, 105, 110, 116,
|
||||
50, 0, 171, 171, 1, 0,
|
||||
19, 0, 1, 0, 2, 0,
|
||||
255, 255, 255, 255, 0, 0,
|
||||
0, 0, 120, 101, 95, 97,
|
||||
112, 112, 108, 121, 95, 103,
|
||||
97, 109, 109, 97, 95, 115,
|
||||
105, 122, 101, 0, 117, 105,
|
||||
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,
|
||||
136, 1, 0, 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, 73, 83, 71, 78,
|
||||
0, 0, 132, 1, 0, 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, 73, 83,
|
||||
71, 78, 8, 0, 0, 0,
|
||||
0, 0, 0, 0, 8, 0,
|
||||
0, 0, 79, 83, 71, 78,
|
||||
8, 0, 0, 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,
|
||||
8, 0, 0, 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,
|
||||
0, 0, 0, 0, 1, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
88, 8, 0, 7, 70, 126,
|
||||
48, 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, 7, 70, 126, 48, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
1, 0, 0, 0, 1, 0,
|
||||
0, 0, 1, 0, 0, 0,
|
||||
85, 85, 0, 0, 0, 0,
|
||||
0, 0, 88, 8, 0, 7,
|
||||
70, 126, 48, 0, 1, 0,
|
||||
0, 0, 1, 0, 0, 0,
|
||||
1, 0, 0, 0, 85, 85,
|
||||
0, 0, 156, 24, 0, 7,
|
||||
70, 238, 49, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
156, 24, 0, 7, 70, 238,
|
||||
49, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 17, 17,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 17, 17, 0, 0,
|
||||
0, 0, 0, 0, 95, 0,
|
||||
0, 2, 50, 0, 2, 0,
|
||||
104, 0, 0, 2, 2, 0,
|
||||
0, 0, 155, 0, 0, 4,
|
||||
8, 0, 0, 0, 8, 0,
|
||||
0, 0, 1, 0, 0, 0,
|
||||
80, 0, 0, 8, 50, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
70, 0, 2, 0, 70, 128,
|
||||
48, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 60, 0, 0, 7,
|
||||
18, 0, 16, 0, 0, 0,
|
||||
0, 0, 26, 0, 16, 0,
|
||||
0, 0, 0, 0, 10, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
31, 0, 4, 3, 10, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
62, 0, 0, 1, 21, 0,
|
||||
0, 1, 54, 0, 0, 4,
|
||||
95, 0, 0, 2, 50, 0,
|
||||
2, 0, 104, 0, 0, 2,
|
||||
2, 0, 0, 0, 155, 0,
|
||||
0, 4, 16, 0, 0, 0,
|
||||
8, 0, 0, 0, 1, 0,
|
||||
0, 0, 80, 0, 0, 8,
|
||||
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,
|
||||
70, 128, 48, 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, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 50, 0,
|
||||
0, 15, 114, 0, 16, 0,
|
||||
0, 0, 0, 0, 70, 2,
|
||||
0, 0, 0, 0, 60, 0,
|
||||
0, 7, 18, 0, 16, 0,
|
||||
0, 0, 0, 0, 26, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
2, 64, 0, 0, 0, 0,
|
||||
127, 67, 0, 0, 127, 67,
|
||||
0, 0, 127, 67, 0, 0,
|
||||
10, 0, 16, 0, 0, 0,
|
||||
0, 0, 31, 0, 4, 3,
|
||||
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, 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, 63,
|
||||
0, 0, 0, 0, 28, 0,
|
||||
0, 5, 114, 0, 16, 0,
|
||||
0, 0, 0, 0, 70, 2,
|
||||
0, 63, 0, 0, 0, 0,
|
||||
28, 0, 0, 5, 114, 0,
|
||||
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,
|
||||
70, 2, 16, 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, 1, 0, 0, 0,
|
||||
1, 0, 0, 0, 45, 0,
|
||||
0, 8, 66, 0, 16, 0,
|
||||
1, 0, 0, 0, 166, 10,
|
||||
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,
|
||||
150, 124, 32, 0, 1, 0,
|
||||
0, 0, 1, 0, 0, 0,
|
||||
54, 0, 0, 5, 130, 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,
|
||||
1, 64, 0, 0, 0, 0,
|
||||
128, 63, 164, 0, 0, 7,
|
||||
242, 224, 33, 0, 0, 0,
|
||||
166, 10, 16, 0, 0, 0,
|
||||
0, 0, 150, 124, 32, 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, 54, 0, 0, 5,
|
||||
130, 0, 16, 0, 1, 0,
|
||||
0, 0, 1, 64, 0, 0,
|
||||
0, 0, 128, 63, 164, 0,
|
||||
0, 7, 242, 224, 33, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
1, 0, 0, 0, 1, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
2, 0, 0, 0, 2, 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,
|
||||
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, 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,
|
||||
|
@ -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,
|
||||
1, 0, 0, 0
|
||||
0, 0, 1, 0, 0, 0
|
||||
};
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
//
|
||||
// Buffer Definitions:
|
||||
//
|
||||
// cbuffer XeApplyGammaRampConstants
|
||||
// cbuffer xesl_pushConstants
|
||||
// {
|
||||
//
|
||||
// uint2 xe_apply_gamma_size; // Offset: 0 Size: 8
|
||||
|
@ -17,10 +17,10 @@
|
|||
//
|
||||
// Name Type Format Dim ID HLSL Bind Count
|
||||
// ------------------------------ ---------- ------- ----------- ------- -------------- ------
|
||||
// xe_apply_gamma_source texture float3 2d T0 t0 1
|
||||
// xe_apply_gamma_ramp texture float3 buf T1 t1 1
|
||||
// xe_apply_gamma_dest UAV unorm4 2d U0 u0 1
|
||||
// XeApplyGammaRampConstants cbuffer NA NA CB0 cb0 1
|
||||
// xe_apply_gamma_ramp texture float4 buf T0 t0 1
|
||||
// xe_apply_gamma_source texture float4 2d T1 t1 1
|
||||
// xe_apply_gamma_dest UAV float4 2d U0 u0 1
|
||||
// xesl_pushConstants cbuffer NA NA CB0 cb0 1
|
||||
//
|
||||
//
|
||||
//
|
||||
|
@ -38,12 +38,12 @@
|
|||
cs_5_1
|
||||
dcl_globalFlags refactoringAllowed
|
||||
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) T1[1:1], space=0
|
||||
dcl_uav_typed_texture2d (unorm,unorm,unorm,unorm) U0[0:0], space=0
|
||||
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_uav_typed_texture2d (float,float,float,float) U0[0:0], space=0
|
||||
dcl_input vThreadID.xy
|
||||
dcl_temps 2
|
||||
dcl_thread_group 8, 8, 1
|
||||
dcl_thread_group 16, 8, 1
|
||||
uge r0.xy, vThreadID.xyxx, CB0[0][0].xyxx
|
||||
or r0.x, r0.y, r0.x
|
||||
if_nz r0.x
|
||||
|
@ -51,12 +51,12 @@ if_nz r0.x
|
|||
endif
|
||||
mov r0.xy, vThreadID.xyxx
|
||||
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)
|
||||
ftou r0.xyz, r0.xyzx
|
||||
ld r1.x, r0.xxxx, T1[1].zxyw
|
||||
ld r1.y, r0.yyyy, T1[1].xyzw
|
||||
ld r1.z, r0.zzzz, T1[1].yzxw
|
||||
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 r1.w, r1.xyzx, l(0.299000, 0.587000, 0.114000, 0.000000)
|
||||
store_uav_typed U0[0].xyzw, vThreadID.xyyy, r1.xyzw
|
||||
ret
|
||||
|
@ -65,21 +65,21 @@ ret
|
|||
|
||||
const BYTE apply_gamma_table_fxaa_luma_cs[] =
|
||||
{
|
||||
68, 88, 66, 67, 148, 92,
|
||||
39, 196, 202, 33, 41, 82,
|
||||
77, 137, 192, 188, 150, 218,
|
||||
30, 64, 1, 0, 0, 0,
|
||||
16, 5, 0, 0, 5, 0,
|
||||
68, 88, 66, 67, 200, 223,
|
||||
77, 37, 216, 58, 189, 85,
|
||||
119, 181, 101, 30, 54, 122,
|
||||
180, 167, 1, 0, 0, 0,
|
||||
12, 5, 0, 0, 5, 0,
|
||||
0, 0, 52, 0, 0, 0,
|
||||
24, 2, 0, 0, 40, 2,
|
||||
0, 0, 56, 2, 0, 0,
|
||||
116, 4, 0, 0, 82, 68,
|
||||
69, 70, 220, 1, 0, 0,
|
||||
1, 0, 0, 0, 52, 1,
|
||||
20, 2, 0, 0, 36, 2,
|
||||
0, 0, 52, 2, 0, 0,
|
||||
112, 4, 0, 0, 82, 68,
|
||||
69, 70, 216, 1, 0, 0,
|
||||
1, 0, 0, 0, 48, 1,
|
||||
0, 0, 4, 0, 0, 0,
|
||||
60, 0, 0, 0, 1, 5,
|
||||
83, 67, 0, 5, 0, 0,
|
||||
180, 1, 0, 0, 19, 19,
|
||||
176, 1, 0, 0, 19, 19,
|
||||
68, 37, 60, 0, 0, 0,
|
||||
24, 0, 0, 0, 40, 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,
|
||||
220, 0, 0, 0, 2, 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,
|
||||
1, 0, 0, 0, 8, 0,
|
||||
1, 0, 0, 0, 12, 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,
|
||||
5, 0, 0, 0, 1, 0,
|
||||
5, 0, 0, 0, 4, 0,
|
||||
0, 0, 255, 255, 255, 255,
|
||||
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, 6, 1, 0, 0,
|
||||
4, 0, 0, 0, 1, 0,
|
||||
4, 0, 0, 0, 5, 0,
|
||||
0, 0, 4, 0, 0, 0,
|
||||
255, 255, 255, 255, 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,
|
||||
95, 97, 112, 112, 108, 121,
|
||||
95, 103, 97, 109, 109, 97,
|
||||
95, 115, 111, 117, 114, 99,
|
||||
101, 0, 120, 101, 95, 97,
|
||||
112, 112, 108, 121, 95, 103,
|
||||
97, 109, 109, 97, 95, 114,
|
||||
97, 109, 112, 0, 120, 101,
|
||||
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, 120, 101,
|
||||
95, 97, 112, 112, 108, 121,
|
||||
95, 103, 97, 109, 109, 97,
|
||||
95, 100, 101, 115, 116, 0,
|
||||
88, 101, 65, 112, 112, 108,
|
||||
121, 71, 97, 109, 109, 97,
|
||||
82, 97, 109, 112, 67, 111,
|
||||
110, 115, 116, 97, 110, 116,
|
||||
115, 0, 26, 1, 0, 0,
|
||||
1, 0, 0, 0, 76, 1,
|
||||
0, 0, 16, 0, 0, 0,
|
||||
120, 101, 115, 108, 95, 112,
|
||||
117, 115, 104, 67, 111, 110,
|
||||
115, 116, 97, 110, 116, 115,
|
||||
0, 171, 171, 171, 26, 1,
|
||||
0, 0, 1, 0, 0, 0,
|
||||
72, 1, 0, 0, 16, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 116, 1, 0, 0,
|
||||
0, 0, 0, 0, 8, 0,
|
||||
0, 0, 2, 0, 0, 0,
|
||||
144, 1, 0, 0, 0, 0,
|
||||
0, 0, 255, 255, 255, 255,
|
||||
0, 0, 0, 0, 112, 1,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
8, 0, 0, 0, 2, 0,
|
||||
0, 0, 140, 1, 0, 0,
|
||||
0, 0, 0, 0, 255, 255,
|
||||
255, 255, 0, 0, 0, 0,
|
||||
120, 101, 95, 97, 112, 112,
|
||||
108, 121, 95, 103, 97, 109,
|
||||
109, 97, 95, 115, 105, 122,
|
||||
101, 0, 117, 105, 110, 116,
|
||||
50, 0, 171, 171, 1, 0,
|
||||
19, 0, 1, 0, 2, 0,
|
||||
255, 255, 255, 255, 0, 0,
|
||||
0, 0, 120, 101, 95, 97,
|
||||
112, 112, 108, 121, 95, 103,
|
||||
97, 109, 109, 97, 95, 115,
|
||||
105, 122, 101, 0, 117, 105,
|
||||
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,
|
||||
136, 1, 0, 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, 73, 83, 71, 78,
|
||||
0, 0, 132, 1, 0, 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, 73, 83,
|
||||
71, 78, 8, 0, 0, 0,
|
||||
0, 0, 0, 0, 8, 0,
|
||||
0, 0, 79, 83, 71, 78,
|
||||
8, 0, 0, 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,
|
||||
8, 0, 0, 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,
|
||||
0, 0, 0, 0, 1, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
88, 8, 0, 7, 70, 126,
|
||||
48, 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, 7, 70, 126, 48, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
1, 0, 0, 0, 1, 0,
|
||||
0, 0, 1, 0, 0, 0,
|
||||
85, 85, 0, 0, 0, 0,
|
||||
0, 0, 88, 8, 0, 7,
|
||||
70, 126, 48, 0, 1, 0,
|
||||
0, 0, 1, 0, 0, 0,
|
||||
1, 0, 0, 0, 85, 85,
|
||||
0, 0, 156, 24, 0, 7,
|
||||
70, 238, 49, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
156, 24, 0, 7, 70, 238,
|
||||
49, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 85, 85,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 17, 17, 0, 0,
|
||||
0, 0, 0, 0, 95, 0,
|
||||
0, 2, 50, 0, 2, 0,
|
||||
104, 0, 0, 2, 2, 0,
|
||||
0, 0, 155, 0, 0, 4,
|
||||
8, 0, 0, 0, 8, 0,
|
||||
0, 0, 1, 0, 0, 0,
|
||||
80, 0, 0, 8, 50, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
70, 0, 2, 0, 70, 128,
|
||||
48, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 60, 0, 0, 7,
|
||||
18, 0, 16, 0, 0, 0,
|
||||
0, 0, 26, 0, 16, 0,
|
||||
0, 0, 0, 0, 10, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
31, 0, 4, 3, 10, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
62, 0, 0, 1, 21, 0,
|
||||
0, 1, 54, 0, 0, 4,
|
||||
95, 0, 0, 2, 50, 0,
|
||||
2, 0, 104, 0, 0, 2,
|
||||
2, 0, 0, 0, 155, 0,
|
||||
0, 4, 16, 0, 0, 0,
|
||||
8, 0, 0, 0, 1, 0,
|
||||
0, 0, 80, 0, 0, 8,
|
||||
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,
|
||||
70, 128, 48, 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, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 50, 0,
|
||||
0, 15, 114, 0, 16, 0,
|
||||
0, 0, 0, 0, 70, 2,
|
||||
0, 0, 0, 0, 60, 0,
|
||||
0, 7, 18, 0, 16, 0,
|
||||
0, 0, 0, 0, 26, 0,
|
||||
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,
|
||||
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,
|
||||
10, 0, 16, 0, 0, 0,
|
||||
0, 0, 31, 0, 4, 3,
|
||||
10, 0, 16, 0, 0, 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,
|
||||
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, 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,
|
||||
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,
|
||||
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, 4, 0, 0, 0,
|
||||
0, 0, 0, 0, 4, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
2, 0, 0, 0, 0, 0,
|
||||
0, 0, 1, 0, 0, 0,
|
||||
0, 0, 2, 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,
|
||||
|
@ -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, 1, 0, 0, 0
|
||||
0, 0, 0, 0, 1, 0,
|
||||
0, 0
|
||||
};
|
||||
|
|
|
@ -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
|
||||
};
|
|
@ -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, 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,
|
||||
0, 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, 0, 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, 0, 0,
|
||||
0, 0, 166, 10, 16, 0,
|
||||
0, 0, 0, 0, 150, 124,
|
||||
32, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 54, 0,
|
||||
0, 5, 114, 32, 16, 0,
|
||||
0, 0, 0, 0, 70, 2,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
54, 0, 0, 5, 130, 32,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
1, 64, 0, 0, 0, 0,
|
||||
128, 63, 62, 0, 0, 1,
|
||||
83, 84, 65, 84, 148, 0,
|
||||
0, 0, 11, 0, 0, 0,
|
||||
1, 0, 0, 0, 0, 0,
|
||||
0, 0, 2, 0, 0, 0,
|
||||
1, 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,
|
||||
3, 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
|
||||
};
|
|
@ -26,18 +26,18 @@ ushr r0.y, v0.x, l(1)
|
|||
mov r0.x, v0.x
|
||||
and r0.xy, r0.xyxx, l(1, 1, 0, 0)
|
||||
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)
|
||||
ret
|
||||
// Approximately 7 instruction slots used
|
||||
#endif
|
||||
|
||||
const BYTE fullscreen_vs[] =
|
||||
const BYTE fullscreen_cw_vs[] =
|
||||
{
|
||||
68, 88, 66, 67, 111, 71,
|
||||
234, 43, 238, 70, 168, 114,
|
||||
17, 145, 139, 145, 152, 124,
|
||||
190, 180, 1, 0, 0, 0,
|
||||
68, 88, 66, 67, 38, 212,
|
||||
32, 171, 28, 206, 206, 51,
|
||||
24, 105, 112, 99, 117, 136,
|
||||
1, 11, 1, 0, 0, 0,
|
||||
172, 2, 0, 0, 5, 0,
|
||||
0, 0, 52, 0, 0, 0,
|
||||
160, 0, 0, 0, 212, 0,
|
||||
|
@ -111,10 +111,10 @@ const BYTE fullscreen_vs[] =
|
|||
70, 0, 16, 0, 0, 0,
|
||||
0, 0, 2, 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, 128, 191,
|
||||
0, 0, 128, 191, 0, 0,
|
||||
0, 0, 128, 63, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
54, 0, 0, 8, 194, 32,
|
||||
16, 0, 0, 0, 0, 0,
|
|
@ -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_input vThreadID.xy
|
||||
dcl_temps 7
|
||||
dcl_thread_group 8, 8, 1
|
||||
dcl_thread_group 16, 8, 1
|
||||
uge r0.xy, vThreadID.xyxx, CB0[0][0].xyxx
|
||||
or r0.x, r0.y, r0.x
|
||||
if_nz r0.x
|
||||
|
@ -255,10 +255,10 @@ ret
|
|||
|
||||
const BYTE fxaa_cs[] =
|
||||
{
|
||||
68, 88, 66, 67, 146, 66,
|
||||
17, 144, 231, 237, 183, 236,
|
||||
231, 78, 100, 194, 80, 51,
|
||||
78, 217, 1, 0, 0, 0,
|
||||
68, 88, 66, 67, 166, 45,
|
||||
113, 211, 255, 20, 36, 199,
|
||||
11, 156, 236, 21, 81, 60,
|
||||
246, 32, 1, 0, 0, 0,
|
||||
184, 23, 0, 0, 5, 0,
|
||||
0, 0, 52, 0, 0, 0,
|
||||
108, 2, 0, 0, 124, 2,
|
||||
|
@ -388,7 +388,7 @@ const BYTE fxaa_cs[] =
|
|||
95, 0, 0, 2, 50, 0,
|
||||
2, 0, 104, 0, 0, 2,
|
||||
7, 0, 0, 0, 155, 0,
|
||||
0, 4, 8, 0, 0, 0,
|
||||
0, 4, 16, 0, 0, 0,
|
||||
8, 0, 0, 0, 1, 0,
|
||||
0, 0, 80, 0, 0, 8,
|
||||
50, 0, 16, 0, 0, 0,
|
||||
|
|
|
@ -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_input vThreadID.xy
|
||||
dcl_temps 7
|
||||
dcl_thread_group 8, 8, 1
|
||||
dcl_thread_group 16, 8, 1
|
||||
uge r0.xy, vThreadID.xyxx, CB0[0][0].xyxx
|
||||
or r0.x, r0.y, r0.x
|
||||
if_nz r0.x
|
||||
|
@ -414,10 +414,10 @@ ret
|
|||
|
||||
const BYTE fxaa_extreme_cs[] =
|
||||
{
|
||||
68, 88, 66, 67, 37, 138,
|
||||
209, 45, 7, 149, 158, 200,
|
||||
128, 20, 212, 142, 87, 247,
|
||||
202, 95, 1, 0, 0, 0,
|
||||
68, 88, 66, 67, 201, 241,
|
||||
80, 129, 142, 182, 61, 91,
|
||||
66, 45, 161, 133, 204, 62,
|
||||
115, 180, 1, 0, 0, 0,
|
||||
16, 36, 0, 0, 5, 0,
|
||||
0, 0, 52, 0, 0, 0,
|
||||
108, 2, 0, 0, 124, 2,
|
||||
|
@ -547,7 +547,7 @@ const BYTE fxaa_extreme_cs[] =
|
|||
95, 0, 0, 2, 50, 0,
|
||||
2, 0, 104, 0, 0, 2,
|
||||
7, 0, 0, 0, 155, 0,
|
||||
0, 4, 8, 0, 0, 0,
|
||||
0, 4, 16, 0, 0, 0,
|
||||
8, 0, 0, 0, 1, 0,
|
||||
0, 0, 80, 0, 0, 8,
|
||||
50, 0, 16, 0, 0, 0,
|
||||
|
|
|
@ -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,
|
||||
};
|
271
src/xenia/gpu/shaders/bytecode/vulkan_spirv/apply_gamma_pwl_fxaa_luma_cs.h
generated
Normal file
271
src/xenia/gpu/shaders/bytecode/vulkan_spirv/apply_gamma_pwl_fxaa_luma_cs.h
generated
Normal 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,
|
||||
};
|
224
src/xenia/gpu/shaders/bytecode/vulkan_spirv/apply_gamma_pwl_fxaa_luma_ps.h
generated
Normal file
224
src/xenia/gpu/shaders/bytecode/vulkan_spirv/apply_gamma_pwl_fxaa_luma_ps.h
generated
Normal 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,
|
||||
};
|
|
@ -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,
|
||||
};
|
|
@ -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,
|
||||
};
|
193
src/xenia/gpu/shaders/bytecode/vulkan_spirv/apply_gamma_table_fxaa_luma_cs.h
generated
Normal file
193
src/xenia/gpu/shaders/bytecode/vulkan_spirv/apply_gamma_table_fxaa_luma_cs.h
generated
Normal 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,
|
||||
};
|
145
src/xenia/gpu/shaders/bytecode/vulkan_spirv/apply_gamma_table_fxaa_luma_ps.h
generated
Normal file
145
src/xenia/gpu/shaders/bytecode/vulkan_spirv/apply_gamma_table_fxaa_luma_ps.h
generated
Normal 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,
|
||||
};
|
|
@ -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,
|
||||
};
|
|
@ -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,
|
||||
};
|
|
@ -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);
|
||||
}
|
|
@ -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
|
|
@ -22,7 +22,7 @@ SamplerState xe_sampler_linear_clamp : register(s0);
|
|||
#define FXAA_HLSL_5 1
|
||||
#include "../../../../third_party/fxaa/FXAA3_11.h"
|
||||
|
||||
[numthreads(8, 8, 1)]
|
||||
[numthreads(16, 8, 1)]
|
||||
void main(uint3 xe_thread_id : SV_DispatchThreadID) {
|
||||
[branch] if (any(xe_thread_id.xy >= xe_fxaa_size)) {
|
||||
return;
|
||||
|
|
|
@ -46,7 +46,7 @@ xesl_entry_inputs_end_code_begin_compute
|
|||
kXenosMsaaSamples_1X, false, 0u, 0u,
|
||||
resolution_scale)
|
||||
>> 2u;
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_host_depth_store_dest, edram_address_int4s,
|
||||
xesl_floatBitsToUint(xesl_float4(
|
||||
xesl_texelFetch2D(xe_host_depth_store_source, pixel_index, 0).r,
|
||||
|
@ -56,7 +56,7 @@ xesl_entry_inputs_end_code_begin_compute
|
|||
pixel_index + xesl_int2(2, 0), 0).r,
|
||||
xesl_texelFetch2D(xe_host_depth_store_source,
|
||||
pixel_index + xesl_int2(3, 0), 0).r)));
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_host_depth_store_dest, edram_address_int4s + 1u,
|
||||
xesl_floatBitsToUint(xesl_float4(
|
||||
xesl_texelFetch2D(xe_host_depth_store_source,
|
||||
|
|
|
@ -54,7 +54,7 @@ xesl_entry_inputs_end_code_begin_compute
|
|||
XeHostDepthStoreRTMsaa2xSupported(rt_constant)
|
||||
? (bool(dest_sample_index) ? 0 : 1)
|
||||
: (bool(dest_sample_index) ? 3 : 0);
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_host_depth_store_dest, edram_address_int4s,
|
||||
xesl_floatBitsToUint(xesl_float4(
|
||||
xesl_texelFetch2DMS(xe_host_depth_store_source, pixel_index,
|
||||
|
@ -68,7 +68,7 @@ xesl_entry_inputs_end_code_begin_compute
|
|||
xesl_texelFetch2DMS(xe_host_depth_store_source,
|
||||
pixel_index + xesl_int2(3, 0),
|
||||
source_sample_index).r)));
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_host_depth_store_dest, edram_address_int4s + 1u,
|
||||
xesl_floatBitsToUint(xesl_float4(
|
||||
xesl_texelFetch2DMS(xe_host_depth_store_source,
|
||||
|
|
|
@ -51,7 +51,7 @@ xesl_entry_inputs_end_code_begin_compute
|
|||
// Render target horizontal sample in bit 0, vertical sample in bit 1.
|
||||
int source_sample_left = int((xesl_GlobalInvocationID.y & 1u) << 1u);
|
||||
int source_sample_right = source_sample_left + 1;
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_host_depth_store_dest, edram_address_int4s,
|
||||
xesl_floatBitsToUint(xesl_float4(
|
||||
xesl_texelFetch2DMS(xe_host_depth_store_source, pixel_index,
|
||||
|
@ -64,7 +64,7 @@ xesl_entry_inputs_end_code_begin_compute
|
|||
xesl_texelFetch2DMS(xe_host_depth_store_source,
|
||||
pixel_index + xesl_int2(1, 0),
|
||||
source_sample_right).r)));
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_host_depth_store_dest, edram_address_int4s + 1u,
|
||||
xesl_floatBitsToUint(xesl_float4(
|
||||
xesl_texelFetch2DMS(xe_host_depth_store_source,
|
||||
|
|
|
@ -43,8 +43,8 @@ xesl_entry_inputs_end_code_begin_compute
|
|||
kXenosMsaaSamples_1X, resolve_info.edram_is_depth, 0u, 0u,
|
||||
resolve_info.resolution_scale)
|
||||
>> 2u;
|
||||
xesl_writeTypedStorageBufferStore(xe_resolve_edram, address_int4s,
|
||||
resolve_info.clear_value.xxxx);
|
||||
xesl_writeTypedStorageBufferStore(xe_resolve_edram, address_int4s + 1u,
|
||||
resolve_info.clear_value.xxxx);
|
||||
xesl_typedStorageBufferStore(xe_resolve_edram, address_int4s,
|
||||
resolve_info.clear_value.xxxx);
|
||||
xesl_typedStorageBufferStore(xe_resolve_edram, address_int4s + 1u,
|
||||
resolve_info.clear_value.xxxx);
|
||||
xesl_entry_code_end_compute
|
||||
|
|
|
@ -44,7 +44,7 @@ xesl_entry_inputs_end_code_begin_compute
|
|||
>> 2u;
|
||||
uint i;
|
||||
xesl_unroll for (i = 0u; i < 4u; ++i) {
|
||||
xesl_writeTypedStorageBufferStore(xe_resolve_edram, address_int4s + i,
|
||||
resolve_info.clear_value.xyxy);
|
||||
xesl_typedStorageBufferStore(xe_resolve_edram, address_int4s + i,
|
||||
resolve_info.clear_value.xyxy);
|
||||
}
|
||||
xesl_entry_code_end_compute
|
||||
|
|
|
@ -56,12 +56,12 @@ xesl_entry_inputs_end_code_begin_compute
|
|||
XeResolveSwap8PixelsRedBlue32bpp(resolve_info, pixels_0123, pixels_4567);
|
||||
uint dest_address =
|
||||
XeResolveDestPixelAddress(resolve_info, pixel_index, 2u) >> 4u;
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_resolve_dest, dest_address,
|
||||
XeEndianSwap32(pixels_0123, resolve_info.dest_endian_128));
|
||||
dest_address += XeResolveDestRightConsecutiveBlocksOffset(
|
||||
pixel_index.x, 2u, resolve_info.resolution_scale) >> 4u;
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_resolve_dest, dest_address,
|
||||
XeEndianSwap32(pixels_4567, resolve_info.dest_endian_128));
|
||||
xesl_entry_code_end_compute
|
||||
|
|
|
@ -74,12 +74,12 @@ xesl_entry_inputs_end_code_begin_compute
|
|||
XeResolveSwap8PixelsRedBlue32bpp(resolve_info, pixels_0123, pixels_4567);
|
||||
uint dest_address =
|
||||
XeResolveDestPixelAddress(resolve_info, pixel_index, 2u) >> 4u;
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_resolve_dest, dest_address,
|
||||
XeEndianSwap32(pixels_0123, resolve_info.dest_endian_128));
|
||||
dest_address += XeResolveDestRightConsecutiveBlocksOffset(
|
||||
pixel_index.x, 2u, resolve_info.resolution_scale) >> 4u;
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_resolve_dest, dest_address,
|
||||
XeEndianSwap32(pixels_4567, resolve_info.dest_endian_128));
|
||||
xesl_entry_code_end_compute
|
||||
|
|
|
@ -56,12 +56,12 @@ xesl_entry_inputs_end_code_begin_compute
|
|||
XeResolveSwap4PixelsRedBlue64bpp(resolve_info, pixels_01, pixels_23);
|
||||
uint dest_address =
|
||||
XeResolveDestPixelAddress(resolve_info, pixel_index, 3u) >> 4u;
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_resolve_dest, dest_address,
|
||||
XeEndianSwap64(pixels_01, resolve_info.dest_endian_128));
|
||||
dest_address += XeResolveDestRightConsecutiveBlocksOffset(
|
||||
pixel_index.x, 3u, resolve_info.resolution_scale) >> 4u;
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_resolve_dest, dest_address,
|
||||
XeEndianSwap64(pixels_23, resolve_info.dest_endian_128));
|
||||
xesl_entry_code_end_compute
|
||||
|
|
|
@ -61,12 +61,12 @@ xesl_entry_inputs_end_code_begin_compute
|
|||
XeResolveSwap4PixelsRedBlue64bpp(resolve_info, pixels_01, pixels_23);
|
||||
uint dest_address =
|
||||
XeResolveDestPixelAddress(resolve_info, pixel_index, 3u) >> 4u;
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_resolve_dest, dest_address,
|
||||
XeEndianSwap64(pixels_01, resolve_info.dest_endian_128));
|
||||
dest_address += XeResolveDestRightConsecutiveBlocksOffset(
|
||||
pixel_index.x, 3u, resolve_info.resolution_scale) >> 4u;
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_resolve_dest, dest_address,
|
||||
XeEndianSwap64(pixels_23, resolve_info.dest_endian_128));
|
||||
xesl_entry_code_end_compute
|
||||
|
|
|
@ -49,13 +49,13 @@ xesl_entry_inputs_end_code_begin_compute
|
|||
// Only 32_32_32_32_FLOAT color format is 128bpp.
|
||||
uint dest_address =
|
||||
XeResolveDestPixelAddress(resolve_info, pixel_index, 4u) >> 4u;
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_resolve_dest, dest_address,
|
||||
XeEndianSwap128(xesl_floatBitsToUint(pixel_0),
|
||||
resolve_info.dest_endian_128));
|
||||
dest_address += XeResolveDestRightConsecutiveBlocksOffset(
|
||||
pixel_index.x, 4u, resolve_info.resolution_scale) >> 4u;
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_resolve_dest, dest_address,
|
||||
XeEndianSwap128(xesl_floatBitsToUint(pixel_1),
|
||||
resolve_info.dest_endian_128));
|
||||
|
|
|
@ -47,7 +47,7 @@ xesl_entry_inputs_end_code_begin_compute
|
|||
if (resolve_info.duplicate_second_host_pixel.x && pixel_index.x == 0u) {
|
||||
pixel_0 = pixel_1;
|
||||
}
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_resolve_dest,
|
||||
XeResolveDestPixelAddress(resolve_info, pixel_index, 1u) >> 3u,
|
||||
XeEndianSwap16(XePack16bpp4PixelsInUInt2(pixel_0, pixel_1, pixel_2,
|
||||
|
|
|
@ -49,7 +49,7 @@ xesl_entry_inputs_end_code_begin_compute
|
|||
if (resolve_info.duplicate_second_host_pixel.x && pixel_index.x == 0u) {
|
||||
pixel_0 = pixel_1;
|
||||
}
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_resolve_dest,
|
||||
XeResolveDestPixelAddress(resolve_info, pixel_index, 2u) >> 4u,
|
||||
XeEndianSwap32(XePack32bpp4Pixels(pixel_0, pixel_1, pixel_2, pixel_3,
|
||||
|
|
|
@ -52,12 +52,12 @@ xesl_entry_inputs_end_code_begin_compute
|
|||
}
|
||||
uint dest_address =
|
||||
XeResolveDestPixelAddress(resolve_info, pixel_index, 3u) >> 4u;
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_resolve_dest, dest_address,
|
||||
XeEndianSwap64(packed_01, resolve_info.dest_endian_128));
|
||||
dest_address += XeResolveDestRightConsecutiveBlocksOffset(
|
||||
pixel_index.x, 3u, resolve_info.resolution_scale) >> 4u;
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_resolve_dest, dest_address,
|
||||
XeEndianSwap64(packed_23, resolve_info.dest_endian_128));
|
||||
xesl_entry_code_end_compute
|
||||
|
|
|
@ -49,7 +49,7 @@ xesl_entry_inputs_end_code_begin_compute
|
|||
}
|
||||
// Convert to R8.
|
||||
// TODO(Triang3l): Investigate formats 8_A and 8_B.
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_resolve_dest,
|
||||
XeResolveDestPixelAddress(resolve_info, pixel_index, 0u) >> 3u,
|
||||
xesl_uint2(XePackR8G8B8A8UNorm(pixels_0123),
|
||||
|
|
|
@ -37,7 +37,7 @@ xesl_entry_inputs_end_code_begin_compute
|
|||
load_info.host_offset) >> 4u);
|
||||
uint block_offset_guest =
|
||||
XeTextureLoadGuestBlockOffset(load_info, block_index, 16u, 4u) >> 4u;
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_texture_load_dest, block_offset_host,
|
||||
XeEndianSwap32(xesl_typedStorageBufferLoad(xe_texture_load_source,
|
||||
block_offset_guest),
|
||||
|
@ -46,7 +46,7 @@ xesl_entry_inputs_end_code_begin_compute
|
|||
block_offset_guest +=
|
||||
XeTextureLoadRightConsecutiveBlocksOffset(load_info, block_index.x, 4u) >>
|
||||
4u;
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_texture_load_dest, block_offset_host,
|
||||
XeEndianSwap32(xesl_typedStorageBufferLoad(xe_texture_load_source,
|
||||
block_offset_guest),
|
||||
|
|
|
@ -41,9 +41,8 @@ xesl_entry_inputs_end_code_begin_compute
|
|||
xesl_uint4 guest_blocks = XeEndianSwap16(
|
||||
xesl_typedStorageBufferLoad(xe_texture_load_source, block_offset_guest),
|
||||
load_info.endian_32);
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xe_texture_load_dest, block_offset_host,
|
||||
XE_TEXTURE_LOAD_16BPB_TRANSFORM(guest_blocks));
|
||||
xesl_typedStorageBufferStore(xe_texture_load_dest, block_offset_host,
|
||||
XE_TEXTURE_LOAD_16BPB_TRANSFORM(guest_blocks));
|
||||
++block_offset_host;
|
||||
block_offset_guest +=
|
||||
XeTextureLoadRightConsecutiveBlocksOffset(load_info, block_index.x, 1u) >>
|
||||
|
@ -51,7 +50,6 @@ xesl_entry_inputs_end_code_begin_compute
|
|||
guest_blocks = XeEndianSwap16(
|
||||
xesl_typedStorageBufferLoad(xe_texture_load_source, block_offset_guest),
|
||||
load_info.endian_32);
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xe_texture_load_dest, block_offset_host,
|
||||
XE_TEXTURE_LOAD_16BPB_TRANSFORM(guest_blocks));
|
||||
xesl_typedStorageBufferStore(xe_texture_load_dest, block_offset_host,
|
||||
XE_TEXTURE_LOAD_16BPB_TRANSFORM(guest_blocks));
|
||||
xesl_entry_code_end_compute
|
||||
|
|
|
@ -41,9 +41,8 @@ xesl_entry_inputs_end_code_begin_compute
|
|||
xesl_uint4 guest_blocks = XeEndianSwap32(
|
||||
xesl_typedStorageBufferLoad(xe_texture_load_source, block_offset_guest),
|
||||
load_info.endian_32);
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xe_texture_load_dest, block_offset_host,
|
||||
XE_TEXTURE_LOAD_32BPB_TRANSFORM(guest_blocks));
|
||||
xesl_typedStorageBufferStore(xe_texture_load_dest, block_offset_host,
|
||||
XE_TEXTURE_LOAD_32BPB_TRANSFORM(guest_blocks));
|
||||
++block_offset_host;
|
||||
block_offset_guest +=
|
||||
XeTextureLoadRightConsecutiveBlocksOffset(load_info, block_index.x, 2u) >>
|
||||
|
@ -51,7 +50,6 @@ xesl_entry_inputs_end_code_begin_compute
|
|||
guest_blocks = XeEndianSwap32(
|
||||
xesl_typedStorageBufferLoad(xe_texture_load_source, block_offset_guest),
|
||||
load_info.endian_32);
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xe_texture_load_dest, block_offset_host,
|
||||
XE_TEXTURE_LOAD_32BPB_TRANSFORM(guest_blocks));
|
||||
xesl_typedStorageBufferStore(xe_texture_load_dest, block_offset_host,
|
||||
XE_TEXTURE_LOAD_32BPB_TRANSFORM(guest_blocks));
|
||||
xesl_entry_code_end_compute
|
||||
|
|
|
@ -44,10 +44,10 @@ xesl_entry_inputs_end_code_begin_compute
|
|||
load_info.endian_32);
|
||||
xesl_uint4 block_0, block_1;
|
||||
XE_TEXTURE_LOAD_32BPB_TO_64BPB(guest_blocks, block_0, block_1);
|
||||
xesl_writeTypedStorageBufferStore(xe_texture_load_dest, block_offset_host,
|
||||
block_0);
|
||||
xesl_writeTypedStorageBufferStore(xe_texture_load_dest,
|
||||
block_offset_host + 1u, block_1);
|
||||
xesl_typedStorageBufferStore(xe_texture_load_dest, block_offset_host,
|
||||
block_0);
|
||||
xesl_typedStorageBufferStore(xe_texture_load_dest, block_offset_host + 1u,
|
||||
block_1);
|
||||
block_offset_guest +=
|
||||
XeTextureLoadRightConsecutiveBlocksOffset(load_info, block_index.x, 2u) >>
|
||||
4u;
|
||||
|
@ -55,8 +55,8 @@ xesl_entry_inputs_end_code_begin_compute
|
|||
xesl_typedStorageBufferLoad(xe_texture_load_source, block_offset_guest),
|
||||
load_info.endian_32);
|
||||
XE_TEXTURE_LOAD_32BPB_TO_64BPB(guest_blocks, block_0, block_1);
|
||||
xesl_writeTypedStorageBufferStore(xe_texture_load_dest,
|
||||
block_offset_host + 2u, block_0);
|
||||
xesl_writeTypedStorageBufferStore(xe_texture_load_dest,
|
||||
block_offset_host + 3u, block_1);
|
||||
xesl_typedStorageBufferStore(xe_texture_load_dest, block_offset_host + 2u,
|
||||
block_0);
|
||||
xesl_typedStorageBufferStore(xe_texture_load_dest, block_offset_host + 3u,
|
||||
block_1);
|
||||
xesl_entry_code_end_compute
|
||||
|
|
|
@ -41,9 +41,8 @@ xesl_entry_inputs_end_code_begin_compute
|
|||
xesl_uint4 guest_blocks = XeEndianSwap32(
|
||||
xesl_typedStorageBufferLoad(xe_texture_load_source, block_offset_guest),
|
||||
load_info.endian_32);
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xe_texture_load_dest, block_offset_host,
|
||||
XE_TEXTURE_LOAD_64BPB_TRANSFORM(guest_blocks));
|
||||
xesl_typedStorageBufferStore(xe_texture_load_dest, block_offset_host,
|
||||
XE_TEXTURE_LOAD_64BPB_TRANSFORM(guest_blocks));
|
||||
++block_offset_host;
|
||||
block_offset_guest +=
|
||||
XeTextureLoadRightConsecutiveBlocksOffset(load_info, block_index.x, 3u) >>
|
||||
|
@ -51,7 +50,6 @@ xesl_entry_inputs_end_code_begin_compute
|
|||
guest_blocks = XeEndianSwap32(
|
||||
xesl_typedStorageBufferLoad(xe_texture_load_source, block_offset_guest),
|
||||
load_info.endian_32);
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xe_texture_load_dest, block_offset_host,
|
||||
XE_TEXTURE_LOAD_64BPB_TRANSFORM(guest_blocks));
|
||||
xesl_typedStorageBufferStore(xe_texture_load_dest, block_offset_host,
|
||||
XE_TEXTURE_LOAD_64BPB_TRANSFORM(guest_blocks));
|
||||
xesl_entry_code_end_compute
|
||||
|
|
|
@ -37,7 +37,7 @@ xesl_entry_inputs_end_code_begin_compute
|
|||
load_info.host_offset) >> 4u);
|
||||
uint block_offset_guest =
|
||||
XeTextureLoadGuestBlockOffset(load_info, block_index, 1u, 0u) >> 3u;
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_texture_load_dest, block_offset_host,
|
||||
xesl_uint4(
|
||||
xesl_typedStorageBufferLoad(xe_texture_load_source,
|
||||
|
|
|
@ -72,20 +72,20 @@ xesl_entry_inputs_end_code_begin_compute
|
|||
end_8in16.xz = ((blocks.xz >> 8u) & 0xFFu) | ((blocks.xz & 0xFFu) << 16u);
|
||||
end_8in16.yw = (blocks.xz >> 24u) | (blocks.xz & 0xFF0000u);
|
||||
xesl_uint2 weights_high = XeDXTHighColorWeights(blocks.yw);
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_texture_load_dest, block_offset_host,
|
||||
XeCTX1TwoBlocksRowToR8G8(end_8in16, weights_high));
|
||||
xesl_dont_flatten if (texel_index_host.y + 1u < load_info.height_texels) {
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_texture_load_dest, block_offset_host + elements_pitch_host,
|
||||
XeCTX1TwoBlocksRowToR8G8(end_8in16, weights_high >> 8u));
|
||||
xesl_dont_flatten if (texel_index_host.y + 2u < load_info.height_texels) {
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_texture_load_dest, block_offset_host + 2u * elements_pitch_host,
|
||||
XeCTX1TwoBlocksRowToR8G8(end_8in16, weights_high >> 16u));
|
||||
xesl_dont_flatten
|
||||
if (texel_index_host.y + 3u < load_info.height_texels) {
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_texture_load_dest,
|
||||
block_offset_host + 3u * elements_pitch_host,
|
||||
XeCTX1TwoBlocksRowToR8G8(end_8in16, weights_high >> 24u));
|
||||
|
|
|
@ -57,7 +57,7 @@ xesl_entry_inputs_end_code_begin_compute
|
|||
XeDXT5HighAlphaWeights(end_0.zw, weights.y),
|
||||
XeDXT5HighAlphaWeights(end_1.xy, weights.z),
|
||||
XeDXT5HighAlphaWeights(end_1.zw, weights.w));
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_texture_load_dest, block_offset_host,
|
||||
xesl_uint4(XeDXT5RowToA8In16(end_0.xy, weights.x) |
|
||||
(XeDXT5RowToA8In16(end_0.zw, weights.y) << 8u),
|
||||
|
@ -66,7 +66,7 @@ xesl_entry_inputs_end_code_begin_compute
|
|||
xesl_dont_flatten if (++texel_index_host.y < load_info.height_texels) {
|
||||
block_offset_host += elements_pitch_host;
|
||||
weights >>= 12u;
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_texture_load_dest, block_offset_host,
|
||||
xesl_uint4(XeDXT5RowToA8In16(end_0.xy, weights.x) |
|
||||
(XeDXT5RowToA8In16(end_0.zw, weights.y) << 8u),
|
||||
|
@ -79,7 +79,7 @@ xesl_entry_inputs_end_code_begin_compute
|
|||
XeDXT5HighAlphaWeights(end_0.zw, weights.y),
|
||||
XeDXT5HighAlphaWeights(end_1.xy, weights.z),
|
||||
XeDXT5HighAlphaWeights(end_1.zw, weights.w));
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_texture_load_dest, block_offset_host,
|
||||
xesl_uint4(XeDXT5RowToA8In16(end_0.xy, weights.x) |
|
||||
(XeDXT5RowToA8In16(end_0.zw, weights.y) << 8u),
|
||||
|
@ -88,7 +88,7 @@ xesl_entry_inputs_end_code_begin_compute
|
|||
xesl_dont_flatten if (++texel_index_host.y < load_info.height_texels) {
|
||||
block_offset_host += elements_pitch_host;
|
||||
weights >>= 12u;
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_texture_load_dest, block_offset_host,
|
||||
xesl_uint4(XeDXT5RowToA8In16(end_0.xy, weights.x) |
|
||||
(XeDXT5RowToA8In16(end_0.zw, weights.y) << 8u),
|
||||
|
|
|
@ -70,22 +70,22 @@ xesl_entry_inputs_end_code_begin_compute
|
|||
block_offset_host += elements_pitch_host;
|
||||
weights >>= 8u;
|
||||
}
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_texture_load_dest, block_offset_host,
|
||||
is_trans.x ? XeDXT1TransRowToRGBA8(end_8in10_01.xy, weights.x)
|
||||
: (XeDXTOpaqueRowToRGB8(end_8in10_01.xy, weights.x) |
|
||||
0xFF000000u));
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_texture_load_dest, block_offset_host + 1u,
|
||||
is_trans.y ? XeDXT1TransRowToRGBA8(end_8in10_01.zw, weights.y)
|
||||
: (XeDXTOpaqueRowToRGB8(end_8in10_01.zw, weights.y) |
|
||||
0xFF000000u));
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_texture_load_dest, block_offset_host + 2u,
|
||||
is_trans.z ? XeDXT1TransRowToRGBA8(end_8in10_23.xy, weights.z)
|
||||
: (XeDXTOpaqueRowToRGB8(end_8in10_23.xy, weights.z) |
|
||||
0xFF000000u));
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_texture_load_dest, block_offset_host + 3u,
|
||||
is_trans.w ? XeDXT1TransRowToRGBA8(end_8in10_23.zw, weights.w)
|
||||
: (XeDXTOpaqueRowToRGB8(end_8in10_23.zw, weights.w) |
|
||||
|
|
|
@ -55,25 +55,25 @@ xesl_entry_inputs_end_code_begin_compute
|
|||
// Sort the color indices so they can be used as weights for the second
|
||||
// endpoint.
|
||||
uint bgr_weights = XeDXTHighColorWeights(block.w);
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_texture_load_dest, block_offset_host,
|
||||
XeDXTOpaqueRowToRGB8(bgr_end_8in10, bgr_weights) +
|
||||
((block.xxxx >> xesl_uint4(0u, 4u, 8u, 12u)) & 0xFu) * 0x11000000u);
|
||||
xesl_dont_flatten if (texel_index_host.y + 1u < load_info.height_texels) {
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_texture_load_dest, block_offset_host + elements_pitch_host,
|
||||
XeDXTOpaqueRowToRGB8(bgr_end_8in10, bgr_weights >> 8u) +
|
||||
((block.xxxx >> xesl_uint4(16u, 20u, 24u, 28u)) & 0xFu) *
|
||||
0x11000000u);
|
||||
xesl_dont_flatten if (texel_index_host.y + 2u < load_info.height_texels) {
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_texture_load_dest, block_offset_host + 2u * elements_pitch_host,
|
||||
XeDXTOpaqueRowToRGB8(bgr_end_8in10, bgr_weights >> 16u) +
|
||||
((block.yyyy >> xesl_uint4(0u, 4u, 8u, 12u)) & 0xFu) *
|
||||
0x11000000u);
|
||||
xesl_dont_flatten
|
||||
if (texel_index_host.y + 3u < load_info.height_texels) {
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_texture_load_dest,
|
||||
block_offset_host + 3u * elements_pitch_host,
|
||||
XeDXTOpaqueRowToRGB8(bgr_end_8in10, bgr_weights >> 24u) +
|
||||
|
|
|
@ -51,22 +51,22 @@ xesl_entry_inputs_end_code_begin_compute
|
|||
xesl_uint4 blocks_23 = XeEndianSwap32(
|
||||
xesl_typedStorageBufferLoad(xe_texture_load_source, block_offset_guest),
|
||||
load_info.endian_32);
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_texture_load_dest, block_offset_host,
|
||||
XeDXT3FourBlocksRowToA8(xesl_uint4(blocks_01.xz, blocks_23.xz)));
|
||||
xesl_dont_flatten if (++texel_index_host.y < load_info.height_texels) {
|
||||
block_offset_host += elements_pitch_host;
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_texture_load_dest, block_offset_host,
|
||||
XeDXT3FourBlocksRowToA8(xesl_uint4(blocks_01.xz, blocks_23.xz) >> 16u));
|
||||
xesl_dont_flatten if (++texel_index_host.y < load_info.height_texels) {
|
||||
block_offset_host += elements_pitch_host;
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_texture_load_dest, block_offset_host,
|
||||
XeDXT3FourBlocksRowToA8(xesl_uint4(blocks_01.yw, blocks_23.yw)));
|
||||
xesl_dont_flatten if (++texel_index_host.y < load_info.height_texels) {
|
||||
block_offset_host += elements_pitch_host;
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_texture_load_dest, block_offset_host,
|
||||
XeDXT3FourBlocksRowToA8(
|
||||
xesl_uint4(blocks_01.yw, blocks_23.yw) >> 16u));
|
||||
|
|
|
@ -51,36 +51,36 @@ xesl_entry_inputs_end_code_begin_compute
|
|||
xesl_uint4 blocks_23 = XeEndianSwap32(
|
||||
xesl_typedStorageBufferLoad(xe_texture_load_source, block_offset_guest),
|
||||
load_info.endian_32);
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_texture_load_dest, block_offset_host,
|
||||
XE_TEXTURE_LOAD_DXT3A_AS_1_1_1_1_TO_16BPP(blocks_01.xz));
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_texture_load_dest, block_offset_host + 1u,
|
||||
XE_TEXTURE_LOAD_DXT3A_AS_1_1_1_1_TO_16BPP(blocks_23.xz));
|
||||
xesl_dont_flatten if (++texel_index_host.y < load_info.height_texels) {
|
||||
block_offset_host += elements_pitch_host;
|
||||
xesl_uint4 high_halfblocks = xesl_uint4(blocks_01.xz, blocks_23.xz) >> 16u;
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_texture_load_dest, block_offset_host,
|
||||
XE_TEXTURE_LOAD_DXT3A_AS_1_1_1_1_TO_16BPP(high_halfblocks.xy));
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_texture_load_dest, block_offset_host + 1u,
|
||||
XE_TEXTURE_LOAD_DXT3A_AS_1_1_1_1_TO_16BPP(high_halfblocks.zw));
|
||||
xesl_dont_flatten if (++texel_index_host.y < load_info.height_texels) {
|
||||
block_offset_host += elements_pitch_host;
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_texture_load_dest, block_offset_host,
|
||||
XE_TEXTURE_LOAD_DXT3A_AS_1_1_1_1_TO_16BPP(blocks_01.yw));
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_texture_load_dest, block_offset_host + 1u,
|
||||
XE_TEXTURE_LOAD_DXT3A_AS_1_1_1_1_TO_16BPP(blocks_23.yw));
|
||||
xesl_dont_flatten if (++texel_index_host.y < load_info.height_texels) {
|
||||
block_offset_host += elements_pitch_host;
|
||||
high_halfblocks = xesl_uint4(blocks_01.yw, blocks_23.yw) >> 16u;
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_texture_load_dest, block_offset_host,
|
||||
XE_TEXTURE_LOAD_DXT3A_AS_1_1_1_1_TO_16BPP(high_halfblocks.xy));
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_texture_load_dest, block_offset_host + 1u,
|
||||
XE_TEXTURE_LOAD_DXT3A_AS_1_1_1_1_TO_16BPP(high_halfblocks.zw));
|
||||
}
|
||||
|
|
|
@ -58,14 +58,14 @@ xesl_entry_inputs_end_code_begin_compute
|
|||
xesl_uint2 alpha_end = (block.xx >> xesl_uint2(0u, 8u)) & 0xFFu;
|
||||
uint alpha_weights = XeDXT5HighAlphaWeights(
|
||||
alpha_end, (block.x >> 16u) | ((block.y & 0xFFu) << 16u));
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_texture_load_dest, block_offset_host,
|
||||
XeDXTOpaqueRowToRGB8(bgr_end_8in10, bgr_weights) |
|
||||
((xesl_uint_x4(XeDXT5RowToA8(alpha_end, alpha_weights)) <<
|
||||
xesl_uint4(24u, 16u, 8u, 0u))
|
||||
& 0xFF000000u));
|
||||
xesl_dont_flatten if (texel_index_host.y + 1u < load_info.height_texels) {
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_texture_load_dest, block_offset_host + elements_pitch_host,
|
||||
XeDXTOpaqueRowToRGB8(bgr_end_8in10, bgr_weights >> 8u) |
|
||||
((xesl_uint_x4(XeDXT5RowToA8(alpha_end, alpha_weights >> 12u)) <<
|
||||
|
@ -73,7 +73,7 @@ xesl_entry_inputs_end_code_begin_compute
|
|||
& 0xFF000000u));
|
||||
xesl_dont_flatten if (texel_index_host.y + 2u < load_info.height_texels) {
|
||||
alpha_weights = XeDXT5HighAlphaWeights(alpha_end, block.y >> 8u);
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_texture_load_dest, block_offset_host + 2u * elements_pitch_host,
|
||||
XeDXTOpaqueRowToRGB8(bgr_end_8in10, bgr_weights >> 16u) |
|
||||
((xesl_uint_x4(XeDXT5RowToA8(alpha_end, alpha_weights)) <<
|
||||
|
@ -81,7 +81,7 @@ xesl_entry_inputs_end_code_begin_compute
|
|||
& 0xFF000000u));
|
||||
xesl_dont_flatten
|
||||
if (texel_index_host.y + 3u < load_info.height_texels) {
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_texture_load_dest,
|
||||
block_offset_host + 3u * elements_pitch_host,
|
||||
XeDXTOpaqueRowToRGB8(bgr_end_8in10, bgr_weights >> 24u) |
|
||||
|
|
|
@ -58,7 +58,7 @@ xesl_entry_inputs_end_code_begin_compute
|
|||
XeDXT5HighAlphaWeights(end_01.zw, weights.y),
|
||||
XeDXT5HighAlphaWeights(end_23.xy, weights.z),
|
||||
XeDXT5HighAlphaWeights(end_23.zw, weights.w));
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_texture_load_dest, block_offset_host,
|
||||
xesl_uint4(XeDXT5RowToA8(end_01.xy, weights.x),
|
||||
XeDXT5RowToA8(end_01.zw, weights.y),
|
||||
|
@ -67,7 +67,7 @@ xesl_entry_inputs_end_code_begin_compute
|
|||
xesl_dont_flatten if (++texel_index_host.y < load_info.height_texels) {
|
||||
block_offset_host += elements_pitch_host;
|
||||
weights >>= 12u;
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_texture_load_dest, block_offset_host,
|
||||
xesl_uint4(XeDXT5RowToA8(end_01.xy, weights.x),
|
||||
XeDXT5RowToA8(end_01.zw, weights.y),
|
||||
|
@ -80,7 +80,7 @@ xesl_entry_inputs_end_code_begin_compute
|
|||
XeDXT5HighAlphaWeights(end_01.zw, weights.y),
|
||||
XeDXT5HighAlphaWeights(end_23.xy, weights.z),
|
||||
XeDXT5HighAlphaWeights(end_23.zw, weights.w));
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_texture_load_dest, block_offset_host,
|
||||
xesl_uint4(XeDXT5RowToA8(end_01.xy, weights.x),
|
||||
XeDXT5RowToA8(end_01.zw, weights.y),
|
||||
|
@ -89,7 +89,7 @@ xesl_entry_inputs_end_code_begin_compute
|
|||
xesl_dont_flatten if (++texel_index_host.y < load_info.height_texels) {
|
||||
block_offset_host += elements_pitch_host;
|
||||
weights >>= 12u;
|
||||
xesl_writeTypedStorageBufferStore(
|
||||
xesl_typedStorageBufferStore(
|
||||
xe_texture_load_dest, block_offset_host,
|
||||
xesl_uint4(XeDXT5RowToA8(end_01.xy, weights.x),
|
||||
XeDXT5RowToA8(end_01.zw, weights.y),
|
||||
|
|
|
@ -73,7 +73,8 @@ bool TextureInfo::Prepare(const xe_gpu_texture_fetch_t& fetch,
|
|||
info.pitch = fetch.pitch << 5;
|
||||
|
||||
info.mip_min_level = fetch.mip_min_level;
|
||||
info.mip_max_level = std::max(fetch.mip_min_level, fetch.mip_max_level);
|
||||
info.mip_max_level =
|
||||
std::max(uint32_t(fetch.mip_min_level), uint32_t(fetch.mip_max_level));
|
||||
|
||||
info.is_tiled = fetch.tiled;
|
||||
info.has_packed_mips = fetch.packed_mips;
|
||||
|
|
|
@ -23,8 +23,7 @@ void GetSubresourcesFromFetchConstant(
|
|||
const xenos::xe_gpu_texture_fetch_t& fetch, uint32_t* width_minus_1_out,
|
||||
uint32_t* height_minus_1_out, uint32_t* depth_or_array_size_minus_1_out,
|
||||
uint32_t* base_page_out, uint32_t* mip_page_out,
|
||||
uint32_t* mip_min_level_out, uint32_t* mip_max_level_out,
|
||||
xenos::TextureFilter sampler_mip_filter) {
|
||||
uint32_t* mip_min_level_out, uint32_t* mip_max_level_out) {
|
||||
uint32_t width_minus_1 = 0;
|
||||
uint32_t height_minus_1 = 0;
|
||||
uint32_t depth_or_array_size_minus_1 = 0;
|
||||
|
@ -72,22 +71,21 @@ void GetSubresourcesFromFetchConstant(
|
|||
}
|
||||
uint32_t size_mip_max_level =
|
||||
xe::log2_floor(longest_axis_minus_1 + uint32_t(1));
|
||||
xenos::TextureFilter mip_filter =
|
||||
sampler_mip_filter == xenos::TextureFilter::kUseFetchConst
|
||||
? fetch.mip_filter
|
||||
: sampler_mip_filter;
|
||||
|
||||
uint32_t base_page = fetch.base_address & 0x1FFFF;
|
||||
uint32_t mip_page = fetch.mip_address & 0x1FFFF;
|
||||
|
||||
uint32_t mip_min_level, mip_max_level;
|
||||
if (mip_filter == xenos::TextureFilter::kBaseMap || mip_page == 0) {
|
||||
// Not taking mip_filter == kBaseMap into account for mip_max_level because
|
||||
// the mip filter may be overridden by shader fetch instructions.
|
||||
if (mip_page == 0) {
|
||||
mip_min_level = 0;
|
||||
mip_max_level = 0;
|
||||
} else {
|
||||
mip_min_level = std::min(fetch.mip_min_level, size_mip_max_level);
|
||||
mip_max_level = std::max(std::min(fetch.mip_max_level, size_mip_max_level),
|
||||
mip_min_level);
|
||||
mip_min_level = std::min(uint32_t(fetch.mip_min_level), size_mip_max_level);
|
||||
mip_max_level =
|
||||
std::max(std::min(uint32_t(fetch.mip_max_level), size_mip_max_level),
|
||||
mip_min_level);
|
||||
}
|
||||
if (mip_max_level != 0) {
|
||||
if (base_page == 0) {
|
||||
|
@ -260,7 +258,8 @@ TextureGuestLayout GetGuestTextureLayout(
|
|||
if (layout.packed_level != 0) {
|
||||
std::memset(&layout.mips[0], 0, sizeof(layout.mips[0]));
|
||||
}
|
||||
uint32_t max_stored_level = std::min(max_level, layout.packed_level);
|
||||
uint32_t max_stored_level =
|
||||
std::min(max_level, uint32_t(layout.packed_level));
|
||||
{
|
||||
uint32_t mips_end = max_stored_level + 1;
|
||||
assert_true(mips_end <= xe::countof(layout.mips));
|
||||
|
|
|
@ -30,9 +30,7 @@ void GetSubresourcesFromFetchConstant(
|
|||
const xenos::xe_gpu_texture_fetch_t& fetch, uint32_t* width_minus_1_out,
|
||||
uint32_t* height_minus_1_out, uint32_t* depth_or_array_size_minus_1_out,
|
||||
uint32_t* base_page_out, uint32_t* mip_page_out,
|
||||
uint32_t* mip_min_level_out, uint32_t* mip_max_level_out,
|
||||
xenos::TextureFilter sampler_mip_filter =
|
||||
xenos::TextureFilter::kUseFetchConst);
|
||||
uint32_t* mip_min_level_out, uint32_t* mip_max_level_out);
|
||||
|
||||
// Gets the number of the mipmap level where the packed mips are stored.
|
||||
inline uint32_t GetPackedMipLevel(uint32_t width, uint32_t height) {
|
||||
|
|
|
@ -113,7 +113,9 @@ enum class TextureSign : uint32_t {
|
|||
enum class TextureFilter : uint32_t {
|
||||
kPoint = 0,
|
||||
kLinear = 1,
|
||||
kBaseMap = 2, // Only applicable for mip-filter - always fetch from level 0.
|
||||
// Only applicable to the mip filter - like OpenGL minification filters
|
||||
// GL_NEAREST / GL_LINEAR without MIPMAP_NEAREST / MIPMAP_LINEAR.
|
||||
kBaseMap = 2,
|
||||
kUseFetchConst = 3,
|
||||
};
|
||||
|
||||
|
@ -128,10 +130,17 @@ enum class AnisoFilter : uint32_t {
|
|||
};
|
||||
|
||||
enum class BorderColor : uint32_t {
|
||||
k_AGBR_Black = 0,
|
||||
k_AGBR_White = 1,
|
||||
k_ACBYCR_BLACK = 2,
|
||||
k_ACBCRY_BLACK = 3,
|
||||
// (0.0, 0.0, 0.0)
|
||||
// TODO(Triang3l): Is the alpha 0 or 1?
|
||||
k_ABGR_Black = 0,
|
||||
// (1.0, 1.0, 1.0, 1.0)
|
||||
k_ABGR_White = 1,
|
||||
// Unknown precisely, but likely (0.5, 0.0, 0.5) for unsigned (Cr, Y, Cb)
|
||||
// TODO(Triang3l): Real hardware border color, and is the alpha 0 or 1?
|
||||
k_ACBYCR_Black = 2,
|
||||
// Unknown precisely, but likely (0.0, 0.5, 0.5) for unsigned (Y, Cr, Cb)
|
||||
// TODO(Triang3l): Real hardware border color, and is the alpha 0 or 1?
|
||||
k_ACBCRY_Black = 3,
|
||||
};
|
||||
|
||||
// For the tfetch instruction (not the fetch constant) and related instructions,
|
||||
|
@ -714,6 +723,16 @@ enum class ArbitraryFilter : uint32_t {
|
|||
kUseFetchConst = 7,
|
||||
};
|
||||
|
||||
// While instructions contain 6-bit register index fields (allowing literal
|
||||
// indices, or literal index offsets, depending on the addressing mode, of up to
|
||||
// 63), the maximum total register count for a vertex and a pixel shader
|
||||
// combined is 128, and the boundary between vertex and pixel shaders can be
|
||||
// moved via SQ_PROGRAM_CNTL::VS/PS_NUM_REG, according to the IPR2015-00325
|
||||
// specification (section 8 "Register file allocation").
|
||||
constexpr uint32_t kMaxShaderTempRegistersLog2 = 7;
|
||||
constexpr uint32_t kMaxShaderTempRegisters = UINT32_C(1)
|
||||
<< kMaxShaderTempRegistersLog2;
|
||||
|
||||
// a2xx_sq_ps_vtx_mode
|
||||
enum class VertexShaderExportMode : uint32_t {
|
||||
kPosition1Vector = 0,
|
||||
|
|
|
@ -558,7 +558,7 @@ xesl_float4 xesl_float_x4(float xesl_var_value) {
|
|||
// Loading and storing.
|
||||
#define xesl_typedStorageBufferLoad(name, position) \
|
||||
((name).xesl_id_data[uint(position)])
|
||||
#define xesl_writeTypedStorageBufferStore(name, position, value) \
|
||||
#define xesl_typedStorageBufferStore(name, position, value) \
|
||||
((name).xesl_id_data[uint(position)] = (value))
|
||||
#define xesl_uintVectorBufferLoad1(name, position) \
|
||||
((name).xesl_id_data[uint(position)])
|
||||
|
@ -582,7 +582,7 @@ xesl_float4 xesl_float_x4(float xesl_var_value) {
|
|||
ByteAddressBuffer name : register(hlsl_t, hlsl_t_space);
|
||||
// Loading and storing.
|
||||
#define xesl_typedStorageBufferLoad(name, position) ((name)[uint(position)])
|
||||
#define xesl_writeTypedStorageBufferStore(name, position, value) \
|
||||
#define xesl_typedStorageBufferStore(name, position, value) \
|
||||
((name)[uint(position)] = (value))
|
||||
#define xesl_uintVectorBufferLoad1(name, position) \
|
||||
((name).Load(int(position) << 2))
|
||||
|
@ -602,7 +602,7 @@ xesl_float4 xesl_float_x4(float xesl_var_value) {
|
|||
const device uint* name [[msl_buffer]]
|
||||
// Loading and storing.
|
||||
#define xesl_typedStorageBufferLoad(name, position) ((name)[size_t(position)])
|
||||
#define xesl_writeTypedStorageBufferStore(name, position, value) \
|
||||
#define xesl_typedStorageBufferStore(name, position, value) \
|
||||
((name)[size_t(position)] = (value))
|
||||
#define xesl_uintVectorBufferLoad1(name, position) ((name)[size_t(position)])
|
||||
#define xesl_uintVectorBufferLoad2(name, position) \
|
||||
|
@ -649,9 +649,16 @@ xesl_float4 xesl_float_x4(float xesl_var_value) {
|
|||
#if XESL_LANGUAGE_GLSL
|
||||
#define XESL_COMBINED_TEXTURE_SAMPLER 1
|
||||
// Types.
|
||||
#define xesl_textureBuffer textureBuffer
|
||||
#define xesl_utextureBuffer utextureBuffer
|
||||
#define xesl_texture2D texture2D
|
||||
#define xesl_texture2DMS texture2DMS
|
||||
#define xesl_samplerBuffer samplerBuffer
|
||||
#define xesl_usamplerBuffer usamplerBuffer
|
||||
#define xesl_sampler2D sampler2D
|
||||
#define xesl_image2D image2D
|
||||
#define xesl_imageFormat_rgb10_a2 rgb10_a2
|
||||
#define xesl_imageFormat_rgba16f rgba16f
|
||||
// Binding declarations.
|
||||
#define xesl_texture(texture_type, name, glsl_set, glsl_binding, hlsl_t, \
|
||||
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, \
|
||||
msl_sampler) \
|
||||
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.
|
||||
#define xesl_texelFetchBuffer(texture_name, position) \
|
||||
texelFetch(texture_name, int(position))
|
||||
#define xesl_texelFetch2D(texture_name, position, lod) \
|
||||
texelFetch(texture_name, xesl_int2(position), int(lod))
|
||||
#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)
|
||||
#define xesl_textureGatherAlpha2D_comb(texture_sampler_name, position) \
|
||||
textureGather(texture_sampler_name, position, 3)
|
||||
#define xesl_imageStore2DRGBA(name, position, data) \
|
||||
imageStore(name, xesl_int2(position), data)
|
||||
#elif XESL_LANGUAGE_HLSL
|
||||
// Types.
|
||||
#define xesl_textureBuffer Buffer<xesl_float4>
|
||||
#define xesl_utextureBuffer Buffer<xesl_uint4>
|
||||
#define xesl_texture2D Texture2D<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.
|
||||
#define xesl_texture(texture_type, name, glsl_set, glsl_binding, hlsl_t, \
|
||||
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, \
|
||||
hlsl_s_space, msl_sampler) \
|
||||
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.
|
||||
#define xesl_texelFetchBuffer(texture_name, position) \
|
||||
((texture_name).Load(int(position)))
|
||||
#define xesl_texelFetch2D(texture_name, position, lod) \
|
||||
((texture_name).Load(xesl_int3(position, lod)))
|
||||
#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))
|
||||
#define xesl_textureGatherAlpha2D_sep(texture_name, sampler_name, position) \
|
||||
((texture_name).GatherAlpha(sampler_name, position))
|
||||
#define xesl_imageStore2DRGBA(name, position, data) \
|
||||
((name)[xesl_int2(position)] = (data))
|
||||
#elif XESL_LANGUAGE_MSL
|
||||
// Types.
|
||||
#define xesl_textureBuffer texture_buffer<float>
|
||||
#define xesl_utextureBuffer texture_buffer<uint>
|
||||
#define xesl_texture2D texture2d<float>
|
||||
#define xesl_texture2DMS texture2d_ms<float>
|
||||
#define xesl_image2D texture2d
|
||||
#define xesl_imageFormat_rgb10_a2 float
|
||||
#define xesl_imageFormat_rgba16f float
|
||||
// Binding declarations.
|
||||
#define xesl_texture(texture_type, name, glsl_set, glsl_binding, hlsl_t, \
|
||||
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, \
|
||||
hlsl_s_space, 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.
|
||||
#define xesl_texelFetchBuffer(texture_name, position) \
|
||||
((texture_name).read(uint(position)))
|
||||
#define xesl_texelFetch2D(texture_name, position, lod) \
|
||||
((texture_name).read(xesl_uint2(position), uint(lod)))
|
||||
#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) \
|
||||
((texture_name).gather(sampler_name, position, xesl_int2(0), \
|
||||
component::w))
|
||||
#define xesl_imageStore2DRGBA(name, position, data) \
|
||||
((name).write(data, xesl_uint2(position)))
|
||||
#else
|
||||
#error Buffers and textures not defined for the target language.
|
||||
#endif // XESL_LANGUAGE
|
||||
|
|
Loading…
Reference in New Issue