Merge branch 'master' into vulkan

This commit is contained in:
Triang3l 2022-06-02 22:50:14 +03:00
commit 1ce45ee150
38 changed files with 27162 additions and 27666 deletions

View File

@ -12,6 +12,7 @@
#include <algorithm> #include <algorithm>
#include <locale> #include <locale>
#include <numeric> #include <numeric>
#include <tuple>
#define UTF_CPP_CPLUSPLUS 201703L #define UTF_CPP_CPLUSPLUS 201703L
#include "third_party/utfcpp/source/utf8.h" #include "third_party/utfcpp/source/utf8.h"

View File

@ -10,6 +10,7 @@
#include "xenia/gpu/d3d12/d3d12_render_target_cache.h" #include "xenia/gpu/d3d12/d3d12_render_target_cache.h"
#include <algorithm> #include <algorithm>
#include <array>
#include <cstdint> #include <cstdint>
#include <cstring> #include <cstring>
#include <iterator> #include <iterator>
@ -347,7 +348,7 @@ bool D3D12RenderTargetCache::Initialize() {
bool draw_resolution_scaled = IsDrawResolutionScaled(); bool draw_resolution_scaled = IsDrawResolutionScaled();
// Create the resolve copying root signature. // Create the resolve copying root signature.
D3D12_ROOT_PARAMETER resolve_copy_root_parameters[4]; std::array<D3D12_ROOT_PARAMETER, 3> resolve_copy_root_parameters;
// Parameter 0 is constants. // Parameter 0 is constants.
resolve_copy_root_parameters[0].ParameterType = resolve_copy_root_parameters[0].ParameterType =
D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS; D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS;
@ -390,23 +391,11 @@ bool D3D12RenderTargetCache::Initialize() {
&resolve_copy_source_range; &resolve_copy_source_range;
resolve_copy_root_parameters[2].ShaderVisibility = resolve_copy_root_parameters[2].ShaderVisibility =
D3D12_SHADER_VISIBILITY_ALL; D3D12_SHADER_VISIBILITY_ALL;
// Parameter 3 is the resolution scale.
if (draw_resolution_scaled) {
resolve_copy_root_parameters[3].ParameterType =
D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS;
resolve_copy_root_parameters[3].Constants.ShaderRegister = 1;
resolve_copy_root_parameters[3].Constants.RegisterSpace = 0;
// Binding all of the shared memory at 1x resolution, portions with scaled
// resolution.
resolve_copy_root_parameters[3].Constants.Num32BitValues =
sizeof(draw_util::ResolveResolutionScaleConstant) / sizeof(uint32_t);
resolve_copy_root_parameters[3].ShaderVisibility =
D3D12_SHADER_VISIBILITY_ALL;
}
D3D12_ROOT_SIGNATURE_DESC resolve_copy_root_signature_desc; D3D12_ROOT_SIGNATURE_DESC resolve_copy_root_signature_desc;
resolve_copy_root_signature_desc.NumParameters = resolve_copy_root_signature_desc.NumParameters =
draw_resolution_scaled ? 4 : 3; UINT(resolve_copy_root_parameters.size());
resolve_copy_root_signature_desc.pParameters = resolve_copy_root_parameters; resolve_copy_root_signature_desc.pParameters =
resolve_copy_root_parameters.data();
resolve_copy_root_signature_desc.NumStaticSamplers = 0; resolve_copy_root_signature_desc.NumStaticSamplers = 0;
resolve_copy_root_signature_desc.pStaticSamplers = nullptr; resolve_copy_root_signature_desc.pStaticSamplers = nullptr;
resolve_copy_root_signature_desc.Flags = D3D12_ROOT_SIGNATURE_FLAG_NONE; resolve_copy_root_signature_desc.Flags = D3D12_ROOT_SIGNATURE_FLAG_NONE;
@ -1031,7 +1020,7 @@ bool D3D12RenderTargetCache::Initialize() {
msaa_2x_supported_ = false; msaa_2x_supported_ = false;
// Create the resolve EDRAM buffer clearing root signature. // Create the resolve EDRAM buffer clearing root signature.
D3D12_ROOT_PARAMETER resolve_rov_clear_root_parameters[3]; std::array<D3D12_ROOT_PARAMETER, 2> resolve_rov_clear_root_parameters;
// Parameter 0 is constants. // Parameter 0 is constants.
resolve_rov_clear_root_parameters[0].ParameterType = resolve_rov_clear_root_parameters[0].ParameterType =
D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS; D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS;
@ -1058,24 +1047,11 @@ bool D3D12RenderTargetCache::Initialize() {
&resolve_rov_clear_dest_range; &resolve_rov_clear_dest_range;
resolve_rov_clear_root_parameters[1].ShaderVisibility = resolve_rov_clear_root_parameters[1].ShaderVisibility =
D3D12_SHADER_VISIBILITY_ALL; D3D12_SHADER_VISIBILITY_ALL;
// Parameter 2 is the resolution scale.
if (draw_resolution_scaled) {
resolve_rov_clear_root_parameters[2].ParameterType =
D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS;
resolve_rov_clear_root_parameters[2].Constants.ShaderRegister = 1;
resolve_rov_clear_root_parameters[2].Constants.RegisterSpace = 0;
// Binding all of the shared memory at 1x resolution, portions with scaled
// resolution.
resolve_rov_clear_root_parameters[2].Constants.Num32BitValues =
sizeof(draw_util::ResolveResolutionScaleConstant) / sizeof(uint32_t);
resolve_rov_clear_root_parameters[2].ShaderVisibility =
D3D12_SHADER_VISIBILITY_ALL;
}
D3D12_ROOT_SIGNATURE_DESC resolve_rov_clear_root_signature_desc; D3D12_ROOT_SIGNATURE_DESC resolve_rov_clear_root_signature_desc;
resolve_rov_clear_root_signature_desc.NumParameters = resolve_rov_clear_root_signature_desc.NumParameters =
draw_resolution_scaled ? 3 : 2; UINT(resolve_rov_clear_root_parameters.size());
resolve_rov_clear_root_signature_desc.pParameters = resolve_rov_clear_root_signature_desc.pParameters =
resolve_rov_clear_root_parameters; resolve_rov_clear_root_parameters.data();
resolve_rov_clear_root_signature_desc.NumStaticSamplers = 0; resolve_rov_clear_root_signature_desc.NumStaticSamplers = 0;
resolve_rov_clear_root_signature_desc.pStaticSamplers = nullptr; resolve_rov_clear_root_signature_desc.pStaticSamplers = nullptr;
resolve_rov_clear_root_signature_desc.Flags = resolve_rov_clear_root_signature_desc.Flags =
@ -1354,26 +1330,24 @@ bool D3D12RenderTargetCache::Resolve(const Memory& memory,
draw_util::ResolveInfo resolve_info; draw_util::ResolveInfo resolve_info;
if (!draw_util::GetResolveInfo( if (!draw_util::GetResolveInfo(
register_file(), memory, trace_writer_, draw_resolution_scaled, register_file(), memory, trace_writer_, draw_resolution_scale_x(),
IsFixed16TruncatedToMinus1To1(), resolve_info)) { draw_resolution_scale_y(), IsFixed16TruncatedToMinus1To1(),
resolve_info)) {
return false; return false;
} }
// Nothing to copy/clear. // Nothing to copy/clear.
if (!resolve_info.address.width_div_8 || !resolve_info.address.height_div_8) { if (!resolve_info.coordinate_info.width_div_8 ||
!resolve_info.coordinate_info.height_div_8) {
return true; return true;
} }
draw_util::ResolveResolutionScaleConstant resolution_scale_constant;
resolution_scale_constant.resolution_scale_x = draw_resolution_scale_x();
resolution_scale_constant.resolution_scale_y = draw_resolution_scale_y();
DeferredCommandList& command_list = DeferredCommandList& command_list =
command_processor_.GetDeferredCommandList(); command_processor_.GetDeferredCommandList();
// Copying. // Copying.
bool copied = false; bool copied = false;
if (resolve_info.copy_dest_length) { if (resolve_info.copy_dest_extent_length) {
if (GetPath() == Path::kHostRenderTargets) { if (GetPath() == Path::kHostRenderTargets) {
// Dump the current contents of the render targets owning the affected // Dump the current contents of the render targets owning the affected
// range to edram_buffer_. // range to edram_buffer_.
@ -1401,20 +1375,28 @@ bool D3D12RenderTargetCache::Resolve(const Memory& memory,
// Make sure there is memory to write to. // Make sure there is memory to write to.
bool copy_dest_committed; bool copy_dest_committed;
if (draw_resolution_scaled) { if (draw_resolution_scaled) {
copy_dest_committed = // Committing starting with the beginning of the potentially written
texture_cache.EnsureScaledResolveMemoryCommitted( // extent, but making the buffer containing the base current as the
resolve_info.copy_dest_base, resolve_info.copy_dest_length) && // beginning of the bound buffer is the base.
copy_dest_committed = texture_cache.EnsureScaledResolveMemoryCommitted(
resolve_info.copy_dest_extent_start,
resolve_info.copy_dest_extent_length) &&
texture_cache.MakeScaledResolveRangeCurrent( texture_cache.MakeScaledResolveRangeCurrent(
resolve_info.copy_dest_base, resolve_info.copy_dest_length); resolve_info.copy_dest_base,
resolve_info.copy_dest_extent_start -
resolve_info.copy_dest_base +
resolve_info.copy_dest_extent_length);
} else { } else {
copy_dest_committed = shared_memory.RequestRange( copy_dest_committed =
resolve_info.copy_dest_base, resolve_info.copy_dest_length); shared_memory.RequestRange(resolve_info.copy_dest_extent_start,
resolve_info.copy_dest_extent_length);
} }
if (copy_dest_committed) { if (copy_dest_committed) {
// Write the descriptors and transition the resources. // Write the descriptors and transition the resources.
// Full shared memory without resolution scaling, range of the scaled // Full shared memory without resolution scaling, range of the scaled
// resolve buffer with scaling because only 128 R32 elements can be // resolve buffer with scaling because only at least 128 * 2^20 R32
// addressed on Nvidia. // elements must be addressable
// (D3D12_REQ_BUFFER_RESOURCE_TEXEL_COUNT_2_TO_EXP).
ui::d3d12::util::DescriptorCpuGpuHandlePair descriptor_dest; ui::d3d12::util::DescriptorCpuGpuHandlePair descriptor_dest;
ui::d3d12::util::DescriptorCpuGpuHandlePair descriptor_source; ui::d3d12::util::DescriptorCpuGpuHandlePair descriptor_source;
ui::d3d12::util::DescriptorCpuGpuHandlePair descriptors[2]; ui::d3d12::util::DescriptorCpuGpuHandlePair descriptors[2];
@ -1465,11 +1447,6 @@ bool D3D12RenderTargetCache::Resolve(const Memory& memory,
// Submit the resolve. // Submit the resolve.
command_list.D3DSetComputeRootSignature(resolve_copy_root_signature_); command_list.D3DSetComputeRootSignature(resolve_copy_root_signature_);
if (draw_resolution_scaled) {
command_list.D3DSetComputeRoot32BitConstants(
3, sizeof(resolution_scale_constant) / sizeof(uint32_t),
&resolution_scale_constant, 0);
}
command_list.D3DSetComputeRootDescriptorTable( command_list.D3DSetComputeRootDescriptorTable(
2, descriptor_source.second); 2, descriptor_source.second);
command_list.D3DSetComputeRootDescriptorTable(1, command_list.D3DSetComputeRootDescriptorTable(1,
@ -1497,10 +1474,11 @@ bool D3D12RenderTargetCache::Resolve(const Memory& memory,
} }
// Invalidate textures and mark the range as scaled if needed. // Invalidate textures and mark the range as scaled if needed.
texture_cache.MarkRangeAsResolved(resolve_info.copy_dest_base, texture_cache.MarkRangeAsResolved(
resolve_info.copy_dest_length); resolve_info.copy_dest_extent_start,
written_address_out = resolve_info.copy_dest_base; resolve_info.copy_dest_extent_length);
written_length_out = resolve_info.copy_dest_length; written_address_out = resolve_info.copy_dest_extent_start;
written_length_out = resolve_info.copy_dest_extent_length;
copied = true; copied = true;
} }
} else { } else {
@ -1563,11 +1541,6 @@ bool D3D12RenderTargetCache::Resolve(const Memory& memory,
CommitEdramBufferUAVWrites(); CommitEdramBufferUAVWrites();
command_list.D3DSetComputeRootSignature( command_list.D3DSetComputeRootSignature(
resolve_rov_clear_root_signature_); resolve_rov_clear_root_signature_);
if (draw_resolution_scaled) {
command_list.D3DSetComputeRoot32BitConstants(
2, sizeof(resolution_scale_constant) / sizeof(uint32_t),
&resolution_scale_constant, 0);
}
command_list.D3DSetComputeRootDescriptorTable( command_list.D3DSetComputeRootDescriptorTable(
1, descriptor_edram.second); 1, descriptor_edram.second);
std::pair<uint32_t, uint32_t> clear_group_count = std::pair<uint32_t, uint32_t> clear_group_count =

View File

@ -76,8 +76,8 @@ class D3D12SharedMemory : public SharedMemory {
void WriteRawSRVDescriptor(D3D12_CPU_DESCRIPTOR_HANDLE handle); void WriteRawSRVDescriptor(D3D12_CPU_DESCRIPTOR_HANDLE handle);
void WriteRawUAVDescriptor(D3D12_CPU_DESCRIPTOR_HANDLE handle); void WriteRawUAVDescriptor(D3D12_CPU_DESCRIPTOR_HANDLE handle);
// Due to the Nvidia 128 megatexel limitation, the smallest supported formats // Due to the D3D12_REQ_BUFFER_RESOURCE_TEXEL_COUNT_2_TO_EXP limitation, the
// are 32-bit. // smallest supported formats are 32-bit.
void WriteUintPow2SRVDescriptor(D3D12_CPU_DESCRIPTOR_HANDLE handle, void WriteUintPow2SRVDescriptor(D3D12_CPU_DESCRIPTOR_HANDLE handle,
uint32_t element_size_bytes_pow2); uint32_t element_size_bytes_pow2);
void WriteUintPow2UAVDescriptor(D3D12_CPU_DESCRIPTOR_HANDLE handle, void WriteUintPow2UAVDescriptor(D3D12_CPU_DESCRIPTOR_HANDLE handle,

View File

@ -1442,19 +1442,30 @@ D3D12TextureCache::D3D12Texture::~D3D12Texture() {
} }
bool D3D12TextureCache::IsDecompressionNeeded(xenos::TextureFormat format, bool D3D12TextureCache::IsDecompressionNeeded(xenos::TextureFormat format,
uint32_t width, uint32_t height) { uint32_t width,
uint32_t height) const {
DXGI_FORMAT dxgi_format_uncompressed = DXGI_FORMAT dxgi_format_uncompressed =
host_formats_[uint32_t(format)].dxgi_format_uncompressed; host_formats_[uint32_t(format)].dxgi_format_uncompressed;
if (dxgi_format_uncompressed == DXGI_FORMAT_UNKNOWN) { if (dxgi_format_uncompressed == DXGI_FORMAT_UNKNOWN) {
return false; return false;
} }
const FormatInfo* format_info = FormatInfo::Get(format); const FormatInfo* format_info = FormatInfo::Get(format);
return (width & (format_info->block_width - 1)) != 0 || if (!(width & (format_info->block_width - 1)) &&
(height & (format_info->block_height - 1)) != 0; !(height & (format_info->block_height - 1))) {
return false;
}
// UnalignedBlockTexturesSupported is for block-compressed textures with the
// block size of 4x4, but not for 2x1 (4:2:2) subsampled formats.
if (format_info->block_width == 4 && format_info->block_height == 4 &&
command_processor_.GetD3D12Provider()
.AreUnalignedBlockTexturesSupported()) {
return false;
}
return true;
} }
TextureCache::LoadShaderIndex D3D12TextureCache::GetLoadShaderIndex( TextureCache::LoadShaderIndex D3D12TextureCache::GetLoadShaderIndex(
TextureKey key) { TextureKey key) const {
const HostFormat& host_format = host_formats_[uint32_t(key.format)]; const HostFormat& host_format = host_formats_[uint32_t(key.format)];
if (key.signed_separate) { if (key.signed_separate) {
return host_format.load_shader_signed; return host_format.load_shader_signed;
@ -1715,9 +1726,10 @@ bool D3D12TextureCache::LoadTextureDataFromResidentMemoryImpl(Texture& texture,
} }
// Begin loading. // Begin loading.
// May use different buffers for scaled base and mips, and also can't address // May use different buffers for scaled base and mips, and also addressability
// more than 128 megatexels directly on Nvidia - need two separate UAV // of more than 128 * 2^20 (2^D3D12_REQ_BUFFER_RESOURCE_TEXEL_COUNT_2_TO_EXP)
// descriptors for base and mips. // texels is not mandatory - need two separate UAV descriptors for base and
// mips.
// Destination. // Destination.
uint32_t descriptor_count = 1; uint32_t descriptor_count = 1;
if (texture_resolution_scaled) { if (texture_resolution_scaled) {
@ -1820,7 +1832,8 @@ bool D3D12TextureCache::LoadTextureDataFromResidentMemoryImpl(Texture& texture,
if (texture_resolution_scaled) { if (texture_resolution_scaled) {
// Offset already applied in the buffer because more than 512 MB can't be // Offset already applied in the buffer because more than 512 MB can't be
// directly addresses on Nvidia as R32. // directly addresses as R32 on some hardware (above
// 2^D3D12_REQ_BUFFER_RESOURCE_TEXEL_COUNT_2_TO_EXP).
load_constants.guest_offset = 0; load_constants.guest_offset = 0;
} else { } else {
load_constants.guest_offset = guest_address; load_constants.guest_offset = guest_address;

View File

@ -361,30 +361,30 @@ class D3D12TextureCache final : public TextureCache {
// Whether decompression is needed on the host (Direct3D only allows creation // Whether decompression is needed on the host (Direct3D only allows creation
// of block-compressed textures with 4x4-aligned dimensions on PC). // of block-compressed textures with 4x4-aligned dimensions on PC).
static bool IsDecompressionNeeded(xenos::TextureFormat format, uint32_t width, bool IsDecompressionNeeded(xenos::TextureFormat format, uint32_t width,
uint32_t height); uint32_t height) const;
static DXGI_FORMAT GetDXGIResourceFormat(xenos::TextureFormat format, DXGI_FORMAT GetDXGIResourceFormat(xenos::TextureFormat format, uint32_t width,
uint32_t width, uint32_t height) { uint32_t height) const {
const HostFormat& host_format = host_formats_[uint32_t(format)]; const HostFormat& host_format = host_formats_[uint32_t(format)];
return IsDecompressionNeeded(format, width, height) return IsDecompressionNeeded(format, width, height)
? host_format.dxgi_format_uncompressed ? host_format.dxgi_format_uncompressed
: host_format.dxgi_format_resource; : host_format.dxgi_format_resource;
} }
static DXGI_FORMAT GetDXGIResourceFormat(TextureKey key) { DXGI_FORMAT GetDXGIResourceFormat(TextureKey key) const {
return GetDXGIResourceFormat(key.format, key.GetWidth(), key.GetHeight()); return GetDXGIResourceFormat(key.format, key.GetWidth(), key.GetHeight());
} }
static DXGI_FORMAT GetDXGIUnormFormat(xenos::TextureFormat format, DXGI_FORMAT GetDXGIUnormFormat(xenos::TextureFormat format, uint32_t width,
uint32_t width, uint32_t height) { uint32_t height) const {
const HostFormat& host_format = host_formats_[uint32_t(format)]; const HostFormat& host_format = host_formats_[uint32_t(format)];
return IsDecompressionNeeded(format, width, height) return IsDecompressionNeeded(format, width, height)
? host_format.dxgi_format_uncompressed ? host_format.dxgi_format_uncompressed
: host_format.dxgi_format_unsigned; : host_format.dxgi_format_unsigned;
} }
static DXGI_FORMAT GetDXGIUnormFormat(TextureKey key) { DXGI_FORMAT GetDXGIUnormFormat(TextureKey key) const {
return GetDXGIUnormFormat(key.format, key.GetWidth(), key.GetHeight()); return GetDXGIUnormFormat(key.format, key.GetWidth(), key.GetHeight());
} }
static LoadShaderIndex GetLoadShaderIndex(TextureKey key); LoadShaderIndex GetLoadShaderIndex(TextureKey key) const;
static constexpr bool AreDimensionsCompatible( static constexpr bool AreDimensionsCompatible(
xenos::FetchOpDimension binding_dimension, xenos::FetchOpDimension binding_dimension,

View File

@ -717,24 +717,29 @@ xenos::CopySampleSelect SanitizeCopySampleSelect(
return copy_sample_select; return copy_sample_select;
} }
void GetResolveEdramTileSpan(ResolveEdramPackedInfo edram_info, void GetResolveEdramTileSpan(ResolveEdramInfo edram_info,
ResolveAddressPackedInfo address_info, ResolveCoordinateInfo coordinate_info,
uint32_t& base_out, uint32_t& row_length_used_out, uint32_t& base_out, uint32_t& row_length_used_out,
uint32_t& rows_out) { uint32_t& rows_out) {
// Due to 64bpp, and also not to make an assumption that the offsets are
// limited to (80 - 8, 8 - 8) with 2x MSAA, and (40 - 8, 8 - 8) with 4x MSAA,
// still taking the offset into account.
uint32_t x_scale_log2 = uint32_t x_scale_log2 =
3 + uint32_t(edram_info.msaa_samples >= xenos::MsaaSamples::k4X) + 3 + uint32_t(edram_info.msaa_samples >= xenos::MsaaSamples::k4X) +
edram_info.format_is_64bpp; edram_info.format_is_64bpp;
uint32_t x0 = (address_info.local_x_div_8 << x_scale_log2) / uint32_t x0 = (coordinate_info.edram_offset_x_div_8 << x_scale_log2) /
xenos::kEdramTileWidthSamples; xenos::kEdramTileWidthSamples;
uint32_t x1 = (((address_info.local_x_div_8 + address_info.width_div_8) uint32_t x1 =
(((coordinate_info.edram_offset_x_div_8 + coordinate_info.width_div_8)
<< x_scale_log2) + << x_scale_log2) +
(xenos::kEdramTileWidthSamples - 1)) / (xenos::kEdramTileWidthSamples - 1)) /
xenos::kEdramTileWidthSamples; xenos::kEdramTileWidthSamples;
uint32_t y_scale_log2 = uint32_t y_scale_log2 =
3 + uint32_t(edram_info.msaa_samples >= xenos::MsaaSamples::k2X); 3 + uint32_t(edram_info.msaa_samples >= xenos::MsaaSamples::k2X);
uint32_t y0 = (address_info.local_y_div_8 << y_scale_log2) / uint32_t y0 = (coordinate_info.edram_offset_y_div_8 << y_scale_log2) /
xenos::kEdramTileHeightSamples; xenos::kEdramTileHeightSamples;
uint32_t y1 = (((address_info.local_y_div_8 + address_info.height_div_8) uint32_t y1 =
(((coordinate_info.edram_offset_y_div_8 + coordinate_info.height_div_8)
<< y_scale_log2) + << y_scale_log2) +
(xenos::kEdramTileHeightSamples - 1)) / (xenos::kEdramTileHeightSamples - 1)) /
xenos::kEdramTileHeightSamples; xenos::kEdramTileHeightSamples;
@ -757,7 +762,8 @@ const ResolveCopyShaderInfo
}; };
bool GetResolveInfo(const RegisterFile& regs, const Memory& memory, bool GetResolveInfo(const RegisterFile& regs, const Memory& memory,
TraceWriter& trace_writer, bool is_resolution_scaled, TraceWriter& trace_writer, uint32_t draw_resolution_scale_x,
uint32_t draw_resolution_scale_y,
bool fixed_16_truncated_to_minus_1_to_1, bool fixed_16_truncated_to_minus_1_to_1,
ResolveInfo& info_out) { ResolveInfo& info_out) {
auto rb_copy_control = regs.Get<reg::RB_COPY_CONTROL>(); auto rb_copy_control = regs.Get<reg::RB_COPY_CONTROL>();
@ -775,7 +781,7 @@ bool GetResolveInfo(const RegisterFile& regs, const Memory& memory,
// Don't pass uninitialized values to shaders, not to leak data to frame // Don't pass uninitialized values to shaders, not to leak data to frame
// captures. // captures.
info_out.address.packed = 0; info_out.coordinate_info.packed = 0;
// Get the extent of pixels covered by the resolve rectangle, according to the // Get the extent of pixels covered by the resolve rectangle, according to the
// top-left rasterization rule. // top-left rasterization rule.
@ -884,15 +890,21 @@ bool GetResolveInfo(const RegisterFile& regs, const Memory& memory,
y1 = y0 + int32_t(xenos::kMaxResolveSize); y1 = y0 + int32_t(xenos::kMaxResolveSize);
} }
assert_true(x0 < x1 && y0 < y1);
if (x0 >= x1 || y0 >= y1) { if (x0 >= x1 || y0 >= y1) {
XELOGE("Resolve region is empty"); XELOGE("Resolve region is empty");
return false;
} }
assert_true(x0 <= x1 && y0 <= y1); info_out.coordinate_info.width_div_8 =
info_out.address.width_div_8 =
uint32_t(x1 - x0) >> xenos::kResolveAlignmentPixelsLog2; uint32_t(x1 - x0) >> xenos::kResolveAlignmentPixelsLog2;
info_out.address.height_div_8 = info_out.coordinate_info.height_div_8 =
uint32_t(y1 - y0) >> xenos::kResolveAlignmentPixelsLog2; uint32_t(y1 - y0) >> xenos::kResolveAlignmentPixelsLog2;
// 2 bits for each.
assert_true(draw_resolution_scale_x <= 3);
assert_true(draw_resolution_scale_y <= 3);
info_out.coordinate_info.draw_resolution_scale_x = draw_resolution_scale_x;
info_out.coordinate_info.draw_resolution_scale_y = draw_resolution_scale_y;
// Handle the destination. // Handle the destination.
bool is_depth = bool is_depth =
@ -909,7 +921,7 @@ bool GetResolveInfo(const RegisterFile& regs, const Memory& memory,
is_depth ? "depth" : "color", rb_copy_control.copy_sample_select, is_depth ? "depth" : "color", rb_copy_control.copy_sample_select,
sample_select); sample_select);
} }
info_out.address.copy_sample_select = sample_select; info_out.copy_dest_coordinate_info.copy_sample_select = sample_select;
// Get the format to pass to the shader in a unified way - for depth (for // Get the format to pass to the shader in a unified way - for depth (for
// which Direct3D 9 specifies the k_8_8_8_8 uint destination format), make // which Direct3D 9 specifies the k_8_8_8_8 uint destination format), make
// sure the shader won't try to do conversion - pass proper k_24_8 or // sure the shader won't try to do conversion - pass proper k_24_8 or
@ -946,96 +958,97 @@ bool GetResolveInfo(const RegisterFile& regs, const Memory& memory,
// Calculate the destination memory extent. // Calculate the destination memory extent.
uint32_t rb_copy_dest_base = regs[XE_GPU_REG_RB_COPY_DEST_BASE].u32; uint32_t rb_copy_dest_base = regs[XE_GPU_REG_RB_COPY_DEST_BASE].u32;
uint32_t copy_dest_base_adjusted = rb_copy_dest_base; uint32_t copy_dest_base_adjusted = rb_copy_dest_base;
uint32_t copy_dest_length; uint32_t copy_dest_extent_start, copy_dest_extent_end;
auto rb_copy_dest_pitch = regs.Get<reg::RB_COPY_DEST_PITCH>(); auto rb_copy_dest_pitch = regs.Get<reg::RB_COPY_DEST_PITCH>();
uint32_t copy_dest_pitch_aligned_div_32 = uint32_t copy_dest_pitch_aligned_div_32 =
(rb_copy_dest_pitch.copy_dest_pitch + (rb_copy_dest_pitch.copy_dest_pitch +
(xenos::kTextureTileWidthHeight - 1)) >> (xenos::kTextureTileWidthHeight - 1)) >>
xenos::kTextureTileWidthHeightLog2; xenos::kTextureTileWidthHeightLog2;
info_out.copy_dest_pitch_aligned.pitch_aligned_div_32 = info_out.copy_dest_coordinate_info.pitch_aligned_div_32 =
copy_dest_pitch_aligned_div_32; copy_dest_pitch_aligned_div_32;
info_out.copy_dest_pitch_aligned.height_aligned_div_32 = info_out.copy_dest_coordinate_info.height_aligned_div_32 =
(rb_copy_dest_pitch.copy_dest_height + (rb_copy_dest_pitch.copy_dest_height +
(xenos::kTextureTileWidthHeight - 1)) >> (xenos::kTextureTileWidthHeight - 1)) >>
xenos::kTextureTileWidthHeightLog2; xenos::kTextureTileWidthHeightLog2;
const FormatInfo& dest_format_info = *FormatInfo::Get(dest_format); const FormatInfo& dest_format_info = *FormatInfo::Get(dest_format);
if (is_depth || dest_format_info.type == FormatType::kResolvable) { if (is_depth || dest_format_info.type == FormatType::kResolvable) {
uint32_t bpp_log2 = xe::log2_floor(dest_format_info.bits_per_pixel >> 3); uint32_t bpp_log2 = xe::log2_floor(dest_format_info.bits_per_pixel >> 3);
xenos::DataDimension dest_dimension; uint32_t dest_base_relative_x_mask =
uint32_t dest_height, dest_depth; (UINT32_C(1) << xenos::GetTextureTiledXBaseGranularityLog2(
bool(rb_copy_dest_info.copy_dest_array), bpp_log2)) -
1;
uint32_t dest_base_relative_y_mask =
(UINT32_C(1) << xenos::GetTextureTiledYBaseGranularityLog2(
bool(rb_copy_dest_info.copy_dest_array), bpp_log2)) -
1;
info_out.copy_dest_coordinate_info.offset_x_div_8 =
(uint32_t(x0) & dest_base_relative_x_mask) >>
xenos::kResolveAlignmentPixelsLog2;
info_out.copy_dest_coordinate_info.offset_y_div_8 =
(uint32_t(y0) & dest_base_relative_y_mask) >>
xenos::kResolveAlignmentPixelsLog2;
uint32_t dest_base_x = uint32_t(x0) & ~dest_base_relative_x_mask;
uint32_t dest_base_y = uint32_t(y0) & ~dest_base_relative_y_mask;
if (rb_copy_dest_info.copy_dest_array) { if (rb_copy_dest_info.copy_dest_array) {
// The pointer is already adjusted to the Z / 8 (copy_dest_slice is // The base pointer is already adjusted to the Z / 8 (copy_dest_slice is
// 3-bit). // 3-bit).
copy_dest_base_adjusted += texture_util::GetTiledOffset3D( copy_dest_base_adjusted += texture_util::GetTiledOffset3D(
x0 & ~int32_t(xenos::kTextureTileWidthHeight - 1), int32_t(dest_base_x), int32_t(dest_base_y), 0,
y0 & ~int32_t(xenos::kTextureTileWidthHeight - 1), 0, rb_copy_dest_pitch.copy_dest_pitch,
rb_copy_dest_pitch.copy_dest_height, bpp_log2);
copy_dest_extent_start =
rb_copy_dest_base +
texture_util::GetTiledAddressLowerBound3D(
uint32_t(x0), uint32_t(y0), rb_copy_dest_info.copy_dest_slice,
rb_copy_dest_pitch.copy_dest_pitch,
rb_copy_dest_pitch.copy_dest_height, bpp_log2);
copy_dest_extent_end =
rb_copy_dest_base +
texture_util::GetTiledAddressUpperBound3D(
uint32_t(x1), uint32_t(y1), rb_copy_dest_info.copy_dest_slice + 1,
rb_copy_dest_pitch.copy_dest_pitch, rb_copy_dest_pitch.copy_dest_pitch,
rb_copy_dest_pitch.copy_dest_height, bpp_log2); rb_copy_dest_pitch.copy_dest_height, bpp_log2);
dest_dimension = xenos::DataDimension::k3D;
dest_height = rb_copy_dest_pitch.copy_dest_height;
// The pointer is only adjusted to Z / 8, but the texture may have a depth
// of (N % 8) <= 4, like 4, 12, 20 when rounded up to 4
// (xenos::kTextureTiledDepthGranularity), so provide Z + 1 to measure the
// size of the texture conservatively, but without going out of the upper
// bound (though this still may go out of bounds a bit probably if
// resolving to non-zero XY, but not sure if that really happens and
// actually causes issues).
dest_depth = rb_copy_dest_info.copy_dest_slice + 1;
} else { } else {
copy_dest_base_adjusted += texture_util::GetTiledOffset2D( copy_dest_base_adjusted += texture_util::GetTiledOffset2D(
x0 & ~int32_t(xenos::kTextureTileWidthHeight - 1), int32_t(dest_base_x), int32_t(dest_base_y),
y0 & ~int32_t(xenos::kTextureTileWidthHeight - 1), rb_copy_dest_pitch.copy_dest_pitch, bpp_log2);
copy_dest_extent_start =
rb_copy_dest_base + texture_util::GetTiledAddressLowerBound2D(
uint32_t(x0), uint32_t(y0),
rb_copy_dest_pitch.copy_dest_pitch, bpp_log2);
copy_dest_extent_end =
rb_copy_dest_base + texture_util::GetTiledAddressUpperBound2D(
uint32_t(x1), uint32_t(y1),
rb_copy_dest_pitch.copy_dest_pitch, bpp_log2); rb_copy_dest_pitch.copy_dest_pitch, bpp_log2);
dest_dimension = xenos::DataDimension::k2DOrStacked;
// RB_COPY_DEST_PITCH::copy_dest_height is the real texture height used
// for 3D texture pitch, it's not relative to 0,0 of the coordinate space
// (in 4D5307E6, the sniper rifle scope has copy_dest_height of 192, but
// the rectangle's Y is 64...256) - provide the real height of the
// rectangle since 32x32 tiles are stored linearly anyway. In addition,
// the height in RB_COPY_DEST_PITCH may be larger than needed - in
// 5454082B, a UI texture for the letterbox bars alpha is located within
// the range of a 1280x720 resolve target, so with resolution scaling it's
// also wrongly detected as scaled, while only 1280x208 is being resolved.
dest_height = uint32_t(y1 - y0);
dest_depth = 1;
} }
// Need a subregion size, not the full subresource size - thus not aligning
// to xenos::kTextureSubresourceAlignmentBytes.
copy_dest_length =
texture_util::GetGuestTextureLayout(
dest_dimension, copy_dest_pitch_aligned_div_32, uint32_t(x1 - x0),
dest_height, dest_depth, true, dest_format, false, true, 0)
.base.level_data_extent_bytes;
} else { } else {
XELOGE("Tried to resolve to format {}, which is not a ColorFormat", XELOGE("Tried to resolve to format {}, which is not a ColorFormat",
dest_format_info.name); dest_format_info.name);
copy_dest_length = 0; copy_dest_extent_start = copy_dest_base_adjusted;
copy_dest_extent_end = copy_dest_base_adjusted;
} }
assert_true(copy_dest_extent_start >= copy_dest_base_adjusted);
assert_true(copy_dest_extent_end >= copy_dest_base_adjusted);
assert_true(copy_dest_extent_end >= copy_dest_extent_start);
info_out.copy_dest_base = copy_dest_base_adjusted; info_out.copy_dest_base = copy_dest_base_adjusted;
info_out.copy_dest_length = copy_dest_length; info_out.copy_dest_extent_start = copy_dest_extent_start;
info_out.copy_dest_extent_length =
copy_dest_extent_end - copy_dest_extent_start;
// Offset to 160x32 (a multiple of both the EDRAM tile size and the texture // Offset relative to the beginning of the tile to put it in fewer bits.
// tile size), so the whole offset can be stored in a very small number of uint32_t sample_count_log2_x =
// bits, with bases adjusted instead. The destination pointer is already uint32_t(rb_surface_info.msaa_samples >= xenos::MsaaSamples::k4X);
// offset. uint32_t sample_count_log2_y =
uint32_t local_offset_x = uint32_t(x0) % 160; uint32_t(rb_surface_info.msaa_samples >= xenos::MsaaSamples::k2X);
uint32_t local_offset_y = uint32_t(y0) & 31; uint32_t x0_samples = uint32_t(x0) << sample_count_log2_x;
info_out.address.local_x_div_8 = uint32_t y0_samples = uint32_t(y0) << sample_count_log2_y;
local_offset_x >> xenos::kResolveAlignmentPixelsLog2; uint32_t base_offset_x_tiles = x0_samples / xenos::kEdramTileWidthSamples;
info_out.address.local_y_div_8 = uint32_t base_offset_y_tiles = y0_samples / xenos::kEdramTileHeightSamples;
local_offset_y >> xenos::kResolveAlignmentPixelsLog2; info_out.coordinate_info.edram_offset_x_div_8 =
uint32_t base_offset_x_samples = (x0_samples % xenos::kEdramTileWidthSamples) >> (sample_count_log2_x + 3);
(uint32_t(x0) - local_offset_x) info_out.coordinate_info.edram_offset_y_div_8 =
<< uint32_t(rb_surface_info.msaa_samples >= xenos::MsaaSamples::k4X); (y0_samples % xenos::kEdramTileHeightSamples) >>
uint32_t base_offset_x_tiles = (sample_count_log2_y + 3);
(base_offset_x_samples + (xenos::kEdramTileWidthSamples - 1)) /
xenos::kEdramTileWidthSamples;
uint32_t base_offset_y_samples =
(uint32_t(y0) - local_offset_y)
<< uint32_t(rb_surface_info.msaa_samples >= xenos::MsaaSamples::k2X);
uint32_t base_offset_y_tiles =
(base_offset_y_samples + (xenos::kEdramTileHeightSamples - 1)) /
xenos::kEdramTileHeightSamples;
uint32_t surface_pitch_tiles = xenos::GetSurfacePitchTiles( uint32_t surface_pitch_tiles = xenos::GetSurfacePitchTiles(
rb_surface_info.surface_pitch, rb_surface_info.msaa_samples, false); rb_surface_info.surface_pitch, rb_surface_info.msaa_samples, false);
uint32_t edram_base_offset_tiles = uint32_t edram_base_offset_tiles =
@ -1043,11 +1056,11 @@ bool GetResolveInfo(const RegisterFile& regs, const Memory& memory,
// Write the color/depth EDRAM info. // Write the color/depth EDRAM info.
bool duplicate_second_pixel = bool duplicate_second_pixel =
is_resolution_scaled && (draw_resolution_scale_x > 1 || draw_resolution_scale_y > 1) &&
cvars::resolve_resolution_scale_duplicate_second_pixel && cvars::resolve_resolution_scale_duplicate_second_pixel &&
cvars::half_pixel_offset && !regs.Get<reg::PA_SU_VTX_CNTL>().pix_center; cvars::half_pixel_offset && !regs.Get<reg::PA_SU_VTX_CNTL>().pix_center;
int32_t exp_bias = is_depth ? 0 : rb_copy_dest_info.copy_dest_exp_bias; int32_t exp_bias = is_depth ? 0 : rb_copy_dest_info.copy_dest_exp_bias;
ResolveEdramPackedInfo depth_edram_info; ResolveEdramInfo depth_edram_info;
depth_edram_info.packed = 0; depth_edram_info.packed = 0;
if (is_depth || rb_copy_control.depth_clear_enable) { if (is_depth || rb_copy_control.depth_clear_enable) {
depth_edram_info.pitch_tiles = surface_pitch_tiles; depth_edram_info.pitch_tiles = surface_pitch_tiles;
@ -1063,7 +1076,7 @@ bool GetResolveInfo(const RegisterFile& regs, const Memory& memory,
info_out.depth_original_base = 0; info_out.depth_original_base = 0;
} }
info_out.depth_edram_info = depth_edram_info; info_out.depth_edram_info = depth_edram_info;
ResolveEdramPackedInfo color_edram_info; ResolveEdramInfo color_edram_info;
color_edram_info.packed = 0; color_edram_info.packed = 0;
if (!is_depth) { if (!is_depth) {
// Color. // Color.
@ -1113,15 +1126,15 @@ bool GetResolveInfo(const RegisterFile& regs, const Memory& memory,
info_out.rb_color_clear_lo = regs[XE_GPU_REG_RB_COLOR_CLEAR_LO].u32; info_out.rb_color_clear_lo = regs[XE_GPU_REG_RB_COLOR_CLEAR_LO].u32;
XELOGD( XELOGD(
"Resolve: {},{} <= x,y < {},{}, {} -> {} at 0x{:08X} (first tile at " "Resolve: {},{} <= x,y < {},{}, {} -> {} at 0x{:08X} (potentially "
"0x{:08X}, length 0x{:08X})", "modified memory range 0x{:08X} to 0x{:08X})",
x0, y0, x1, y1, x0, y0, x1, y1,
is_depth ? xenos::GetDepthRenderTargetFormatName( is_depth ? xenos::GetDepthRenderTargetFormatName(
xenos::DepthRenderTargetFormat(depth_edram_info.format)) xenos::DepthRenderTargetFormat(depth_edram_info.format))
: xenos::GetColorRenderTargetFormatName( : xenos::GetColorRenderTargetFormatName(
xenos::ColorRenderTargetFormat(color_edram_info.format)), xenos::ColorRenderTargetFormat(color_edram_info.format)),
dest_format_info.name, rb_copy_dest_base, copy_dest_base_adjusted, dest_format_info.name, rb_copy_dest_base, copy_dest_extent_start,
copy_dest_length); copy_dest_extent_end);
return true; return true;
} }
@ -1132,12 +1145,11 @@ ResolveCopyShaderIndex ResolveInfo::GetCopyShader(
uint32_t& group_count_y_out) const { uint32_t& group_count_y_out) const {
ResolveCopyShaderIndex shader = ResolveCopyShaderIndex::kUnknown; ResolveCopyShaderIndex shader = ResolveCopyShaderIndex::kUnknown;
bool is_depth = IsCopyingDepth(); bool is_depth = IsCopyingDepth();
ResolveEdramPackedInfo edram_info = ResolveEdramInfo edram_info = is_depth ? depth_edram_info : color_edram_info;
is_depth ? depth_edram_info : color_edram_info;
bool source_is_64bpp = !is_depth && color_edram_info.format_is_64bpp != 0; bool source_is_64bpp = !is_depth && color_edram_info.format_is_64bpp != 0;
if (is_depth || if (is_depth || (!copy_dest_info.copy_dest_exp_bias &&
(!copy_dest_info.copy_dest_exp_bias && xenos::IsSingleCopySampleSelected(
xenos::IsSingleCopySampleSelected(address.copy_sample_select) && copy_dest_coordinate_info.copy_sample_select) &&
xenos::IsColorResolveFormatBitwiseEquivalent( xenos::IsColorResolveFormatBitwiseEquivalent(
xenos::ColorRenderTargetFormat(color_edram_info.format), xenos::ColorRenderTargetFormat(color_edram_info.format),
xenos::ColorFormat(copy_dest_info.copy_dest_format)))) { xenos::ColorFormat(copy_dest_info.copy_dest_format)))) {
@ -1173,17 +1185,17 @@ ResolveCopyShaderIndex ResolveInfo::GetCopyShader(
} }
constants_out.dest_relative.edram_info = edram_info; constants_out.dest_relative.edram_info = edram_info;
constants_out.dest_relative.address_info = address; constants_out.dest_relative.coordinate_info = coordinate_info;
constants_out.dest_relative.dest_info = copy_dest_info; constants_out.dest_relative.dest_info = copy_dest_info;
constants_out.dest_relative.dest_pitch_aligned = copy_dest_pitch_aligned; constants_out.dest_relative.dest_coordinate_info = copy_dest_coordinate_info;
constants_out.dest_base = copy_dest_base; constants_out.dest_base = copy_dest_base;
if (shader != ResolveCopyShaderIndex::kUnknown) { if (shader != ResolveCopyShaderIndex::kUnknown) {
uint32_t width = uint32_t width =
(address.width_div_8 << xenos::kResolveAlignmentPixelsLog2) * (coordinate_info.width_div_8 << xenos::kResolveAlignmentPixelsLog2) *
draw_resolution_scale_x; draw_resolution_scale_x;
uint32_t height = uint32_t height =
(address.height_div_8 << xenos::kResolveAlignmentPixelsLog2) * (coordinate_info.height_div_8 << xenos::kResolveAlignmentPixelsLog2) *
draw_resolution_scale_y; draw_resolution_scale_y;
const ResolveCopyShaderInfo& shader_info = const ResolveCopyShaderInfo& shader_info =
resolve_copy_shader_info[size_t(shader)]; resolve_copy_shader_info[size_t(shader)];

View File

@ -268,7 +268,7 @@ xenos::CopySampleSelect SanitizeCopySampleSelect(
// Packed structures are small and can be passed to the shaders in root/push // Packed structures are small and can be passed to the shaders in root/push
// constants. // constants.
union ResolveEdramPackedInfo { union ResolveEdramInfo {
uint32_t packed; uint32_t packed;
struct { struct {
// With 32bpp/64bpp taken into account. // With 32bpp/64bpp taken into account.
@ -283,30 +283,19 @@ union ResolveEdramPackedInfo {
// the impact of the half-pixel offset with resolution scaling. // the impact of the half-pixel offset with resolution scaling.
uint32_t duplicate_second_pixel : 1; uint32_t duplicate_second_pixel : 1;
}; };
ResolveEdramPackedInfo() : packed(0) { ResolveEdramInfo() : packed(0) { static_assert_size(*this, sizeof(packed)); }
static_assert_size(*this, sizeof(packed));
}
}; };
static_assert(sizeof(ResolveEdramPackedInfo) <= sizeof(uint32_t),
"ResolveEdramPackedInfo must be packable in uint32_t");
union ResolveAddressPackedInfo { union ResolveCoordinateInfo {
uint32_t packed; uint32_t packed;
struct { struct {
// 160x32 is divisible by both the EDRAM tile size (80x16 samples, but for // In pixels relatively to the origin of the EDRAM base tile.
// simplicity, this is in pixels) and the texture tile size (32x32), so // 0...9 for 0...72.
// the X and Y offsets can be packed in a very small number of bits (also uint32_t edram_offset_x_div_8 : 4;
// taking 8x8 granularity into account) if the offset of the 160x32 region // 0...1 for 0...8.
// itself, and the offset of the texture tile, are pre-added to the bases. uint32_t edram_offset_y_div_8 : 1;
// In the EDRAM source, the whole offset is relative to the base. // In pixels.
// In the texture, & 31 of the offset is relative to the base (the base is
// adjusted to 32x32 tiles).
// 0...19 for 0...152.
uint32_t local_x_div_8 : 5;
// 0...3 for 0...24.
uint32_t local_y_div_8 : 2;
// May be zero if the original rectangle was somehow specified in a // May be zero if the original rectangle was somehow specified in a
// totally broken way - in this case, the resolve must be dropped. // totally broken way - in this case, the resolve must be dropped.
uint32_t width_div_8 : xenos::kResolveSizeBits - uint32_t width_div_8 : xenos::kResolveSizeBits -
@ -314,23 +303,23 @@ union ResolveAddressPackedInfo {
uint32_t height_div_8 : xenos::kResolveSizeBits - uint32_t height_div_8 : xenos::kResolveSizeBits -
xenos::kResolveAlignmentPixelsLog2; xenos::kResolveAlignmentPixelsLog2;
xenos::CopySampleSelect copy_sample_select : 3; // 1 to 3.
uint32_t draw_resolution_scale_x : 2;
uint32_t draw_resolution_scale_y : 2;
}; };
ResolveAddressPackedInfo() : packed(0) { ResolveCoordinateInfo() : packed(0) {
static_assert_size(*this, sizeof(packed)); static_assert_size(*this, sizeof(packed));
} }
}; };
static_assert(sizeof(ResolveAddressPackedInfo) <= sizeof(uint32_t),
"ResolveAddressPackedInfo must be packable in uint32_t");
// Returns tiles actually covered by a resolve area. Row length used is width of // Returns tiles actually covered by a resolve area. Row length used is width of
// the area in tiles, but the pitch between rows is edram_info.pitch_tiles. // the area in tiles, but the pitch between rows is edram_info.pitch_tiles.
void GetResolveEdramTileSpan(ResolveEdramPackedInfo edram_info, void GetResolveEdramTileSpan(ResolveEdramInfo edram_info,
ResolveAddressPackedInfo address_info, ResolveCoordinateInfo coordinate_info,
uint32_t& base_out, uint32_t& row_length_used_out, uint32_t& base_out, uint32_t& row_length_used_out,
uint32_t& rows_out); uint32_t& rows_out);
union ResolveCopyDestPitchPackedInfo { union ResolveCopyDestCoordinateInfo {
uint32_t packed; uint32_t packed;
struct { struct {
// 0...16384/32. // 0...16384/32.
@ -338,8 +327,15 @@ union ResolveCopyDestPitchPackedInfo {
2 - xenos::kTextureTileWidthHeightLog2; 2 - xenos::kTextureTileWidthHeightLog2;
uint32_t height_aligned_div_32 : xenos::kTexture2DCubeMaxWidthHeightLog2 + uint32_t height_aligned_div_32 : xenos::kTexture2DCubeMaxWidthHeightLog2 +
2 - xenos::kTextureTileWidthHeightLog2; 2 - xenos::kTextureTileWidthHeightLog2;
// Up to the maximum period of the texture tiled address function (128x128
// for 2D 1bpb).
uint32_t offset_x_div_8 : 7 - xenos::kResolveAlignmentPixelsLog2;
uint32_t offset_y_div_8 : 7 - xenos::kResolveAlignmentPixelsLog2;
xenos::CopySampleSelect copy_sample_select : 3;
}; };
ResolveCopyDestPitchPackedInfo() : packed(0) { ResolveCopyDestCoordinateInfo() : packed(0) {
static_assert_size(*this, sizeof(packed)); static_assert_size(*this, sizeof(packed));
} }
}; };
@ -374,7 +370,8 @@ struct ResolveCopyShaderInfo {
// shader (at least 2). // shader (at least 2).
uint32_t source_bpe_log2; uint32_t source_bpe_log2;
// Log2 of bytes per element of the type of the destination buffer bound to // Log2 of bytes per element of the type of the destination buffer bound to
// the shader (at least 2 because of Nvidia's 128 megatexel limit that // the shader (at least 2 because of the 128 megatexel minimum requirement on
// Direct3D 10+ - D3D12_REQ_BUFFER_RESOURCE_TEXEL_COUNT_2_TO_EXP - that
// prevents binding the entire shared memory buffer with smaller element // prevents binding the entire shared memory buffer with smaller element
// sizes). // sizes).
uint32_t dest_bpe_log2; uint32_t dest_bpe_log2;
@ -391,10 +388,10 @@ struct ResolveCopyShaderConstants {
// memory buffer - with resoluion scaling, for instance), only the // memory buffer - with resoluion scaling, for instance), only the
// DestRelative part may be passed to the shader to use less constants. // DestRelative part may be passed to the shader to use less constants.
struct DestRelative { struct DestRelative {
ResolveEdramPackedInfo edram_info; ResolveEdramInfo edram_info;
ResolveAddressPackedInfo address_info; ResolveCoordinateInfo coordinate_info;
reg::RB_COPY_DEST_INFO dest_info; reg::RB_COPY_DEST_INFO dest_info;
ResolveCopyDestPitchPackedInfo dest_pitch_aligned; ResolveCopyDestCoordinateInfo dest_coordinate_info;
}; };
DestRelative dest_relative; DestRelative dest_relative;
uint32_t dest_base; uint32_t dest_base;
@ -405,10 +402,10 @@ struct ResolveClearShaderConstants {
// be preserved in the root bindings when going from depth to color. // be preserved in the root bindings when going from depth to color.
struct RenderTargetSpecific { struct RenderTargetSpecific {
uint32_t clear_value[2]; uint32_t clear_value[2];
ResolveEdramPackedInfo edram_info; ResolveEdramInfo edram_info;
}; };
RenderTargetSpecific rt_specific; RenderTargetSpecific rt_specific;
ResolveAddressPackedInfo address_info; ResolveCoordinateInfo coordinate_info;
}; };
struct ResolveInfo { struct ResolveInfo {
@ -417,27 +414,31 @@ struct ResolveInfo {
// depth_edram_info / depth_original_base and color_edram_info / // depth_edram_info / depth_original_base and color_edram_info /
// color_original_base are set up if copying or clearing color and depth // color_original_base are set up if copying or clearing color and depth
// respectively, according to RB_COPY_CONTROL. // respectively, according to RB_COPY_CONTROL.
ResolveEdramPackedInfo depth_edram_info; ResolveEdramInfo depth_edram_info;
ResolveEdramPackedInfo color_edram_info; ResolveEdramInfo color_edram_info;
// Original bases, without adjustment to a 160x32 region for packed offsets, // Original bases, without adjustment to a 160x32 region for packed offsets,
// for locating host render targets to perform clears if host render targets // for locating host render targets to perform clears if host render targets
// are used for EDRAM emulation - the same as the base that the render target // are used for EDRAM emulation - the same as the base that the render target
// will likely used for drawing next, to prevent unneeded tile ownership // will likely be used for drawing next, to prevent unneeded tile ownership
// transfers between clears and first usage if clearing a subregion. // transfers between clears and first usage if clearing a subregion.
uint32_t depth_original_base; uint32_t depth_original_base;
uint32_t color_original_base; uint32_t color_original_base;
ResolveAddressPackedInfo address; ResolveCoordinateInfo coordinate_info;
reg::RB_COPY_DEST_INFO copy_dest_info; reg::RB_COPY_DEST_INFO copy_dest_info;
ResolveCopyDestPitchPackedInfo copy_dest_pitch_aligned; ResolveCopyDestCoordinateInfo copy_dest_coordinate_info;
// Memory range that will potentially be modified by copying, with // The address of the texture or the location within the texture that
// address.local_x/y_div_8 & 31 being the origin relative to it. // copy_dest_coordinate_info.offset_x/y_div_8 - the origin of the copy
// destination - is relative to.
uint32_t copy_dest_base; uint32_t copy_dest_base;
// May be zero if something is wrong with the destination, in this case, // Memory range that will potentially be modified by copying to the texture.
// clearing may still be done, but copying must be dropped. // copy_dest_extent_length may be zero if something is wrong with the
uint32_t copy_dest_length; // destination, in this case, clearing may still be done, but copying must be
// dropped.
uint32_t copy_dest_extent_start;
uint32_t copy_dest_extent_length;
// The clear shaders always write to a uint4 view of EDRAM. // The clear shaders always write to a uint4 view of EDRAM.
uint32_t rb_depth_clear; uint32_t rb_depth_clear;
@ -451,10 +452,10 @@ struct ResolveInfo {
// See GetResolveEdramTileSpan documentation for explanation. // See GetResolveEdramTileSpan documentation for explanation.
void GetCopyEdramTileSpan(uint32_t& base_out, uint32_t& row_length_used_out, void GetCopyEdramTileSpan(uint32_t& base_out, uint32_t& row_length_used_out,
uint32_t& rows_out, uint32_t& pitch_out) const { uint32_t& rows_out, uint32_t& pitch_out) const {
ResolveEdramPackedInfo edram_info = ResolveEdramInfo edram_info =
IsCopyingDepth() ? depth_edram_info : color_edram_info; IsCopyingDepth() ? depth_edram_info : color_edram_info;
GetResolveEdramTileSpan(edram_info, address, base_out, row_length_used_out, GetResolveEdramTileSpan(edram_info, coordinate_info, base_out,
rows_out); row_length_used_out, rows_out);
pitch_out = edram_info.pitch_tiles; pitch_out = edram_info.pitch_tiles;
} }
@ -477,7 +478,7 @@ struct ResolveInfo {
constants_out.rt_specific.clear_value[0] = rb_depth_clear; constants_out.rt_specific.clear_value[0] = rb_depth_clear;
constants_out.rt_specific.clear_value[1] = rb_depth_clear; constants_out.rt_specific.clear_value[1] = rb_depth_clear;
constants_out.rt_specific.edram_info = depth_edram_info; constants_out.rt_specific.edram_info = depth_edram_info;
constants_out.address_info = address; constants_out.coordinate_info = coordinate_info;
} }
void GetColorClearShaderConstants( void GetColorClearShaderConstants(
@ -490,15 +491,15 @@ struct ResolveInfo {
constants_out.rt_specific.clear_value[0] = rb_color_clear; constants_out.rt_specific.clear_value[0] = rb_color_clear;
constants_out.rt_specific.clear_value[1] = rb_color_clear_lo; constants_out.rt_specific.clear_value[1] = rb_color_clear_lo;
constants_out.rt_specific.edram_info = color_edram_info; constants_out.rt_specific.edram_info = color_edram_info;
constants_out.address_info = address; constants_out.coordinate_info = coordinate_info;
} }
std::pair<uint32_t, uint32_t> GetClearShaderGroupCount( std::pair<uint32_t, uint32_t> GetClearShaderGroupCount(
uint32_t draw_resolution_scale_x, uint32_t draw_resolution_scale_x,
uint32_t draw_resolution_scale_y) const { uint32_t draw_resolution_scale_y) const {
// 8 guest MSAA samples per invocation. // 8 guest MSAA samples per invocation.
uint32_t width_samples_div_8 = address.width_div_8; uint32_t width_samples_div_8 = coordinate_info.width_div_8;
uint32_t height_samples_div_8 = address.height_div_8; uint32_t height_samples_div_8 = coordinate_info.height_div_8;
xenos::MsaaSamples samples = IsCopyingDepth() xenos::MsaaSamples samples = IsCopyingDepth()
? depth_edram_info.msaa_samples ? depth_edram_info.msaa_samples
: color_edram_info.msaa_samples; : color_edram_info.msaa_samples;
@ -521,22 +522,11 @@ struct ResolveInfo {
// emulated as snorm, with range limited to -1...1, but with correct blending // emulated as snorm, with range limited to -1...1, but with correct blending
// within that range. // within that range.
bool GetResolveInfo(const RegisterFile& regs, const Memory& memory, bool GetResolveInfo(const RegisterFile& regs, const Memory& memory,
TraceWriter& trace_writer, bool is_resolution_scaled, TraceWriter& trace_writer, uint32_t draw_resolution_scale_x,
uint32_t draw_resolution_scale_y,
bool fixed_16_truncated_to_minus_1_to_1, bool fixed_16_truncated_to_minus_1_to_1,
ResolveInfo& info_out); ResolveInfo& info_out);
union ResolveResolutionScaleConstant {
uint32_t packed;
struct {
// 1 to 3.
uint32_t resolution_scale_x : 2;
uint32_t resolution_scale_y : 2;
};
ResolveResolutionScaleConstant() : packed(0) {
static_assert_size(*this, sizeof(packed));
}
};
// Taking user configuration - stretching or letterboxing, overscan region to // Taking user configuration - stretching or letterboxing, overscan region to
// crop to fill while maintaining the aspect ratio - into account, returns the // crop to fill while maintaining the aspect ratio - into account, returns the
// area where the frame should be presented in the host window. // area where the frame should be presented in the host window.

View File

@ -18,12 +18,13 @@ namespace gpu {
using namespace ucode; using namespace ucode;
// TODO(Triang3l): Support sub-dword memexports (like k_8 in 58410B86). This // TODO(Triang3l): Support sub-dword memexports (like k_8 in 58410B86). This
// would require four 128 MB R8_UINT UAVs due to the Nvidia addressing limit. // would require four 128 MB R8_UINT UAVs due to
// Need to be careful with resource binding tiers, however. Resource binding // D3D12_REQ_BUFFER_RESOURCE_TEXEL_COUNT_2_TO_EXP. Need to be careful with
// tier 1 on feature level 11_0 allows only 8 UAVs _across all stages_. // resource binding tiers, however. Resource binding tier 1 on feature level
// RWByteAddressBuffer + 4 typed buffers is 5 per stage already, would need 10 // 11_0 allows only 8 UAVs _across all stages_. RWByteAddressBuffer + 4 typed
// for both VS and PS, or even 11 with the eDRAM ROV. Need to drop draw commands // buffers is 5 per stage already, would need 10 for both VS and PS, or even 11
// doing memexport in both VS and PS on FL 11_0 resource binding tier 1. // with the eDRAM ROV. Need to drop draw commands doing memexport in both VS and
// PS on FL 11_0 resource binding tier 1.
void DxbcShaderTranslator::ExportToMemory_PackFixed32( void DxbcShaderTranslator::ExportToMemory_PackFixed32(
const uint32_t* eM_temps, uint32_t eM_count, const uint32_t bits[4], const uint32_t* eM_temps, uint32_t eM_count, const uint32_t bits[4],

View File

@ -703,9 +703,9 @@ bool PrimitiveProcessor::Process(ProcessingResult& result_out) {
// Does not need indirection on backends not supporting full 32-bit // Does not need indirection on backends not supporting full 32-bit
// indices. // indices.
if (guest_primitive_reset_index_guest_endian != UINT16_MAX) { if (guest_primitive_reset_index_guest_endian != UINT16_MAX) {
// If primitive reset is with a non-0xFFFF index is used, replace // If primitive reset with a non-0xFFFF index is used, replace with
// with 0xFFFF if 0xFFFF is not used as a real index, or with // 0xFFFF if 0xFFFF is not used as a real index, or with 0xFFFFFFFF
// 0xFFFFFFFF if it is. // if it is.
// Writing to the trace irrespective of the cache lookup result // Writing to the trace irrespective of the cache lookup result
// because cache behavior depends on runtime configuration and // because cache behavior depends on runtime configuration and
// state. // state.

View File

@ -1002,18 +1002,18 @@ bool RenderTargetCache::PrepareHostRenderTargetsResolveClear(
std::min((base_offset_tiles_at_32bpp - std::min((base_offset_tiles_at_32bpp -
base_offset_rows_at_32bpp * pitch_tiles_at_32bpp) * base_offset_rows_at_32bpp * pitch_tiles_at_32bpp) *
(xenos::kEdramTileWidthSamples >> msaa_samples_x_log2) + (xenos::kEdramTileWidthSamples >> msaa_samples_x_log2) +
resolve_info.address.local_x_div_8 * uint32_t(8), (resolve_info.coordinate_info.edram_offset_x_div_8 << 3),
pitch_pixels); pitch_pixels);
clear_rectangle.y_pixels = clear_rectangle.y_pixels =
std::min(base_offset_rows_at_32bpp * std::min(base_offset_rows_at_32bpp *
(xenos::kEdramTileHeightSamples >> msaa_samples_y_log2) + (xenos::kEdramTileHeightSamples >> msaa_samples_y_log2) +
resolve_info.address.local_y_div_8 * uint32_t(8), (resolve_info.coordinate_info.edram_offset_y_div_8 << 3),
render_target_height_pixels); render_target_height_pixels);
clear_rectangle.width_pixels = clear_rectangle.width_pixels =
std::min(resolve_info.address.width_div_8 * uint32_t(8), std::min(resolve_info.coordinate_info.width_div_8 << 3,
pitch_pixels - clear_rectangle.x_pixels); pitch_pixels - clear_rectangle.x_pixels);
clear_rectangle.height_pixels = clear_rectangle.height_pixels =
std::min(resolve_info.address.height_div_8 * uint32_t(8), std::min(resolve_info.coordinate_info.height_div_8 << 3,
render_target_height_pixels - clear_rectangle.y_pixels); render_target_height_pixels - clear_rectangle.y_pixels);
if (!clear_rectangle.width_pixels || !clear_rectangle.height_pixels) { if (!clear_rectangle.width_pixels || !clear_rectangle.height_pixels) {
// Outside the pitch / height (or initially specified as 0). // Outside the pitch / height (or initially specified as 0).

View File

@ -10,7 +10,7 @@
// //
// uint2 xe_resolve_clear_value; // Offset: 0 Size: 8 // uint2 xe_resolve_clear_value; // Offset: 0 Size: 8
// uint xe_resolve_edram_info; // Offset: 8 Size: 4 // uint xe_resolve_edram_info; // Offset: 8 Size: 4
// uint xe_resolve_address_info; // Offset: 12 Size: 4 // uint xe_resolve_coordinate_info; // Offset: 12 Size: 4
// //
// } // }
// //
@ -42,7 +42,7 @@ dcl_uav_typed_buffer (uint,uint,uint,uint) U0[0:0], space=0
dcl_input vThreadID.xy dcl_input vThreadID.xy
dcl_temps 3 dcl_temps 3
dcl_thread_group 8, 8, 1 dcl_thread_group 8, 8, 1
ubfe r0.xy, l(2, 11, 0, 0), l(10, 7, 0, 0), CB0[0][0].zwzz ubfe r0.xy, l(2, 11, 0, 0), l(10, 5, 0, 0), CB0[0][0].zwzz
uge r0.xz, r0.xxxx, l(2, 0, 1, 0) uge r0.xz, r0.xxxx, l(2, 0, 1, 0)
and r0.w, r0.x, l(1) and r0.w, r0.x, l(1)
ishl r0.y, r0.y, r0.w ishl r0.y, r0.y, r0.w
@ -51,10 +51,10 @@ if_nz r0.y
ret ret
endif endif
ishl r1.x, vThreadID.x, l(3) ishl r1.x, vThreadID.x, l(3)
ushr r2.y, CB0[0][0].w, l(5) ushr r2.y, CB0[0][0].w, l(4)
movc r0.xy, r0.xzxx, l(4,4,0,0), l(3,3,0,0) movc r0.xy, r0.xzxx, l(4,4,0,0), l(3,3,0,0)
mov r2.x, CB0[0][0].w mov r2.x, CB0[0][0].w
bfi r0.xy, l(5, 2, 0, 0), r0.xyxx, r2.xyxx, l(0, 0, 0, 0) bfi r0.xy, l(4, 1, 0, 0), r0.xyxx, r2.xyxx, l(0, 0, 0, 0)
mov r1.y, vThreadID.y mov r1.y, vThreadID.y
iadd r0.xy, r0.xyxx, r1.xyxx iadd r0.xy, r0.xyxx, r1.xyxx
ubfe r0.z, l(12), l(13), CB0[0][0].z ubfe r0.z, l(12), l(13), CB0[0][0].z
@ -80,21 +80,21 @@ ret
const BYTE resolve_clear_32bpp_cs[] = const BYTE resolve_clear_32bpp_cs[] =
{ {
68, 88, 66, 67, 226, 247, 68, 88, 66, 67, 219, 244,
125, 160, 57, 195, 118, 226, 64, 144, 53, 73, 227, 233,
52, 138, 250, 148, 103, 90, 8, 169, 113, 179, 32, 211,
91, 213, 1, 0, 0, 0, 102, 194, 1, 0, 0, 0,
120, 7, 0, 0, 5, 0, 124, 7, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0, 0, 0, 52, 0, 0, 0,
64, 2, 0, 0, 80, 2, 68, 2, 0, 0, 84, 2,
0, 0, 96, 2, 0, 0, 0, 0, 100, 2, 0, 0,
220, 6, 0, 0, 82, 68, 224, 6, 0, 0, 82, 68,
69, 70, 4, 2, 0, 0, 69, 70, 8, 2, 0, 0,
1, 0, 0, 0, 176, 0, 1, 0, 0, 0, 176, 0,
0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0,
60, 0, 0, 0, 1, 5, 60, 0, 0, 0, 1, 5,
83, 67, 0, 5, 0, 0, 83, 67, 0, 5, 0, 0,
220, 1, 0, 0, 19, 19, 223, 1, 0, 0, 19, 19,
68, 37, 60, 0, 0, 0, 68, 37, 60, 0, 0, 0,
24, 0, 0, 0, 40, 0, 24, 0, 0, 0, 40, 0,
0, 0, 40, 0, 0, 0, 0, 0, 40, 0, 0, 0,
@ -167,219 +167,231 @@ const BYTE resolve_clear_32bpp_cs[] =
0, 0, 0, 0, 154, 1, 0, 0, 0, 0, 154, 1,
0, 0, 120, 101, 95, 114, 0, 0, 120, 101, 95, 114,
101, 115, 111, 108, 118, 101, 101, 115, 111, 108, 118, 101,
95, 97, 100, 100, 114, 101, 95, 99, 111, 111, 114, 100,
115, 115, 95, 105, 110, 102, 105, 110, 97, 116, 101, 95,
111, 0, 77, 105, 99, 114, 105, 110, 102, 111, 0, 77,
111, 115, 111, 102, 116, 32, 105, 99, 114, 111, 115, 111,
40, 82, 41, 32, 72, 76, 102, 116, 32, 40, 82, 41,
83, 76, 32, 83, 104, 97, 32, 72, 76, 83, 76, 32,
100, 101, 114, 32, 67, 111, 83, 104, 97, 100, 101, 114,
109, 112, 105, 108, 101, 114, 32, 67, 111, 109, 112, 105,
32, 49, 48, 46, 49, 0, 108, 101, 114, 32, 49, 48,
73, 83, 71, 78, 8, 0, 46, 49, 0, 171, 73, 83,
0, 0, 0, 0, 0, 0,
8, 0, 0, 0, 79, 83,
71, 78, 8, 0, 0, 0, 71, 78, 8, 0, 0, 0,
0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 0,
0, 0, 83, 72, 69, 88, 0, 0, 79, 83, 71, 78,
116, 4, 0, 0, 81, 0, 8, 0, 0, 0, 0, 0,
5, 0, 29, 1, 0, 0, 0, 0, 8, 0, 0, 0,
106, 8, 0, 1, 89, 0, 83, 72, 69, 88, 116, 4,
0, 7, 70, 142, 48, 0, 0, 0, 81, 0, 5, 0,
29, 1, 0, 0, 106, 8,
0, 1, 89, 0, 0, 7,
70, 142, 48, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 156, 8, 0, 7, 70, 238,
0, 0, 156, 8, 0, 7, 49, 0, 0, 0, 0, 0,
70, 238, 49, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 68, 68, 0, 0, 68, 68, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 0,
95, 0, 0, 2, 50, 0, 0, 2, 50, 0, 2, 0,
2, 0, 104, 0, 0, 2, 104, 0, 0, 2, 3, 0,
3, 0, 0, 0, 155, 0, 0, 0, 155, 0, 0, 4,
0, 4, 8, 0, 0, 0, 8, 0, 0, 0, 8, 0,
8, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,
0, 0, 138, 0, 0, 17, 138, 0, 0, 17, 50, 0,
50, 0, 16, 0, 0, 0,
0, 0, 2, 64, 0, 0,
2, 0, 0, 0, 11, 0,
0, 0, 0, 0, 0, 0,
0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, 0, 0, 0, 10, 0, 0, 0, 8, 0,
0, 0, 6, 128, 48, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
62, 0, 0, 1, 83, 84,
65, 84, 148, 0, 0, 0,
33, 0, 0, 0, 3, 0,
0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0,
0, 0, 10, 0, 0, 0,
8, 0, 0, 0, 2, 0,
0, 0, 2, 0, 0, 0, 0, 0, 2, 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, 2, 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,
@ -387,16 +399,5 @@ const BYTE resolve_clear_32bpp_cs[] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 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,
2, 0, 0, 0
}; };

View File

@ -10,14 +10,7 @@
// //
// uint2 xe_resolve_clear_value; // Offset: 0 Size: 8 // uint2 xe_resolve_clear_value; // Offset: 0 Size: 8
// uint xe_resolve_edram_info; // Offset: 8 Size: 4 // uint xe_resolve_edram_info; // Offset: 8 Size: 4
// uint xe_resolve_address_info; // Offset: 12 Size: 4 // uint xe_resolve_coordinate_info; // Offset: 12 Size: 4
//
// }
//
// cbuffer XeResolveResolutionScaleConstant
// {
//
// uint xe_resolve_resolution_scale; // Offset: 0 Size: 4
// //
// } // }
// //
@ -28,7 +21,6 @@
// ------------------------------ ---------- ------- ----------- ------- -------------- ------ // ------------------------------ ---------- ------- ----------- ------- -------------- ------
// xe_resolve_dest UAV uint4 buf U0 u0 1 // xe_resolve_dest UAV uint4 buf U0 u0 1
// XeResolveConstants cbuffer NA NA CB0 cb0 1 // XeResolveConstants cbuffer NA NA CB0 cb0 1
// XeResolveResolutionScaleConstant cbuffer NA NA CB1 cb1 1
// //
// //
// //
@ -46,136 +38,115 @@
cs_5_1 cs_5_1
dcl_globalFlags refactoringAllowed dcl_globalFlags refactoringAllowed
dcl_constantbuffer CB0[0:0][1], immediateIndexed, space=0 dcl_constantbuffer CB0[0:0][1], immediateIndexed, space=0
dcl_constantbuffer CB1[1:1][1], immediateIndexed, space=0
dcl_uav_typed_buffer (uint,uint,uint,uint) U0[0:0], space=0 dcl_uav_typed_buffer (uint,uint,uint,uint) U0[0:0], space=0
dcl_input vThreadID.xy dcl_input vThreadID.xy
dcl_temps 3 dcl_temps 3
dcl_thread_group 8, 8, 1 dcl_thread_group 8, 8, 1
ubfe r0.xy, l(2, 11, 0, 0), l(10, 7, 0, 0), CB0[0][0].zwzz ubfe r0.xyz, l(2, 11, 2, 0), l(10, 5, 27, 0), CB0[0][0].zwwz
uge r0.xz, r0.xxxx, l(2, 0, 1, 0) uge r0.xw, r0.xxxx, l(2, 0, 0, 1)
and r0.w, r0.x, l(1) and r1.x, r0.x, l(1)
and r1.x, CB1[1][0].x, l(3) imul null, r0.y, r0.z, r0.y
imul null, r0.y, r0.y, r1.x ishl r0.y, r0.y, r1.x
ishl r0.y, r0.y, r0.w
uge r0.y, vThreadID.x, r0.y uge r0.y, vThreadID.x, r0.y
if_nz r0.y if_nz r0.y
ret ret
endif endif
ishl r1.x, vThreadID.x, l(3) ishl r1.x, vThreadID.x, l(3)
ushr r2.y, CB0[0][0].w, l(5) ushr r2.y, CB0[0][0].w, l(4)
mov r2.x, CB0[0][0].w mov r2.x, CB0[0][0].w
and r0.yw, r2.xxxy, l(0, 31, 0, 3) and r0.yz, r2.xxyx, l(0, 15, 1, 0)
ushr r2.y, CB1[1][0].x, l(2) ubfe r2.xyz, l(2, 2, 12, 0), l(27, 29, 13, 0), CB0[0][0].wwzw
mov r2.x, CB1[1][0].x imul null, r0.yz, r0.yyzy, r2.xxyx
and r1.zw, r2.xxxy, l(0, 0, 3, 3) movc r0.xw, r0.xxxw, l(4,0,0,4), l(3,0,0,3)
imul null, r0.yw, r0.yyyw, r1.zzzw ishl r0.xy, r0.yzyy, r0.xwxx
movc r0.xz, r0.xxzx, l(4,0,4,0), l(3,0,3,0)
ishl r0.xy, r0.ywyy, r0.xzxx
mov r1.y, vThreadID.y mov r1.y, vThreadID.y
iadd r0.xy, r0.xyxx, r1.xyxx iadd r0.xy, r0.xyxx, r1.xyxx
ubfe r0.z, l(12), l(13), CB0[0][0].z and r0.zw, CB0[0][0].zzzz, l(0, 0, 1023, 4096)
and r1.xy, CB0[0][0].zzzz, l(1023, 4096, 0, 0) imul null, r1.xy, r2.xyxx, l(80, 16, 0, 0)
imul null, r1.zw, r1.zzzw, l(0, 0, 80, 16) udiv r1.zw, null, r0.xxxy, r1.xxxy
udiv r2.xy, null, r0.xyxx, r1.zwzz imad r0.z, r1.w, r0.z, r1.z
imad r0.w, r2.y, r1.x, r2.x iadd r0.z, r0.z, r2.z
iadd r0.z, r0.w, r0.z imad r0.xy, -r1.zwzz, r1.xyxx, r0.xyxx
imad r0.xy, -r2.xyxx, r1.zwzz, r0.xyxx if_nz r0.w
if_nz r1.y ushr r0.w, r1.x, l(1)
ushr r0.w, r1.z, l(1) uge r1.z, r0.x, r0.w
uge r1.x, r0.x, r0.w ineg r1.w, r0.w
ineg r1.y, r0.w movc r0.w, r1.z, r1.w, r0.w
movc r0.w, r1.x, r1.y, r0.w
iadd r0.x, r0.w, r0.x iadd r0.x, r0.w, r0.x
endif endif
imul null, r0.w, r1.w, r1.z imul null, r0.w, r1.y, r1.x
imad r0.x, r0.y, r1.z, r0.x imad r0.x, r0.y, r1.x, r0.x
imad r0.x, r0.z, r0.w, r0.x imad r0.x, r0.z, r0.w, r0.x
ushr r0.x, r0.x, l(2) ushr r0.x, r0.x, l(2)
store_uav_typed U0[0].xyzw, r0.xxxx, CB0[0][0].xxxx store_uav_typed U0[0].xyzw, r0.xxxx, CB0[0][0].xxxx
iadd r0.y, r0.x, l(1) iadd r0.y, r0.x, l(1)
store_uav_typed U0[0].xyzw, r0.yyyy, CB0[0][0].xxxx store_uav_typed U0[0].xyzw, r0.yyyy, CB0[0][0].xxxx
ret ret
// Approximately 44 instruction slots used // Approximately 40 instruction slots used
#endif #endif
const BYTE resolve_clear_32bpp_scaled_cs[] = const BYTE resolve_clear_32bpp_scaled_cs[] =
{ {
68, 88, 66, 67, 205, 174, 68, 88, 66, 67, 34, 193,
123, 5, 98, 198, 38, 143, 65, 111, 190, 1, 146, 215,
98, 109, 190, 150, 214, 170, 175, 136, 118, 253, 124, 247,
216, 92, 1, 0, 0, 0, 247, 185, 1, 0, 0, 0,
104, 9, 0, 0, 5, 0, 56, 8, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0, 0, 0, 52, 0, 0, 0,
228, 2, 0, 0, 244, 2, 68, 2, 0, 0, 84, 2,
0, 0, 4, 3, 0, 0, 0, 0, 100, 2, 0, 0,
204, 8, 0, 0, 82, 68, 156, 7, 0, 0, 82, 68,
69, 70, 168, 2, 0, 0, 69, 70, 8, 2, 0, 0,
2, 0, 0, 0, 248, 0, 1, 0, 0, 0, 176, 0,
0, 0, 3, 0, 0, 0, 0, 0, 2, 0, 0, 0,
60, 0, 0, 0, 1, 5, 60, 0, 0, 0, 1, 5,
83, 67, 0, 5, 0, 0, 83, 67, 0, 5, 0, 0,
128, 2, 0, 0, 19, 19, 223, 1, 0, 0, 19, 19,
68, 37, 60, 0, 0, 0, 68, 37, 60, 0, 0, 0,
24, 0, 0, 0, 40, 0, 24, 0, 0, 0, 40, 0,
0, 0, 40, 0, 0, 0, 0, 0, 40, 0, 0, 0,
36, 0, 0, 0, 12, 0, 36, 0, 0, 0, 12, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
180, 0, 0, 0, 4, 0, 140, 0, 0, 0, 4, 0,
0, 0, 4, 0, 0, 0, 0, 0, 4, 0, 0, 0,
1, 0, 0, 0, 255, 255, 1, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0, 255, 255, 0, 0, 0, 0,
1, 0, 0, 0, 12, 0, 1, 0, 0, 0, 12, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 196, 0, 0, 0, 0, 0, 156, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0,
0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 215, 0, 0, 0, 0, 0, 120, 101, 95, 114,
0, 0, 0, 0, 0, 0, 101, 115, 111, 108, 118, 101,
0, 0, 0, 0, 0, 0, 95, 100, 101, 115, 116, 0,
0, 0, 0, 0, 1, 0, 88, 101, 82, 101, 115, 111,
0, 0, 1, 0, 0, 0, 108, 118, 101, 67, 111, 110,
1, 0, 0, 0, 0, 0, 115, 116, 97, 110, 116, 115,
0, 0, 1, 0, 0, 0, 0, 171, 156, 0, 0, 0,
120, 101, 95, 114, 101, 115, 3, 0, 0, 0, 200, 0,
111, 108, 118, 101, 95, 100,
101, 115, 116, 0, 88, 101,
82, 101, 115, 111, 108, 118,
101, 67, 111, 110, 115, 116,
97, 110, 116, 115, 0, 88,
101, 82, 101, 115, 111, 108,
118, 101, 82, 101, 115, 111,
108, 117, 116, 105, 111, 110,
83, 99, 97, 108, 101, 67,
111, 110, 115, 116, 97, 110,
116, 0, 196, 0, 0, 0,
3, 0, 0, 0, 40, 1,
0, 0, 16, 0, 0, 0, 0, 0, 16, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 215, 0, 0, 0, 0, 0, 64, 1, 0, 0,
1, 0, 0, 0, 60, 2,
0, 0, 16, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 160, 1, 0, 0,
0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 0,
0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0,
192, 1, 0, 0, 0, 0, 96, 1, 0, 0, 0, 0,
0, 0, 255, 255, 255, 255, 0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 255, 255, 0, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0, 255, 255, 0, 0, 0, 0,
228, 1, 0, 0, 8, 0, 132, 1, 0, 0, 8, 0,
0, 0, 4, 0, 0, 0, 0, 0, 4, 0, 0, 0,
2, 0, 0, 0, 0, 2, 2, 0, 0, 0, 160, 1,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
255, 255, 255, 255, 0, 0, 255, 255, 255, 255, 0, 0,
0, 0, 255, 255, 255, 255, 0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 36, 2, 0, 0, 0, 0, 196, 1,
0, 0, 12, 0, 0, 0, 0, 0, 12, 0, 0, 0,
4, 0, 0, 0, 2, 0, 4, 0, 0, 0, 2, 0,
0, 0, 0, 2, 0, 0, 0, 0, 160, 1, 0, 0,
0, 0, 0, 0, 255, 255, 0, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0, 255, 255, 0, 0, 0, 0,
255, 255, 255, 255, 0, 0, 255, 255, 255, 255, 0, 0,
@ -190,7 +161,7 @@ const BYTE resolve_clear_32bpp_scaled_cs[] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
183, 1, 0, 0, 120, 101, 87, 1, 0, 0, 120, 101,
95, 114, 101, 115, 111, 108, 95, 114, 101, 115, 111, 108,
118, 101, 95, 101, 100, 114, 118, 101, 95, 101, 100, 114,
97, 109, 95, 105, 110, 102, 97, 109, 95, 105, 110, 102,
@ -200,300 +171,254 @@ const BYTE resolve_clear_32bpp_scaled_cs[] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 250, 1, 0, 0, 0, 0, 154, 1,
0, 0, 120, 101, 95, 114, 0, 0, 120, 101, 95, 114,
101, 115, 111, 108, 118, 101, 101, 115, 111, 108, 118, 101,
95, 97, 100, 100, 114, 101, 95, 99, 111, 111, 114, 100,
115, 115, 95, 105, 110, 102, 105, 110, 97, 116, 101, 95,
111, 0, 100, 2, 0, 0, 105, 110, 102, 111, 0, 77,
0, 0, 0, 0, 4, 0, 105, 99, 114, 111, 115, 111,
0, 0, 2, 0, 0, 0, 102, 116, 32, 40, 82, 41,
0, 2, 0, 0, 0, 0, 32, 72, 76, 83, 76, 32,
0, 0, 255, 255, 255, 255, 83, 104, 97, 100, 101, 114,
0, 0, 0, 0, 255, 255, 32, 67, 111, 109, 112, 105,
255, 255, 0, 0, 0, 0, 108, 101, 114, 32, 49, 48,
120, 101, 95, 114, 101, 115, 46, 49, 0, 171, 73, 83,
111, 108, 118, 101, 95, 114, 71, 78, 8, 0, 0, 0,
101, 115, 111, 108, 117, 116, 0, 0, 0, 0, 8, 0,
105, 111, 110, 95, 115, 99, 0, 0, 79, 83, 71, 78,
97, 108, 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, 73, 83, 71, 78,
8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0,
0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0,
79, 83, 71, 78, 8, 0, 83, 72, 69, 88, 48, 5,
0, 0, 0, 0, 0, 0, 0, 0, 81, 0, 5, 0,
8, 0, 0, 0, 83, 72, 76, 1, 0, 0, 106, 8,
69, 88, 192, 5, 0, 0, 0, 1, 89, 0, 0, 7,
81, 0, 5, 0, 112, 1, 70, 142, 48, 0, 0, 0,
0, 0, 106, 8, 0, 1,
89, 0, 0, 7, 70, 142,
48, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 89, 0,
0, 7, 70, 142, 48, 0,
1, 0, 0, 0, 1, 0,
0, 0, 1, 0, 0, 0,
1, 0, 0, 0, 0, 0,
0, 0, 156, 8, 0, 7,
70, 238, 49, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 68, 68,
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, 138, 0, 0, 17,
50, 0, 16, 0, 0, 0,
0, 0, 2, 64, 0, 0,
2, 0, 0, 0, 11, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 2, 64,
0, 0, 10, 0, 0, 0,
7, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
230, 138, 48, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 80, 0,
0, 10, 82, 0, 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 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@ -501,5 +426,16 @@ const BYTE resolve_clear_32bpp_scaled_cs[] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 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,
2, 0, 0, 0
}; };

View File

@ -10,7 +10,7 @@
// //
// uint2 xe_resolve_clear_value; // Offset: 0 Size: 8 // uint2 xe_resolve_clear_value; // Offset: 0 Size: 8
// uint xe_resolve_edram_info; // Offset: 8 Size: 4 // uint xe_resolve_edram_info; // Offset: 8 Size: 4
// uint xe_resolve_address_info; // Offset: 12 Size: 4 // uint xe_resolve_coordinate_info; // Offset: 12 Size: 4
// //
// } // }
// //
@ -42,7 +42,7 @@ dcl_uav_typed_buffer (uint,uint,uint,uint) U0[0:0], space=0
dcl_input vThreadID.xy dcl_input vThreadID.xy
dcl_temps 3 dcl_temps 3
dcl_thread_group 8, 8, 1 dcl_thread_group 8, 8, 1
ubfe r0.xy, l(2, 11, 0, 0), l(10, 7, 0, 0), CB0[0][0].zwzz ubfe r0.xy, l(2, 11, 0, 0), l(10, 5, 0, 0), CB0[0][0].zwzz
uge r0.xz, r0.xxxx, l(2, 0, 1, 0) uge r0.xz, r0.xxxx, l(2, 0, 1, 0)
and r0.w, r0.x, l(1) and r0.w, r0.x, l(1)
ishl r0.y, r0.y, r0.w ishl r0.y, r0.y, r0.w
@ -51,10 +51,10 @@ if_nz r0.y
ret ret
endif endif
ishl r1.x, vThreadID.x, l(3) ishl r1.x, vThreadID.x, l(3)
ushr r2.y, CB0[0][0].w, l(5) ushr r2.y, CB0[0][0].w, l(4)
movc r0.xy, r0.xzxx, l(4,4,0,0), l(3,3,0,0) movc r0.xy, r0.xzxx, l(4,4,0,0), l(3,3,0,0)
mov r2.x, CB0[0][0].w mov r2.x, CB0[0][0].w
bfi r0.xy, l(5, 2, 0, 0), r0.xyxx, r2.xyxx, l(0, 0, 0, 0) bfi r0.xy, l(4, 1, 0, 0), r0.xyxx, r2.xyxx, l(0, 0, 0, 0)
mov r1.y, vThreadID.y mov r1.y, vThreadID.y
iadd r0.xy, r0.xyxx, r1.xyxx iadd r0.xy, r0.xyxx, r1.xyxx
ubfe r0.z, l(12), l(13), CB0[0][0].z ubfe r0.z, l(12), l(13), CB0[0][0].z
@ -79,21 +79,21 @@ ret
const BYTE resolve_clear_64bpp_cs[] = const BYTE resolve_clear_64bpp_cs[] =
{ {
68, 88, 66, 67, 16, 5, 68, 88, 66, 67, 84, 204,
27, 66, 247, 175, 170, 221, 98, 166, 53, 169, 26, 199,
90, 253, 80, 46, 104, 119, 140, 135, 147, 98, 122, 166,
87, 139, 1, 0, 0, 0, 150, 219, 1, 0, 0, 0,
148, 7, 0, 0, 5, 0, 152, 7, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0, 0, 0, 52, 0, 0, 0,
64, 2, 0, 0, 80, 2, 68, 2, 0, 0, 84, 2,
0, 0, 96, 2, 0, 0, 0, 0, 100, 2, 0, 0,
248, 6, 0, 0, 82, 68, 252, 6, 0, 0, 82, 68,
69, 70, 4, 2, 0, 0, 69, 70, 8, 2, 0, 0,
1, 0, 0, 0, 176, 0, 1, 0, 0, 0, 176, 0,
0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0,
60, 0, 0, 0, 1, 5, 60, 0, 0, 0, 1, 5,
83, 67, 0, 5, 0, 0, 83, 67, 0, 5, 0, 0,
220, 1, 0, 0, 19, 19, 223, 1, 0, 0, 19, 19,
68, 37, 60, 0, 0, 0, 68, 37, 60, 0, 0, 0,
24, 0, 0, 0, 40, 0, 24, 0, 0, 0, 40, 0,
0, 0, 40, 0, 0, 0, 0, 0, 40, 0, 0, 0,
@ -166,232 +166,232 @@ const BYTE resolve_clear_64bpp_cs[] =
0, 0, 0, 0, 154, 1, 0, 0, 0, 0, 154, 1,
0, 0, 120, 101, 95, 114, 0, 0, 120, 101, 95, 114,
101, 115, 111, 108, 118, 101, 101, 115, 111, 108, 118, 101,
95, 97, 100, 100, 114, 101, 95, 99, 111, 111, 114, 100,
115, 115, 95, 105, 110, 102, 105, 110, 97, 116, 101, 95,
111, 0, 77, 105, 99, 114, 105, 110, 102, 111, 0, 77,
111, 115, 111, 102, 116, 32, 105, 99, 114, 111, 115, 111,
40, 82, 41, 32, 72, 76, 102, 116, 32, 40, 82, 41,
83, 76, 32, 83, 104, 97, 32, 72, 76, 83, 76, 32,
100, 101, 114, 32, 67, 111, 83, 104, 97, 100, 101, 114,
109, 112, 105, 108, 101, 114, 32, 67, 111, 109, 112, 105,
32, 49, 48, 46, 49, 0, 108, 101, 114, 32, 49, 48,
73, 83, 71, 78, 8, 0, 46, 49, 0, 171, 73, 83,
0, 0, 0, 0, 0, 0,
8, 0, 0, 0, 79, 83,
71, 78, 8, 0, 0, 0, 71, 78, 8, 0, 0, 0,
0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 0,
0, 0, 83, 72, 69, 88, 0, 0, 79, 83, 71, 78,
144, 4, 0, 0, 81, 0, 8, 0, 0, 0, 0, 0,
5, 0, 36, 1, 0, 0, 0, 0, 8, 0, 0, 0,
106, 8, 0, 1, 89, 0, 83, 72, 69, 88, 144, 4,
0, 7, 70, 142, 48, 0, 0, 0, 81, 0, 5, 0,
0, 0, 0, 0, 0, 0, 36, 1, 0, 0, 106, 8,
0, 0, 0, 0, 0, 0, 0, 1,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0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@ -401,6 +401,6 @@ const BYTE resolve_clear_64bpp_cs[] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,
0, 0 0, 0, 4, 0, 0, 0
}; };

View File

@ -10,14 +10,7 @@
// //
// uint2 xe_resolve_clear_value; // Offset: 0 Size: 8 // uint2 xe_resolve_clear_value; // Offset: 0 Size: 8
// uint xe_resolve_edram_info; // Offset: 8 Size: 4 // uint xe_resolve_edram_info; // Offset: 8 Size: 4
// uint xe_resolve_address_info; // Offset: 12 Size: 4 // uint xe_resolve_coordinate_info; // Offset: 12 Size: 4
//
// }
//
// cbuffer XeResolveResolutionScaleConstant
// {
//
// uint xe_resolve_resolution_scale; // Offset: 0 Size: 4
// //
// } // }
// //
@ -28,7 +21,6 @@
// ------------------------------ ---------- ------- ----------- ------- -------------- ------ // ------------------------------ ---------- ------- ----------- ------- -------------- ------
// xe_resolve_dest UAV uint4 buf U0 u0 1 // xe_resolve_dest UAV uint4 buf U0 u0 1
// XeResolveConstants cbuffer NA NA CB0 cb0 1 // XeResolveConstants cbuffer NA NA CB0 cb0 1
// XeResolveResolutionScaleConstant cbuffer NA NA CB1 cb1 1
// //
// //
// //
@ -46,40 +38,35 @@
cs_5_1 cs_5_1
dcl_globalFlags refactoringAllowed dcl_globalFlags refactoringAllowed
dcl_constantbuffer CB0[0:0][1], immediateIndexed, space=0 dcl_constantbuffer CB0[0:0][1], immediateIndexed, space=0
dcl_constantbuffer CB1[1:1][1], immediateIndexed, space=0
dcl_uav_typed_buffer (uint,uint,uint,uint) U0[0:0], space=0 dcl_uav_typed_buffer (uint,uint,uint,uint) U0[0:0], space=0
dcl_input vThreadID.xy dcl_input vThreadID.xy
dcl_temps 3 dcl_temps 3
dcl_thread_group 8, 8, 1 dcl_thread_group 8, 8, 1
ubfe r0.xy, l(2, 11, 0, 0), l(10, 7, 0, 0), CB0[0][0].zwzz ubfe r0.xyz, l(2, 11, 2, 0), l(10, 5, 27, 0), CB0[0][0].zwwz
uge r0.xz, r0.xxxx, l(2, 0, 1, 0) uge r0.xw, r0.xxxx, l(2, 0, 0, 1)
and r0.w, r0.x, l(1) and r1.x, r0.x, l(1)
and r1.x, CB1[1][0].x, l(3) imul null, r0.y, r0.z, r0.y
imul null, r0.y, r0.y, r1.x ishl r0.y, r0.y, r1.x
ishl r0.y, r0.y, r0.w
uge r0.y, vThreadID.x, r0.y uge r0.y, vThreadID.x, r0.y
if_nz r0.y if_nz r0.y
ret ret
endif endif
ishl r1.x, vThreadID.x, l(3) ishl r1.x, vThreadID.x, l(3)
ushr r2.y, CB0[0][0].w, l(5) ushr r2.y, CB0[0][0].w, l(4)
mov r2.x, CB0[0][0].w mov r2.x, CB0[0][0].w
and r0.yw, r2.xxxy, l(0, 31, 0, 3) and r0.yz, r2.xxyx, l(0, 15, 1, 0)
ushr r2.z, CB1[1][0].x, l(2) ubfe r2.xyz, l(2, 2, 12, 0), l(27, 29, 13, 0), CB0[0][0].wwzw
mov r2.y, CB1[1][0].x imul null, r0.yz, r0.yyzy, r2.xxyx
and r1.zw, r2.yyyz, l(0, 0, 3, 3) movc r0.xw, r0.xxxw, l(4,0,0,4), l(3,0,0,3)
imul null, r0.yw, r0.yyyw, r1.zzzw ishl r0.xy, r0.yzyy, r0.xwxx
movc r0.xz, r0.xxzx, l(4,0,4,0), l(3,0,3,0)
ishl r0.xy, r0.ywyy, r0.xzxx
mov r1.y, vThreadID.y mov r1.y, vThreadID.y
iadd r0.xy, r0.xyxx, r1.xyxx iadd r0.xy, r0.xyxx, r1.xyxx
ubfe r0.z, l(12), l(13), CB0[0][0].z and r0.z, CB0[0][0].z, l(1023)
and r0.w, CB0[0][0].z, l(1023) imul null, r1.yz, r2.xxyx, l(0, 80, 16, 0)
imul null, r1.yz, r1.zzwz, l(0, 80, 16, 0)
ushr r1.x, r1.y, l(1) ushr r1.x, r1.y, l(1)
udiv r2.xy, null, r0.xyxx, r1.xzxx udiv r2.xy, null, r0.xyxx, r1.xzxx
imad r0.w, r2.y, r0.w, r2.x imad r0.z, r2.y, r0.z, r2.x
iadd r0.z, r0.w, r0.z iadd r0.z, r0.z, r2.z
imad r0.xy, -r2.xyxx, r1.xzxx, r0.xyxx imad r0.xy, -r2.xyxx, r1.xzxx, r0.xyxx
imul null, r0.w, r1.z, r1.y imul null, r0.w, r1.z, r1.y
imad r0.x, r0.y, r1.x, r0.x imad r0.x, r0.y, r1.x, r0.x
@ -93,87 +80,71 @@ iadd r0.y, r0.x, l(2)
store_uav_typed U0[0].xyzw, r0.yyyy, CB0[0][0].xyxy store_uav_typed U0[0].xyzw, r0.yyyy, CB0[0][0].xyxy
store_uav_typed U0[0].xyzw, r0.zzzz, CB0[0][0].xyxy store_uav_typed U0[0].xyzw, r0.zzzz, CB0[0][0].xyxy
ret ret
// Approximately 42 instruction slots used // Approximately 38 instruction slots used
#endif #endif
const BYTE resolve_clear_64bpp_scaled_cs[] = const BYTE resolve_clear_64bpp_scaled_cs[] =
{ {
68, 88, 66, 67, 246, 14, 68, 88, 66, 67, 93, 192,
132, 223, 204, 44, 6, 28, 177, 6, 128, 84, 12, 90,
86, 181, 216, 251, 242, 62, 192, 83, 14, 109, 74, 160,
34, 31, 1, 0, 0, 0, 146, 225, 1, 0, 0, 0,
112, 9, 0, 0, 5, 0, 64, 8, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0, 0, 0, 52, 0, 0, 0,
228, 2, 0, 0, 244, 2, 68, 2, 0, 0, 84, 2,
0, 0, 4, 3, 0, 0, 0, 0, 100, 2, 0, 0,
212, 8, 0, 0, 82, 68, 164, 7, 0, 0, 82, 68,
69, 70, 168, 2, 0, 0, 69, 70, 8, 2, 0, 0,
2, 0, 0, 0, 248, 0, 1, 0, 0, 0, 176, 0,
0, 0, 3, 0, 0, 0, 0, 0, 2, 0, 0, 0,
60, 0, 0, 0, 1, 5, 60, 0, 0, 0, 1, 5,
83, 67, 0, 5, 0, 0, 83, 67, 0, 5, 0, 0,
128, 2, 0, 0, 19, 19, 223, 1, 0, 0, 19, 19,
68, 37, 60, 0, 0, 0, 68, 37, 60, 0, 0, 0,
24, 0, 0, 0, 40, 0, 24, 0, 0, 0, 40, 0,
0, 0, 40, 0, 0, 0, 0, 0, 40, 0, 0, 0,
36, 0, 0, 0, 12, 0, 36, 0, 0, 0, 12, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
180, 0, 0, 0, 4, 0, 140, 0, 0, 0, 4, 0,
0, 0, 4, 0, 0, 0, 0, 0, 4, 0, 0, 0,
1, 0, 0, 0, 255, 255, 1, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0, 255, 255, 0, 0, 0, 0,
1, 0, 0, 0, 12, 0, 1, 0, 0, 0, 12, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 196, 0, 0, 0, 0, 0, 156, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0,
0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 215, 0, 0, 0, 0, 0, 120, 101, 95, 114,
0, 0, 0, 0, 0, 0, 101, 115, 111, 108, 118, 101,
0, 0, 0, 0, 0, 0, 95, 100, 101, 115, 116, 0,
0, 0, 0, 0, 1, 0, 88, 101, 82, 101, 115, 111,
0, 0, 1, 0, 0, 0, 108, 118, 101, 67, 111, 110,
1, 0, 0, 0, 0, 0, 115, 116, 97, 110, 116, 115,
0, 0, 1, 0, 0, 0, 0, 171, 156, 0, 0, 0,
120, 101, 95, 114, 101, 115, 3, 0, 0, 0, 200, 0,
111, 108, 118, 101, 95, 100,
101, 115, 116, 0, 88, 101,
82, 101, 115, 111, 108, 118,
101, 67, 111, 110, 115, 116,
97, 110, 116, 115, 0, 88,
101, 82, 101, 115, 111, 108,
118, 101, 82, 101, 115, 111,
108, 117, 116, 105, 111, 110,
83, 99, 97, 108, 101, 67,
111, 110, 115, 116, 97, 110,
116, 0, 196, 0, 0, 0,
3, 0, 0, 0, 40, 1,
0, 0, 16, 0, 0, 0, 0, 0, 16, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 215, 0, 0, 0, 0, 0, 64, 1, 0, 0,
1, 0, 0, 0, 60, 2,
0, 0, 16, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 160, 1, 0, 0,
0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 0,
0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0,
192, 1, 0, 0, 0, 0, 96, 1, 0, 0, 0, 0,
0, 0, 255, 255, 255, 255, 0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 255, 255, 0, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0, 255, 255, 0, 0, 0, 0,
228, 1, 0, 0, 8, 0, 132, 1, 0, 0, 8, 0,
0, 0, 4, 0, 0, 0, 0, 0, 4, 0, 0, 0,
2, 0, 0, 0, 0, 2, 2, 0, 0, 0, 160, 1,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
255, 255, 255, 255, 0, 0, 255, 255, 255, 255, 0, 0,
0, 0, 255, 255, 255, 255, 0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 36, 2, 0, 0, 0, 0, 196, 1,
0, 0, 12, 0, 0, 0, 0, 0, 12, 0, 0, 0,
4, 0, 0, 0, 2, 0, 4, 0, 0, 0, 2, 0,
0, 0, 0, 2, 0, 0, 0, 0, 160, 1, 0, 0,
0, 0, 0, 0, 255, 255, 0, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0, 255, 255, 0, 0, 0, 0,
255, 255, 255, 255, 0, 0, 255, 255, 255, 255, 0, 0,
@ -188,7 +159,7 @@ const BYTE resolve_clear_64bpp_scaled_cs[] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
183, 1, 0, 0, 120, 101, 87, 1, 0, 0, 120, 101,
95, 114, 101, 115, 111, 108, 95, 114, 101, 115, 111, 108,
118, 101, 95, 101, 100, 114, 118, 101, 95, 101, 100, 114,
97, 109, 95, 105, 110, 102, 97, 109, 95, 105, 110, 102,
@ -198,298 +169,263 @@ const BYTE resolve_clear_64bpp_scaled_cs[] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 250, 1, 0, 0, 0, 0, 154, 1,
0, 0, 120, 101, 95, 114, 0, 0, 120, 101, 95, 114,
101, 115, 111, 108, 118, 101, 101, 115, 111, 108, 118, 101,
95, 97, 100, 100, 114, 101, 95, 99, 111, 111, 114, 100,
115, 115, 95, 105, 110, 102, 105, 110, 97, 116, 101, 95,
111, 0, 100, 2, 0, 0, 105, 110, 102, 111, 0, 77,
0, 0, 0, 0, 4, 0, 105, 99, 114, 111, 115, 111,
0, 0, 2, 0, 0, 0, 102, 116, 32, 40, 82, 41,
0, 2, 0, 0, 0, 0, 32, 72, 76, 83, 76, 32,
0, 0, 255, 255, 255, 255, 83, 104, 97, 100, 101, 114,
0, 0, 0, 0, 255, 255, 32, 67, 111, 109, 112, 105,
255, 255, 0, 0, 0, 0, 108, 101, 114, 32, 49, 48,
120, 101, 95, 114, 101, 115, 46, 49, 0, 171, 73, 83,
111, 108, 118, 101, 95, 114, 71, 78, 8, 0, 0, 0,
101, 115, 111, 108, 117, 116, 0, 0, 0, 0, 8, 0,
105, 111, 110, 95, 115, 99, 0, 0, 79, 83, 71, 78,
97, 108, 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, 73, 83, 71, 78,
8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0,
0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0,
79, 83, 71, 78, 8, 0, 83, 72, 69, 88, 56, 5,
0, 0, 0, 0, 0, 0, 0, 0, 81, 0, 5, 0,
8, 0, 0, 0, 83, 72, 78, 1, 0, 0, 106, 8,
69, 88, 200, 5, 0, 0, 0, 1, 89, 0, 0, 7,
81, 0, 5, 0, 114, 1, 70, 142, 48, 0, 0, 0,
0, 0, 106, 8, 0, 1,
89, 0, 0, 7, 70, 142,
48, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 89, 0,
0, 7, 70, 142, 48, 0,
1, 0, 0, 0, 1, 0,
0, 0, 1, 0, 0, 0,
1, 0, 0, 0, 0, 0,
0, 0, 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, 48, 0, 0, 0, 70, 132, 48, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
30, 0, 0, 7, 34, 0, 30, 0, 0, 10, 98, 0,
16, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0,
10, 0, 16, 0, 0, 0, 6, 0, 16, 0, 0, 0,
0, 0, 1, 64, 0, 0, 0, 0, 2, 64, 0, 0,
2, 0, 0, 0, 164, 0, 0, 0, 0, 0, 1, 0,
0, 0, 3, 0, 0, 0,
0, 0, 0, 0, 164, 0,
0, 10, 242, 224, 33, 0, 0, 10, 242, 224, 33, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 86, 5, 16, 0, 0, 0, 86, 5, 16, 0,
0, 0, 0, 0, 70, 132, 0, 0, 0, 0, 70, 132,
48, 0, 0, 0, 0, 0, 48, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 164, 0, 0, 10, 0, 0, 30, 0, 0, 7,
242, 224, 33, 0, 0, 0, 34, 0, 16, 0, 0, 0,
0, 0, 10, 0, 16, 0,
0, 0, 0, 0, 1, 64,
0, 0, 2, 0, 0, 0,
164, 0, 0, 10, 242, 224,
33, 0, 0, 0, 0, 0,
0, 0, 0, 0, 86, 5,
16, 0, 0, 0, 0, 0,
70, 132, 48, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
166, 10, 16, 0, 0, 0, 0, 0, 0, 0, 164, 0,
0, 0, 70, 132, 48, 0, 0, 10, 242, 224, 33, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 166, 10, 16, 0,
0, 0, 0, 0, 70, 132,
48, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
62, 0, 0, 1, 83, 84, 0, 0, 62, 0, 0, 1,
65, 84, 148, 0, 0, 0, 83, 84, 65, 84, 148, 0,
42, 0, 0, 0, 3, 0, 0, 0, 38, 0, 0, 0,
0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0,
0, 0, 16, 0, 0, 0,
12, 0, 0, 0, 2, 0,
0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 16, 0,
0, 0, 9, 0, 0, 0,
2, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@ -500,5 +436,5 @@ const BYTE resolve_clear_64bpp_scaled_cs[] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4, 0, 0, 0 0, 0, 4, 0, 0, 0
}; };

File diff suppressed because it is too large Load Diff

View File

@ -9,16 +9,9 @@
// { // {
// //
// uint xe_resolve_edram_info; // Offset: 0 Size: 4 // uint xe_resolve_edram_info; // Offset: 0 Size: 4
// uint xe_resolve_address_info; // Offset: 4 Size: 4 // uint xe_resolve_coordinate_info; // Offset: 4 Size: 4
// uint xe_resolve_dest_info; // Offset: 8 Size: 4 // uint xe_resolve_dest_info; // Offset: 8 Size: 4
// uint xe_resolve_dest_pitch_aligned;// Offset: 12 Size: 4 // uint xe_resolve_dest_coordinate_info;// Offset: 12 Size: 4
//
// }
//
// cbuffer XeResolveResolutionScaleConstant
// {
//
// uint xe_resolve_resolution_scale; // Offset: 0 Size: 4
// //
// } // }
// //
@ -30,7 +23,6 @@
// xe_resolve_source texture uint4 buf T0 t0 1 // xe_resolve_source texture uint4 buf T0 t0 1
// xe_resolve_dest UAV uint4 buf U0 u0 1 // xe_resolve_dest UAV uint4 buf U0 u0 1
// XeResolveConstants cbuffer NA NA CB0 cb0 1 // XeResolveConstants cbuffer NA NA CB0 cb0 1
// XeResolveResolutionScaleConstant cbuffer NA NA CB1 cb1 1
// //
// //
// //
@ -48,16 +40,14 @@
cs_5_1 cs_5_1
dcl_globalFlags refactoringAllowed dcl_globalFlags refactoringAllowed
dcl_constantbuffer CB0[0:0][1], immediateIndexed, space=0 dcl_constantbuffer CB0[0:0][1], immediateIndexed, space=0
dcl_constantbuffer CB1[1:1][1], immediateIndexed, space=0
dcl_resource_buffer (uint,uint,uint,uint) T0[0:0], space=0 dcl_resource_buffer (uint,uint,uint,uint) T0[0:0], space=0
dcl_uav_typed_buffer (uint,uint,uint,uint) U0[0:0], space=0 dcl_uav_typed_buffer (uint,uint,uint,uint) U0[0:0], space=0
dcl_input vThreadID.xy dcl_input vThreadID.xy
dcl_temps 7 dcl_temps 7
dcl_thread_group 8, 8, 1 dcl_thread_group 8, 8, 1
ishl r0.x, vThreadID.x, l(3) ishl r0.x, vThreadID.x, l(3)
ubfe r0.w, l(11), l(7), CB0[0][0].y ubfe r1.xy, l(11, 2, 0, 0), l(5, 27, 0, 0), CB0[0][0].yyyy
and r1.x, CB1[1][0].x, l(3) imul null, r0.w, r1.y, r1.x
imul null, r0.w, r0.w, r1.x
ishl r0.w, r0.w, l(3) ishl r0.w, r0.w, l(3)
uge r0.w, r0.x, r0.w uge r0.w, r0.x, r0.w
if_nz r0.w if_nz r0.w
@ -65,56 +55,51 @@ if_nz r0.w
endif endif
and r1.xyzw, CB0[0][0].xxxz, l(0x40000000, 1023, 4096, 0x01000000) and r1.xyzw, CB0[0][0].xxxz, l(0x40000000, 1023, 4096, 0x01000000)
if_nz r1.x if_nz r1.x
ushr r2.y, CB1[1][0].x, l(2) ubfe r2.xy, l(2, 2, 0, 0), l(27, 29, 0, 0), CB0[0][0].yyyy
mov r2.x, CB1[1][0].x
and r2.xy, r2.xyxx, l(3, 3, 0, 0)
ult r2.xy, l(1, 1, 0, 0), r2.xyxx ult r2.xy, l(1, 1, 0, 0), r2.xyxx
else else
mov r2.xy, l(0,0,0,0) mov r2.xy, l(0,0,0,0)
endif endif
and r0.w, r2.y, l(1) and r0.w, r2.y, l(1)
umax r0.y, r0.w, vThreadID.y umax r0.y, r0.w, vThreadID.y
ushr r3.xyz, CB0[0][0].yywy, l(5, 29, 10, 0) ushr r3.xyzw, CB0[0][0].ywww, l(4, 20, 24, 10)
mov r3.w, CB0[0][0].y mov r4.x, CB0[0][0].y
and r2.yz, r3.wwxw, l(0, 31, 3, 0) mov r4.y, r3.x
ushr r4.y, CB1[1][0].x, l(2) and r2.yz, r4.xxyx, l(0, 15, 1, 0)
mov r4.x, CB1[1][0].x ubfe r4.xyzw, l(2, 2, 12, 2), l(27, 29, 13, 10), CB0[0][0].yyxx
and r4.xy, r4.xyxx, l(3, 3, 0, 0)
imul null, r2.yz, r2.yyzy, r4.xxyx imul null, r2.yz, r2.yyzy, r4.xxyx
ishl r2.yz, r2.yyzy, l(0, 3, 3, 0) ishl r2.yz, r2.yyzy, l(0, 3, 3, 0)
iadd r0.yw, r0.xxxy, r2.yyyz iadd r0.yw, r0.xxxy, r2.yyyz
ubfe r2.yz, l(0, 12, 2, 0), l(0, 13, 10, 0), CB0[0][0].xxxx ubfe r5.y, l(3), l(28), CB0[0][0].w
uge r1.x, l(3), r3.y uge r1.x, l(3), r5.y
if_nz r1.x if_z r1.x
mov r5.y, r3.y ieq r1.x, r5.y, l(5)
else
ieq r1.x, r3.y, l(5)
if_nz r1.x if_nz r1.x
mov r5.y, l(2) mov r5.y, l(2)
else else
mov r5.y, l(0) mov r5.y, l(0)
endif endif
endif endif
uge r2.zw, r2.zzzz, l(0, 0, 2, 1) uge r2.yz, r4.wwww, l(0, 2, 1, 0)
and r2.zw, r2.zzzw, l(0, 0, 1, 1) and r2.yz, r2.yyzy, l(0, 1, 1, 0)
ishl r0.yw, r0.yyyw, r2.zzzw ishl r0.yw, r0.yyyw, r2.yyyz
ushr r5.x, r5.y, l(1) ushr r5.x, r5.y, l(1)
and r2.zw, r5.xxxy, l(0, 0, 1, 1) and r2.yz, r5.xxyx, l(0, 1, 1, 0)
iadd r0.yw, r0.yyyw, r2.zzzw iadd r0.yw, r0.yyyw, r2.yyyz
imul null, r2.zw, r4.xxxy, l(0, 0, 80, 16) imul null, r2.yz, r4.xxyx, l(0, 80, 16, 0)
udiv r4.zw, null, r0.yyyw, r2.zzzw udiv r5.xy, null, r0.ywyy, r2.yzyy
imad r1.x, r4.w, r1.y, r4.z imad r1.x, r5.y, r1.y, r5.x
iadd r1.x, r1.x, r2.y iadd r1.x, r1.x, r4.z
imad r0.yw, -r4.zzzw, r2.zzzw, r0.yyyw imad r0.yw, -r5.xxxy, r2.yyyz, r0.yyyw
if_nz r1.z if_nz r1.z
ushr r1.y, r2.z, l(1) ushr r1.y, r2.y, l(1)
uge r1.z, r0.y, r1.y uge r1.z, r0.y, r1.y
ineg r2.y, r1.y ineg r2.w, r1.y
movc r1.y, r1.z, r2.y, r1.y movc r1.y, r1.z, r2.w, r1.y
iadd r0.y, r0.y, r1.y iadd r0.y, r0.y, r1.y
endif endif
imul null, r1.y, r2.w, r2.z imul null, r1.y, r2.z, r2.y
imad r0.y, r0.w, r2.z, r0.y imad r0.y, r0.w, r2.y, r0.y
imad r0.y, r1.x, r1.y, r0.y imad r0.y, r1.x, r1.y, r0.y
ushr r0.y, r0.y, l(2) ushr r0.y, r0.y, l(2)
ld r5.xyzw, r0.yyyy, T0[0].xyzw ld r5.xyzw, r0.yyyy, T0[0].xyzw
@ -156,7 +141,7 @@ if_nz r1.w
break break
endswitch endswitch
endif endif
bfi r0.yw, l(0, 2, 0, 2), l(0, 3, 0, 3), r3.wwwx, l(0, 0, 0, 0) bfi r0.yw, l(0, 4, 0, 4), l(0, 3, 0, 3), r3.yyyz, l(0, 0, 0, 0)
mov r0.z, vThreadID.y mov r0.z, vThreadID.y
imad r1.yz, r0.yywy, r4.xxyx, r0.xxzx imad r1.yz, r0.yywy, r4.xxyx, r0.xxzx
bfi r0.y, l(10), l(5), CB0[0][0].w, l(0) bfi r0.y, l(10), l(5), CB0[0][0].w, l(0)
@ -166,7 +151,7 @@ udiv r1.yw, null, r1.xxxz, r4.xxxy
ishl r2.x, r1.y, l(2) ishl r2.x, r1.y, l(2)
if_nz r0.w if_nz r0.w
ubfe r0.w, l(3), l(4), CB0[0][0].z ubfe r0.w, l(3), l(4), CB0[0][0].z
ishl r2.y, r3.z, l(5) ishl r2.y, r3.w, l(5)
ishr r2.zw, r1.wwww, l(0, 0, 4, 3) ishr r2.zw, r1.wwww, l(0, 0, 4, 3)
ishr r3.x, r0.w, l(2) ishr r3.x, r0.w, l(2)
ushr r2.y, r2.y, l(4) ushr r2.y, r2.y, l(4)
@ -248,7 +233,7 @@ if_nz r1.x
iadd r1.x, r0.x, l(1) iadd r1.x, r0.x, l(1)
ieq r1.x, r4.x, r1.x ieq r1.x, r4.x, r1.x
if_nz r1.x if_nz r1.x
bfi r1.x, l(2), l(5), CB1[1][0].x, l(0) ishl r1.x, r4.x, l(5)
ishl r0.x, r0.x, l(4) ishl r0.x, r0.x, l(4)
iadd r0.x, -r0.x, r1.x iadd r0.x, -r0.x, r1.x
else else
@ -273,104 +258,88 @@ if_nz r0.w
endif endif
store_uav_typed U0[0].xyzw, r0.xxxx, r6.xyzw store_uav_typed U0[0].xyzw, r0.xxxx, r6.xyzw
ret ret
// Approximately 219 instruction slots used // Approximately 213 instruction slots used
#endif #endif
const BYTE resolve_fast_32bpp_1x2xmsaa_scaled_cs[] = const BYTE resolve_fast_32bpp_1x2xmsaa_scaled_cs[] =
{ {
68, 88, 66, 67, 33, 171, 68, 88, 66, 67, 126, 98,
235, 222, 88, 49, 17, 196, 70, 191, 43, 96, 149, 14,
69, 254, 64, 92, 43, 122, 230, 10, 84, 42, 67, 143,
25, 15, 1, 0, 0, 0, 146, 216, 1, 0, 0, 0,
40, 31, 0, 0, 5, 0, 228, 29, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0, 0, 0, 52, 0, 0, 0,
56, 3, 0, 0, 72, 3, 152, 2, 0, 0, 168, 2,
0, 0, 88, 3, 0, 0, 0, 0, 184, 2, 0, 0,
140, 30, 0, 0, 82, 68, 72, 29, 0, 0, 82, 68,
69, 70, 252, 2, 0, 0, 69, 70, 92, 2, 0, 0,
2, 0, 0, 0, 52, 1, 1, 0, 0, 0, 236, 0,
0, 0, 4, 0, 0, 0, 0, 0, 3, 0, 0, 0,
60, 0, 0, 0, 1, 5, 60, 0, 0, 0, 1, 5,
83, 67, 0, 5, 0, 0, 83, 67, 0, 5, 0, 0,
212, 2, 0, 0, 19, 19, 52, 2, 0, 0, 19, 19,
68, 37, 60, 0, 0, 0, 68, 37, 60, 0, 0, 0,
24, 0, 0, 0, 40, 0, 24, 0, 0, 0, 40, 0,
0, 0, 40, 0, 0, 0, 0, 0, 40, 0, 0, 0,
36, 0, 0, 0, 12, 0, 36, 0, 0, 0, 12, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
220, 0, 0, 0, 2, 0, 180, 0, 0, 0, 2, 0,
0, 0, 4, 0, 0, 0, 0, 0, 4, 0, 0, 0,
1, 0, 0, 0, 255, 255, 1, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0, 255, 255, 0, 0, 0, 0,
1, 0, 0, 0, 12, 0, 1, 0, 0, 0, 12, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 238, 0, 0, 0, 0, 0, 198, 0,
0, 0, 4, 0, 0, 0, 0, 0, 4, 0, 0, 0,
4, 0, 0, 0, 1, 0, 4, 0, 0, 0, 1, 0,
0, 0, 255, 255, 255, 255, 0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0,
0, 0, 12, 0, 0, 0, 0, 0, 12, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 254, 0, 0, 0, 0, 0, 214, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0,
1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
17, 1, 0, 0, 0, 0, 120, 101, 95, 114, 101, 115,
0, 0, 0, 0, 0, 0, 111, 108, 118, 101, 95, 115,
0, 0, 0, 0, 0, 0, 111, 117, 114, 99, 101, 0,
0, 0, 1, 0, 0, 0, 120, 101, 95, 114, 101, 115,
1, 0, 0, 0, 1, 0, 111, 108, 118, 101, 95, 100,
0, 0, 0, 0, 0, 0, 101, 115, 116, 0, 88, 101,
1, 0, 0, 0, 120, 101, 82, 101, 115, 111, 108, 118,
95, 114, 101, 115, 111, 108, 101, 67, 111, 110, 115, 116,
118, 101, 95, 115, 111, 117, 97, 110, 116, 115, 0, 171,
114, 99, 101, 0, 120, 101, 171, 171, 214, 0, 0, 0,
95, 114, 101, 115, 111, 108, 4, 0, 0, 0, 4, 1,
118, 101, 95, 100, 101, 115,
116, 0, 88, 101, 82, 101,
115, 111, 108, 118, 101, 67,
111, 110, 115, 116, 97, 110,
116, 115, 0, 88, 101, 82,
101, 115, 111, 108, 118, 101,
82, 101, 115, 111, 108, 117,
116, 105, 111, 110, 83, 99,
97, 108, 101, 67, 111, 110,
115, 116, 97, 110, 116, 0,
171, 171, 254, 0, 0, 0,
4, 0, 0, 0, 100, 1,
0, 0, 16, 0, 0, 0, 0, 0, 16, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 17, 1, 0, 0, 0, 0, 164, 1, 0, 0,
1, 0, 0, 0, 144, 2,
0, 0, 16, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 4, 2, 0, 0,
0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 4, 0,
0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0,
32, 2, 0, 0, 0, 0, 192, 1, 0, 0, 0, 0,
0, 0, 255, 255, 255, 255, 0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 255, 255, 0, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0, 255, 255, 0, 0, 0, 0,
68, 2, 0, 0, 4, 0, 228, 1, 0, 0, 4, 0,
0, 0, 4, 0, 0, 0, 0, 0, 4, 0, 0, 0,
2, 0, 0, 0, 32, 2, 2, 0, 0, 0, 192, 1,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
255, 255, 255, 255, 0, 0, 255, 255, 255, 255, 0, 0,
0, 0, 255, 255, 255, 255, 0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 92, 2, 0, 0, 0, 0, 255, 1,
0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0,
4, 0, 0, 0, 2, 0, 4, 0, 0, 0, 2, 0,
0, 0, 32, 2, 0, 0, 0, 0, 192, 1, 0, 0,
0, 0, 0, 0, 255, 255, 0, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0, 255, 255, 0, 0, 0, 0,
255, 255, 255, 255, 0, 0, 255, 255, 255, 255, 0, 0,
0, 0, 113, 2, 0, 0, 0, 0, 20, 2, 0, 0,
12, 0, 0, 0, 4, 0, 12, 0, 0, 0, 4, 0,
0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0,
32, 2, 0, 0, 0, 0, 192, 1, 0, 0, 0, 0,
0, 0, 255, 255, 255, 255, 0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 255, 255, 0, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0, 255, 255, 0, 0, 0, 0,
@ -384,190 +353,164 @@ const BYTE resolve_fast_32bpp_1x2xmsaa_scaled_cs[] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
26, 2, 0, 0, 120, 101, 186, 1, 0, 0, 120, 101,
95, 114, 101, 115, 111, 108, 95, 114, 101, 115, 111, 108,
118, 101, 95, 97, 100, 100, 118, 101, 95, 99, 111, 111,
114, 101, 115, 115, 95, 105, 114, 100, 105, 110, 97, 116,
101, 95, 105, 110, 102, 111,
0, 120, 101, 95, 114, 101,
115, 111, 108, 118, 101, 95,
100, 101, 115, 116, 95, 105,
110, 102, 111, 0, 120, 101, 110, 102, 111, 0, 120, 101,
95, 114, 101, 115, 111, 108, 95, 114, 101, 115, 111, 108,
118, 101, 95, 100, 101, 115, 118, 101, 95, 100, 101, 115,
116, 95, 105, 110, 102, 111, 116, 95, 99, 111, 111, 114,
0, 120, 101, 95, 114, 101, 100, 105, 110, 97, 116, 101,
115, 111, 108, 118, 101, 95, 95, 105, 110, 102, 111, 0,
100, 101, 115, 116, 95, 112, 77, 105, 99, 114, 111, 115,
105, 116, 99, 104, 95, 97, 111, 102, 116, 32, 40, 82,
108, 105, 103, 110, 101, 100, 41, 32, 72, 76, 83, 76,
0, 171, 184, 2, 0, 0, 32, 83, 104, 97, 100, 101,
0, 0, 0, 0, 4, 0, 114, 32, 67, 111, 109, 112,
0, 0, 2, 0, 0, 0, 105, 108, 101, 114, 32, 49,
32, 2, 0, 0, 0, 0, 48, 46, 49, 0, 73, 83,
0, 0, 255, 255, 255, 255, 71, 78, 8, 0, 0, 0,
0, 0, 0, 0, 255, 255, 0, 0, 0, 0, 8, 0,
255, 255, 0, 0, 0, 0, 0, 0, 79, 83, 71, 78,
120, 101, 95, 114, 101, 115,
111, 108, 118, 101, 95, 114,
101, 115, 111, 108, 117, 116,
105, 111, 110, 95, 115, 99,
97, 108, 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, 73, 83, 71, 78,
8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0,
0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0,
79, 83, 71, 78, 8, 0, 83, 72, 69, 88, 136, 26,
0, 0, 81, 0, 5, 0,
162, 6, 0, 0, 106, 8,
0, 1, 89, 0, 0, 7,
70, 142, 48, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
8, 0, 0, 0, 83, 72, 0, 0, 0, 0, 1, 0,
69, 88, 44, 27, 0, 0, 0, 0, 0, 0, 0, 0,
81, 0, 5, 0, 203, 6, 88, 8, 0, 7, 70, 126,
0, 0, 106, 8, 0, 1,
89, 0, 0, 7, 70, 142,
48, 0, 0, 0, 0, 0, 48, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 89, 0,
0, 7, 70, 142, 48, 0,
1, 0, 0, 0, 1, 0,
0, 0, 1, 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, 68, 68,
0, 0, 0, 0, 0, 0,
156, 8, 0, 7, 70, 238,
49, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 68, 68, 0, 0, 0,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0, 0,
16, 0, 0, 0, 78, 0, 0, 0, 0, 0, 78, 0,
0, 8, 194, 0, 16, 0, 0, 8, 50, 0, 16, 0,
4, 0, 0, 0, 0, 208, 5, 0, 0, 0, 0, 208,
0, 0, 86, 13, 16, 0, 0, 0, 214, 5, 16, 0,
0, 0, 0, 0, 166, 14, 0, 0, 0, 0, 150, 5,
16, 0, 2, 0, 0, 0, 16, 0, 2, 0, 0, 0,
35, 0, 0, 9, 18, 0, 35, 0, 0, 9, 18, 0,
16, 0, 1, 0, 0, 0, 16, 0, 1, 0, 0, 0,
58, 0, 16, 0, 4, 0, 26, 0, 16, 0, 5, 0,
0, 0, 26, 0, 16, 0, 0, 0, 26, 0, 16, 0,
1, 0, 0, 0, 42, 0, 1, 0, 0, 0, 10, 0,
16, 0, 4, 0, 0, 0, 16, 0, 5, 0, 0, 0,
30, 0, 0, 7, 18, 0, 30, 0, 0, 7, 18, 0,
16, 0, 1, 0, 0, 0, 16, 0, 1, 0, 0, 0,
10, 0, 16, 0, 1, 0, 10, 0, 16, 0, 1, 0,
0, 0, 26, 0, 16, 0, 0, 0, 42, 0, 16, 0,
2, 0, 0, 0, 35, 0, 4, 0, 0, 0, 35, 0,
0, 10, 162, 0, 16, 0, 0, 10, 162, 0, 16, 0,
0, 0, 0, 0, 166, 14, 0, 0, 0, 0, 6, 4,
16, 128, 65, 0, 0, 0, 16, 128, 65, 0, 0, 0,
4, 0, 0, 0, 166, 14, 5, 0, 0, 0, 86, 9,
16, 0, 2, 0, 0, 0, 16, 0, 2, 0, 0, 0,
86, 13, 16, 0, 0, 0, 86, 13, 16, 0, 0, 0,
0, 0, 31, 0, 4, 3, 0, 0, 31, 0, 4, 3,
42, 0, 16, 0, 1, 0, 42, 0, 16, 0, 1, 0,
0, 0, 85, 0, 0, 7, 0, 0, 85, 0, 0, 7,
34, 0, 16, 0, 1, 0, 34, 0, 16, 0, 1, 0,
0, 0, 42, 0, 16, 0, 0, 0, 26, 0, 16, 0,
2, 0, 0, 0, 1, 64, 2, 0, 0, 0, 1, 64,
0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0,
80, 0, 0, 7, 66, 0, 80, 0, 0, 7, 66, 0,
@ -699,13 +634,13 @@ const BYTE resolve_fast_32bpp_1x2xmsaa_scaled_cs[] =
26, 0, 16, 0, 0, 0, 26, 0, 16, 0, 0, 0,
0, 0, 26, 0, 16, 0, 0, 0, 26, 0, 16, 0,
1, 0, 0, 0, 40, 0, 1, 0, 0, 0, 40, 0,
0, 5, 34, 0, 16, 0, 0, 5, 130, 0, 16, 0,
2, 0, 0, 0, 26, 0, 2, 0, 0, 0, 26, 0,
16, 0, 1, 0, 0, 0, 16, 0, 1, 0, 0, 0,
55, 0, 0, 9, 34, 0, 55, 0, 0, 9, 34, 0,
16, 0, 1, 0, 0, 0, 16, 0, 1, 0, 0, 0,
42, 0, 16, 0, 1, 0, 42, 0, 16, 0, 1, 0,
0, 0, 26, 0, 16, 0, 0, 0, 58, 0, 16, 0,
2, 0, 0, 0, 26, 0, 2, 0, 0, 0, 26, 0,
16, 0, 1, 0, 0, 0, 16, 0, 1, 0, 0, 0,
30, 0, 0, 7, 34, 0, 30, 0, 0, 7, 34, 0,
@ -716,13 +651,13 @@ const BYTE resolve_fast_32bpp_1x2xmsaa_scaled_cs[] =
0, 1, 38, 0, 0, 8, 0, 1, 38, 0, 0, 8,
0, 208, 0, 0, 34, 0, 0, 208, 0, 0, 34, 0,
16, 0, 1, 0, 0, 0, 16, 0, 1, 0, 0, 0,
58, 0, 16, 0, 2, 0, 42, 0, 16, 0, 2, 0,
0, 0, 42, 0, 16, 0, 0, 0, 26, 0, 16, 0,
2, 0, 0, 0, 35, 0, 2, 0, 0, 0, 35, 0,
0, 9, 34, 0, 16, 0, 0, 9, 34, 0, 16, 0,
0, 0, 0, 0, 58, 0, 0, 0, 0, 0, 58, 0,
16, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0,
42, 0, 16, 0, 2, 0, 26, 0, 16, 0, 2, 0,
0, 0, 26, 0, 16, 0, 0, 0, 26, 0, 16, 0,
0, 0, 0, 0, 35, 0, 0, 0, 0, 0, 35, 0,
0, 9, 34, 0, 16, 0, 0, 9, 34, 0, 16, 0,
@ -927,12 +862,12 @@ const BYTE resolve_fast_32bpp_1x2xmsaa_scaled_cs[] =
140, 0, 0, 20, 162, 0, 140, 0, 0, 20, 162, 0,
16, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0,
2, 64, 0, 0, 0, 0, 2, 64, 0, 0, 0, 0,
0, 0, 2, 0, 0, 0, 0, 0, 4, 0, 0, 0,
0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 4, 0,
0, 0, 2, 64, 0, 0, 0, 0, 2, 64, 0, 0,
0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 3, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3, 0, 0, 0, 246, 3, 3, 0, 0, 0, 86, 9,
16, 0, 3, 0, 0, 0, 16, 0, 3, 0, 0, 0,
2, 64, 0, 0, 0, 0, 2, 64, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@ -988,7 +923,7 @@ const BYTE resolve_fast_32bpp_1x2xmsaa_scaled_cs[] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 41, 0,
0, 7, 34, 0, 16, 0, 0, 7, 34, 0, 16, 0,
2, 0, 0, 0, 42, 0, 2, 0, 0, 0, 58, 0,
16, 0, 3, 0, 0, 0, 16, 0, 3, 0, 0, 0,
1, 64, 0, 0, 5, 0, 1, 64, 0, 0, 5, 0,
0, 0, 42, 0, 0, 10, 0, 0, 42, 0, 0, 10,
@ -1478,15 +1413,11 @@ const BYTE resolve_fast_32bpp_1x2xmsaa_scaled_cs[] =
16, 0, 1, 0, 0, 0, 16, 0, 1, 0, 0, 0,
31, 0, 4, 3, 10, 0, 31, 0, 4, 3, 10, 0,
16, 0, 1, 0, 0, 0, 16, 0, 1, 0, 0, 0,
140, 0, 0, 13, 18, 0, 41, 0, 0, 7, 18, 0,
16, 0, 1, 0, 0, 0, 16, 0, 1, 0, 0, 0,
1, 64, 0, 0, 2, 0, 10, 0, 16, 0, 4, 0,
0, 0, 1, 64, 0, 0, 0, 0, 1, 64, 0, 0,
5, 0, 0, 0, 10, 128, 5, 0, 0, 0, 41, 0,
48, 0, 1, 0, 0, 0,
1, 0, 0, 0, 0, 0,
0, 0, 1, 64, 0, 0,
0, 0, 0, 0, 41, 0,
0, 7, 18, 0, 16, 0, 0, 7, 18, 0, 16, 0,
0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 10, 0,
16, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0,
@ -1582,12 +1513,12 @@ const BYTE resolve_fast_32bpp_1x2xmsaa_scaled_cs[] =
0, 0, 70, 14, 16, 0, 0, 0, 70, 14, 16, 0,
6, 0, 0, 0, 62, 0, 6, 0, 0, 0, 62, 0,
0, 1, 83, 84, 65, 84, 0, 1, 83, 84, 65, 84,
148, 0, 0, 0, 219, 0, 148, 0, 0, 0, 213, 0,
0, 0, 7, 0, 0, 0, 0, 0, 7, 0, 0, 0,
0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
64, 0, 0, 0, 52, 0, 65, 0, 0, 0, 47, 0,
0, 0, 11, 0, 0, 0, 0, 0, 10, 0, 0, 0,
15, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@ -1595,7 +1526,7 @@ const BYTE resolve_fast_32bpp_1x2xmsaa_scaled_cs[] =
0, 0, 0, 0, 2, 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, 11, 0, 0, 0, 0, 0, 9, 0, 0, 0,
1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -9,16 +9,9 @@
// { // {
// //
// uint xe_resolve_edram_info; // Offset: 0 Size: 4 // uint xe_resolve_edram_info; // Offset: 0 Size: 4
// uint xe_resolve_address_info; // Offset: 4 Size: 4 // uint xe_resolve_coordinate_info; // Offset: 4 Size: 4
// uint xe_resolve_dest_info; // Offset: 8 Size: 4 // uint xe_resolve_dest_info; // Offset: 8 Size: 4
// uint xe_resolve_dest_pitch_aligned;// Offset: 12 Size: 4 // uint xe_resolve_dest_coordinate_info;// Offset: 12 Size: 4
//
// }
//
// cbuffer XeResolveResolutionScaleConstant
// {
//
// uint xe_resolve_resolution_scale; // Offset: 0 Size: 4
// //
// } // }
// //
@ -30,7 +23,6 @@
// xe_resolve_source texture uint4 buf T0 t0 1 // xe_resolve_source texture uint4 buf T0 t0 1
// xe_resolve_dest UAV uint4 buf U0 u0 1 // xe_resolve_dest UAV uint4 buf U0 u0 1
// XeResolveConstants cbuffer NA NA CB0 cb0 1 // XeResolveConstants cbuffer NA NA CB0 cb0 1
// XeResolveResolutionScaleConstant cbuffer NA NA CB1 cb1 1
// //
// //
// //
@ -48,16 +40,14 @@
cs_5_1 cs_5_1
dcl_globalFlags refactoringAllowed dcl_globalFlags refactoringAllowed
dcl_constantbuffer CB0[0:0][1], immediateIndexed, space=0 dcl_constantbuffer CB0[0:0][1], immediateIndexed, space=0
dcl_constantbuffer CB1[1:1][1], immediateIndexed, space=0
dcl_resource_buffer (uint,uint,uint,uint) T0[0:0], space=0 dcl_resource_buffer (uint,uint,uint,uint) T0[0:0], space=0
dcl_uav_typed_buffer (uint,uint,uint,uint) U0[0:0], space=0 dcl_uav_typed_buffer (uint,uint,uint,uint) U0[0:0], space=0
dcl_input vThreadID.xy dcl_input vThreadID.xy
dcl_temps 7 dcl_temps 7
dcl_thread_group 8, 8, 1 dcl_thread_group 8, 8, 1
ishl r0.x, vThreadID.x, l(2) ishl r0.x, vThreadID.x, l(2)
ubfe r0.w, l(11), l(7), CB0[0][0].y ubfe r1.xy, l(11, 2, 0, 0), l(5, 27, 0, 0), CB0[0][0].yyyy
and r1.x, CB1[1][0].x, l(3) imul null, r0.w, r1.y, r1.x
imul null, r0.w, r0.w, r1.x
ishl r0.w, r0.w, l(3) ishl r0.w, r0.w, l(3)
uge r0.w, r0.x, r0.w uge r0.w, r0.x, r0.w
if_nz r0.w if_nz r0.w
@ -65,48 +55,43 @@ if_nz r0.w
endif endif
and r1.xyzw, CB0[0][0].zxxz, l(7, 0x40000000, 1023, 0x01000000) and r1.xyzw, CB0[0][0].zxxz, l(7, 0x40000000, 1023, 0x01000000)
if_nz r1.y if_nz r1.y
ushr r2.y, CB1[1][0].x, l(2) ubfe r2.xy, l(2, 2, 0, 0), l(27, 29, 0, 0), CB0[0][0].yyyy
mov r2.x, CB1[1][0].x
and r2.xy, r2.xyxx, l(3, 3, 0, 0)
ult r2.xy, l(1, 1, 0, 0), r2.xyxx ult r2.xy, l(1, 1, 0, 0), r2.xyxx
else else
mov r2.xy, l(0,0,0,0) mov r2.xy, l(0,0,0,0)
endif endif
and r0.w, r2.y, l(1) and r0.w, r2.y, l(1)
umax r0.y, r0.w, vThreadID.y umax r0.y, r0.w, vThreadID.y
ushr r3.xyz, CB0[0][0].yywy, l(5, 29, 10, 0) ushr r3.xyzw, CB0[0][0].ywww, l(4, 20, 24, 10)
mov r3.w, CB0[0][0].y mov r4.x, CB0[0][0].y
and r2.yz, r3.wwxw, l(0, 31, 3, 0) mov r4.y, r3.x
ushr r4.y, CB1[1][0].x, l(2) and r2.yz, r4.xxyx, l(0, 15, 1, 0)
mov r4.x, CB1[1][0].x ubfe r4.xyzw, l(2, 2, 12, 2), l(27, 29, 13, 10), CB0[0][0].yyxx
and r4.xy, r4.xyxx, l(3, 3, 0, 0)
imul null, r2.yz, r2.yyzy, r4.xxyx imul null, r2.yz, r2.yyzy, r4.xxyx
ishl r2.yz, r2.yyzy, l(0, 3, 3, 0) ishl r2.yz, r2.yyzy, l(0, 3, 3, 0)
iadd r0.yw, r0.xxxy, r2.yyyz iadd r0.yw, r0.xxxy, r2.yyyz
ubfe r2.yz, l(0, 12, 2, 0), l(0, 13, 10, 0), CB0[0][0].xxxx ubfe r5.y, l(3), l(28), CB0[0][0].w
uge r1.y, l(3), r3.y uge r1.y, l(3), r5.y
if_nz r1.y if_z r1.y
mov r5.y, r3.y ieq r1.y, r5.y, l(5)
else
ieq r1.y, r3.y, l(5)
if_nz r1.y if_nz r1.y
mov r5.y, l(2) mov r5.y, l(2)
else else
mov r5.y, l(0) mov r5.y, l(0)
endif endif
endif endif
uge r2.zw, r2.zzzz, l(0, 0, 2, 1) uge r2.yz, r4.wwww, l(0, 2, 1, 0)
and r2.zw, r2.zzzw, l(0, 0, 1, 1) and r2.yz, r2.yyzy, l(0, 1, 1, 0)
ishl r0.yw, r0.yyyw, r2.zzzw ishl r0.yw, r0.yyyw, r2.yyyz
ushr r5.x, r5.y, l(1) ushr r5.x, r5.y, l(1)
and r2.zw, r5.xxxy, l(0, 0, 1, 1) and r2.yz, r5.xxyx, l(0, 1, 1, 0)
iadd r0.yw, r0.yyyw, r2.zzzw iadd r0.yw, r0.yyyw, r2.yyyz
imul null, r5.yz, r4.xxyx, l(0, 80, 16, 0) imul null, r5.yz, r4.xxyx, l(0, 80, 16, 0)
ushr r5.x, r5.y, l(1) ushr r5.x, r5.y, l(1)
udiv r2.zw, null, r0.yyyw, r5.xxxz udiv r2.yz, null, r0.yywy, r5.xxzx
imad r1.y, r2.w, r1.z, r2.z imad r1.y, r2.z, r1.z, r2.y
iadd r1.y, r1.y, r2.y iadd r1.y, r1.y, r4.z
imad r0.yw, -r2.zzzw, r5.xxxz, r0.yyyw imad r0.yw, -r2.yyyz, r5.xxxz, r0.yyyw
imul null, r1.z, r5.z, r5.y imul null, r1.z, r5.z, r5.y
imad r0.y, r0.w, r5.x, r0.y imad r0.y, r0.w, r5.x, r0.y
ishl r0.y, r0.y, l(1) ishl r0.y, r0.y, l(1)
@ -130,7 +115,7 @@ if_nz r1.w
bfi r6.xyzw, l(16, 16, 16, 16), l(0, 0, 0, 0), r6.yxwz, r6.xyzw bfi r6.xyzw, l(16, 16, 16, 16), l(0, 0, 0, 0), r6.yxwz, r6.xyzw
endif endif
endif endif
bfi r0.yw, l(0, 2, 0, 2), l(0, 3, 0, 3), r3.wwwx, l(0, 0, 0, 0) bfi r0.yw, l(0, 4, 0, 4), l(0, 3, 0, 3), r3.yyyz, l(0, 0, 0, 0)
mov r0.z, vThreadID.y mov r0.z, vThreadID.y
imad r2.yz, r0.yywy, r4.xxyx, r0.xxzx imad r2.yz, r0.yywy, r4.xxyx, r0.xxzx
bfi r0.y, l(10), l(5), CB0[0][0].w, l(0) bfi r0.y, l(10), l(5), CB0[0][0].w, l(0)
@ -140,7 +125,7 @@ udiv r1.yz, null, r2.xxzx, r4.xxyx
ishl r0.w, r1.y, l(1) ishl r0.w, r1.y, l(1)
if_nz r0.z if_nz r0.z
ubfe r0.z, l(3), l(4), CB0[0][0].z ubfe r0.z, l(3), l(4), CB0[0][0].z
ishl r1.w, r3.z, l(5) ishl r1.w, r3.w, l(5)
ishr r2.yw, r1.zzzz, l(0, 4, 0, 3) ishr r2.yw, r1.zzzz, l(0, 4, 0, 3)
ishr r3.x, r0.z, l(2) ishr r3.x, r0.z, l(2)
ushr r1.w, r1.w, l(4) ushr r1.w, r1.w, l(4)
@ -229,7 +214,7 @@ if_nz r0.w
iadd r0.w, r0.x, l(1) iadd r0.w, r0.x, l(1)
ieq r0.w, r4.x, r0.w ieq r0.w, r4.x, r0.w
if_nz r0.w if_nz r0.w
bfi r0.w, l(2), l(5), CB1[1][0].x, l(0) ishl r0.w, r4.x, l(5)
ishl r0.x, r0.x, l(4) ishl r0.x, r0.x, l(4)
iadd r0.x, -r0.x, r0.w iadd r0.x, -r0.x, r0.w
else else
@ -260,104 +245,88 @@ if_nz r0.z
endif endif
store_uav_typed U0[0].xyzw, r0.xxxx, r6.xyzw store_uav_typed U0[0].xyzw, r0.xxxx, r6.xyzw
ret ret
// Approximately 206 instruction slots used // Approximately 200 instruction slots used
#endif #endif
const BYTE resolve_fast_64bpp_1x2xmsaa_scaled_cs[] = const BYTE resolve_fast_64bpp_1x2xmsaa_scaled_cs[] =
{ {
68, 88, 66, 67, 217, 58, 68, 88, 66, 67, 173, 4,
225, 5, 83, 76, 76, 76, 175, 119, 226, 10, 62, 188,
41, 4, 184, 58, 64, 138, 108, 229, 155, 184, 244, 120,
164, 215, 1, 0, 0, 0, 253, 26, 1, 0, 0, 0,
24, 29, 0, 0, 5, 0, 212, 27, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0, 0, 0, 52, 0, 0, 0,
56, 3, 0, 0, 72, 3, 152, 2, 0, 0, 168, 2,
0, 0, 88, 3, 0, 0, 0, 0, 184, 2, 0, 0,
124, 28, 0, 0, 82, 68, 56, 27, 0, 0, 82, 68,
69, 70, 252, 2, 0, 0, 69, 70, 92, 2, 0, 0,
2, 0, 0, 0, 52, 1, 1, 0, 0, 0, 236, 0,
0, 0, 4, 0, 0, 0, 0, 0, 3, 0, 0, 0,
60, 0, 0, 0, 1, 5, 60, 0, 0, 0, 1, 5,
83, 67, 0, 5, 0, 0, 83, 67, 0, 5, 0, 0,
212, 2, 0, 0, 19, 19, 52, 2, 0, 0, 19, 19,
68, 37, 60, 0, 0, 0, 68, 37, 60, 0, 0, 0,
24, 0, 0, 0, 40, 0, 24, 0, 0, 0, 40, 0,
0, 0, 40, 0, 0, 0, 0, 0, 40, 0, 0, 0,
36, 0, 0, 0, 12, 0, 36, 0, 0, 0, 12, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
220, 0, 0, 0, 2, 0, 180, 0, 0, 0, 2, 0,
0, 0, 4, 0, 0, 0, 0, 0, 4, 0, 0, 0,
1, 0, 0, 0, 255, 255, 1, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0, 255, 255, 0, 0, 0, 0,
1, 0, 0, 0, 12, 0, 1, 0, 0, 0, 12, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 238, 0, 0, 0, 0, 0, 198, 0,
0, 0, 4, 0, 0, 0, 0, 0, 4, 0, 0, 0,
4, 0, 0, 0, 1, 0, 4, 0, 0, 0, 1, 0,
0, 0, 255, 255, 255, 255, 0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0,
0, 0, 12, 0, 0, 0, 0, 0, 12, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 254, 0, 0, 0, 0, 0, 214, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0,
1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
17, 1, 0, 0, 0, 0, 120, 101, 95, 114, 101, 115,
0, 0, 0, 0, 0, 0, 111, 108, 118, 101, 95, 115,
0, 0, 0, 0, 0, 0, 111, 117, 114, 99, 101, 0,
0, 0, 1, 0, 0, 0, 120, 101, 95, 114, 101, 115,
1, 0, 0, 0, 1, 0, 111, 108, 118, 101, 95, 100,
0, 0, 0, 0, 0, 0, 101, 115, 116, 0, 88, 101,
1, 0, 0, 0, 120, 101, 82, 101, 115, 111, 108, 118,
95, 114, 101, 115, 111, 108, 101, 67, 111, 110, 115, 116,
118, 101, 95, 115, 111, 117, 97, 110, 116, 115, 0, 171,
114, 99, 101, 0, 120, 101, 171, 171, 214, 0, 0, 0,
95, 114, 101, 115, 111, 108, 4, 0, 0, 0, 4, 1,
118, 101, 95, 100, 101, 115,
116, 0, 88, 101, 82, 101,
115, 111, 108, 118, 101, 67,
111, 110, 115, 116, 97, 110,
116, 115, 0, 88, 101, 82,
101, 115, 111, 108, 118, 101,
82, 101, 115, 111, 108, 117,
116, 105, 111, 110, 83, 99,
97, 108, 101, 67, 111, 110,
115, 116, 97, 110, 116, 0,
171, 171, 254, 0, 0, 0,
4, 0, 0, 0, 100, 1,
0, 0, 16, 0, 0, 0, 0, 0, 16, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 17, 1, 0, 0, 0, 0, 164, 1, 0, 0,
1, 0, 0, 0, 144, 2,
0, 0, 16, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 4, 2, 0, 0,
0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 4, 0,
0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0,
32, 2, 0, 0, 0, 0, 192, 1, 0, 0, 0, 0,
0, 0, 255, 255, 255, 255, 0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 255, 255, 0, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0, 255, 255, 0, 0, 0, 0,
68, 2, 0, 0, 4, 0, 228, 1, 0, 0, 4, 0,
0, 0, 4, 0, 0, 0, 0, 0, 4, 0, 0, 0,
2, 0, 0, 0, 32, 2, 2, 0, 0, 0, 192, 1,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
255, 255, 255, 255, 0, 0, 255, 255, 255, 255, 0, 0,
0, 0, 255, 255, 255, 255, 0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 92, 2, 0, 0, 0, 0, 255, 1,
0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0,
4, 0, 0, 0, 2, 0, 4, 0, 0, 0, 2, 0,
0, 0, 32, 2, 0, 0, 0, 0, 192, 1, 0, 0,
0, 0, 0, 0, 255, 255, 0, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0, 255, 255, 0, 0, 0, 0,
255, 255, 255, 255, 0, 0, 255, 255, 255, 255, 0, 0,
0, 0, 113, 2, 0, 0, 0, 0, 20, 2, 0, 0,
12, 0, 0, 0, 4, 0, 12, 0, 0, 0, 4, 0,
0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0,
32, 2, 0, 0, 0, 0, 192, 1, 0, 0, 0, 0,
0, 0, 255, 255, 255, 255, 0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 255, 255, 0, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0, 255, 255, 0, 0, 0, 0,
@ -371,190 +340,164 @@ const BYTE resolve_fast_64bpp_1x2xmsaa_scaled_cs[] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
26, 2, 0, 0, 120, 101, 186, 1, 0, 0, 120, 101,
95, 114, 101, 115, 111, 108, 95, 114, 101, 115, 111, 108,
118, 101, 95, 97, 100, 100, 118, 101, 95, 99, 111, 111,
114, 101, 115, 115, 95, 105, 114, 100, 105, 110, 97, 116,
101, 95, 105, 110, 102, 111,
0, 120, 101, 95, 114, 101,
115, 111, 108, 118, 101, 95,
100, 101, 115, 116, 95, 105,
110, 102, 111, 0, 120, 101, 110, 102, 111, 0, 120, 101,
95, 114, 101, 115, 111, 108, 95, 114, 101, 115, 111, 108,
118, 101, 95, 100, 101, 115, 118, 101, 95, 100, 101, 115,
116, 95, 105, 110, 102, 111, 116, 95, 99, 111, 111, 114,
0, 120, 101, 95, 114, 101, 100, 105, 110, 97, 116, 101,
115, 111, 108, 118, 101, 95, 95, 105, 110, 102, 111, 0,
100, 101, 115, 116, 95, 112, 77, 105, 99, 114, 111, 115,
105, 116, 99, 104, 95, 97, 111, 102, 116, 32, 40, 82,
108, 105, 103, 110, 101, 100, 41, 32, 72, 76, 83, 76,
0, 171, 184, 2, 0, 0, 32, 83, 104, 97, 100, 101,
0, 0, 0, 0, 4, 0, 114, 32, 67, 111, 109, 112,
0, 0, 2, 0, 0, 0, 105, 108, 101, 114, 32, 49,
32, 2, 0, 0, 0, 0, 48, 46, 49, 0, 73, 83,
0, 0, 255, 255, 255, 255, 71, 78, 8, 0, 0, 0,
0, 0, 0, 0, 255, 255, 0, 0, 0, 0, 8, 0,
255, 255, 0, 0, 0, 0, 0, 0, 79, 83, 71, 78,
120, 101, 95, 114, 101, 115,
111, 108, 118, 101, 95, 114,
101, 115, 111, 108, 117, 116,
105, 111, 110, 95, 115, 99,
97, 108, 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, 73, 83, 71, 78,
8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0,
0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0,
79, 83, 71, 78, 8, 0, 83, 72, 69, 88, 120, 24,
0, 0, 81, 0, 5, 0,
30, 6, 0, 0, 106, 8,
0, 1, 89, 0, 0, 7,
70, 142, 48, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
8, 0, 0, 0, 83, 72, 0, 0, 0, 0, 1, 0,
69, 88, 28, 25, 0, 0, 0, 0, 0, 0, 0, 0,
81, 0, 5, 0, 71, 6, 88, 8, 0, 7, 70, 126,
0, 0, 106, 8, 0, 1,
89, 0, 0, 7, 70, 142,
48, 0, 0, 0, 0, 0, 48, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 89, 0,
0, 7, 70, 142, 48,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38, 0, 0, 11, 0, 0, 38, 0, 0, 11,
0, 208, 0, 0, 98, 0, 0, 208, 0, 0, 98, 0,
16, 0, 5, 0, 0, 0, 16, 0, 5, 0, 0, 0,
@ -657,24 +592,24 @@ const BYTE resolve_fast_64bpp_1x2xmsaa_scaled_cs[] =
16, 0, 5, 0, 0, 0, 16, 0, 5, 0, 0, 0,
1, 64, 0, 0, 1, 0, 1, 64, 0, 0, 1, 0,
0, 0, 78, 0, 0, 8, 0, 0, 78, 0, 0, 8,
194, 0, 16, 0, 2, 0, 98, 0, 16, 0, 2, 0,
0, 0, 0, 208, 0, 0, 0, 0, 0, 208, 0, 0,
86, 13, 16, 0, 0, 0, 86, 7, 16, 0, 0, 0,
0, 0, 6, 8, 16, 0, 0, 0, 6, 2, 16, 0,
5, 0, 0, 0, 35, 0, 5, 0, 0, 0, 35, 0,
0, 9, 34, 0, 16, 0, 0, 9, 34, 0, 16, 0,
1, 0, 0, 0, 58, 0, 1, 0, 0, 0, 42, 0,
16, 0, 2, 0, 0, 0, 16, 0, 2, 0, 0, 0,
42, 0, 16, 0, 1, 0, 42, 0, 16, 0, 1, 0,
0, 0, 42, 0, 16, 0, 0, 0, 26, 0, 16, 0,
2, 0, 0, 0, 30, 0, 2, 0, 0, 0, 30, 0,
0, 7, 34, 0, 16, 0, 0, 7, 34, 0, 16, 0,
1, 0, 0, 0, 26, 0, 1, 0, 0, 0, 26, 0,
16, 0, 1, 0, 0, 0, 16, 0, 1, 0, 0, 0,
26, 0, 16, 0, 2, 0, 42, 0, 16, 0, 4, 0,
0, 0, 35, 0, 0, 10, 0, 0, 35, 0, 0, 10,
162, 0, 16, 0, 0, 0, 162, 0, 16, 0, 0, 0,
0, 0, 166, 14, 16, 128, 0, 0, 86, 9, 16, 128,
65, 0, 0, 0, 2, 0, 65, 0, 0, 0, 2, 0,
0, 0, 6, 8, 16, 0, 0, 0, 6, 8, 16, 0,
5, 0, 0, 0, 86, 13, 5, 0, 0, 0, 86, 13,
@ -789,13 +724,13 @@ const BYTE resolve_fast_64bpp_1x2xmsaa_scaled_cs[] =
0, 1, 140, 0, 0, 20, 0, 1, 140, 0, 0, 20,
162, 0, 16, 0, 0, 0, 162, 0, 16, 0, 0, 0,
0, 0, 2, 64, 0, 0, 0, 0, 2, 64, 0, 0,
0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2, 0, 0, 0, 2, 64, 4, 0, 0, 0, 2, 64,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0,
0, 0, 3, 0, 0, 0, 0, 0, 3, 0, 0, 0,
246, 3, 16, 0, 3, 0, 86, 9, 16, 0, 3, 0,
0, 0, 2, 64, 0, 0, 0, 0, 2, 64, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@ -849,7 +784,7 @@ const BYTE resolve_fast_64bpp_1x2xmsaa_scaled_cs[] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
41, 0, 0, 7, 130, 0, 41, 0, 0, 7, 130, 0,
16, 0, 1, 0, 0, 0, 16, 0, 1, 0, 0, 0,
42, 0, 16, 0, 3, 0, 58, 0, 16, 0, 3, 0,
0, 0, 1, 64, 0, 0, 0, 0, 1, 64, 0, 0,
5, 0, 0, 0, 42, 0, 5, 0, 0, 0, 42, 0,
0, 10, 162, 0, 16, 0, 0, 10, 162, 0, 16, 0,
@ -1356,15 +1291,11 @@ const BYTE resolve_fast_64bpp_1x2xmsaa_scaled_cs[] =
58, 0, 16, 0, 0, 0, 58, 0, 16, 0, 0, 0,
0, 0, 31, 0, 4, 3, 0, 0, 31, 0, 4, 3,
58, 0, 16, 0, 0, 0, 58, 0, 16, 0, 0, 0,
0, 0, 140, 0, 0, 13, 0, 0, 41, 0, 0, 7,
130, 0, 16, 0, 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0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -9,28 +9,21 @@ cbuffer XeResolveConstants : register(b0) {
#ifdef XE_RESOLVE_CLEAR #ifdef XE_RESOLVE_CLEAR
uint2 xe_resolve_clear_value; uint2 xe_resolve_clear_value;
#endif #endif
// xe::gpu::draw_util::ResolveSourcePackedInfo. // xe::gpu::draw_util::ResolveEdramInfo.
uint xe_resolve_edram_info; uint xe_resolve_edram_info;
// xe::gpu::draw_util::ResolveAddressPackedInfo. // xe::gpu::draw_util::ResolveCoordinateInfo.
uint xe_resolve_address_info; uint xe_resolve_coordinate_info;
#ifndef XE_RESOLVE_CLEAR #ifndef XE_RESOLVE_CLEAR
// Sanitized RB_COPY_DEST_INFO. // Sanitized RB_COPY_DEST_INFO.
uint xe_resolve_dest_info; uint xe_resolve_dest_info;
// xe::gpu::draw_util::ResolveCopyDestPitchPackedInfo. // xe::gpu::draw_util::ResolveCopyDestCoordinateInfo.
uint xe_resolve_dest_pitch_aligned; uint xe_resolve_dest_coordinate_info;
#ifndef XE_RESOLVE_RESOLUTION_SCALED #ifndef XE_RESOLVE_RESOLUTION_SCALED
uint xe_resolve_dest_base; uint xe_resolve_dest_base;
#endif #endif
#endif #endif
}; };
#ifdef XE_RESOLVE_RESOLUTION_SCALED
cbuffer XeResolveResolutionScaleConstant : register(b1) {
// xe::gpu::draw_util::ResolveResolutionScaleConstant.
uint xe_resolve_resolution_scale;
}
#endif
uint XeResolveEdramPitchTiles() { uint XeResolveEdramPitchTiles() {
return xe_resolve_edram_info & ((1u << 10u) - 1u); return xe_resolve_edram_info & ((1u << 10u) - 1u);
} }
@ -67,7 +60,7 @@ uint XeResolveEdramPixelStrideInts() {
uint2 XeResolveResolutionScale() { uint2 XeResolveResolutionScale() {
#ifdef XE_RESOLVE_RESOLUTION_SCALED #ifdef XE_RESOLVE_RESOLUTION_SCALED
return (xe_resolve_resolution_scale.xx >> uint2(0u, 2u)) & 3u; return (xe_resolve_coordinate_info.xx >> uint2(27u, 29u)) & 3u;
#else #else
return uint2(1u, 1u); return uint2(1u, 1u);
#endif #endif
@ -95,12 +88,8 @@ bool2 XeResolveDuplicateSecondHostPixel() {
// Within 160x32 guest pixels, total value relative to the source EDRAM base, // Within 160x32 guest pixels, total value relative to the source EDRAM base,
// & 31 of * 8 relative to the destination texture base. // & 31 of * 8 relative to the destination texture base.
uint2 XeResolveUnscaledOffsetDiv8() { uint2 XeResolveUnscaledOffsetDiv8() {
return return (xe_resolve_coordinate_info >> uint2(0u, 4u)) &
(xe_resolve_address_info >> uint2(0u, 5u)) & ((1u << uint2(5u, 2u)) - 1u); ((1u << uint2(4u, 1u)) - 1u);
}
uint2 XeResolveUnscaledOffset() {
return XeResolveUnscaledOffsetDiv8() << 3u;
} }
uint2 XeResolveScaledOffsetDiv8() { uint2 XeResolveScaledOffsetDiv8() {
@ -112,7 +101,7 @@ uint2 XeResolveScaledOffset() {
} }
uint2 XeResolveUnscaledSizeDiv8() { uint2 XeResolveUnscaledSizeDiv8() {
return (xe_resolve_address_info >> uint2(7u, 18u)) & ((1u << 11u) - 1u); return (xe_resolve_coordinate_info >> uint2(5u, 16u)) & ((1u << 11u) - 1u);
} }
uint2 XeResolveScaledSizeDiv8() { uint2 XeResolveScaledSizeDiv8() {
@ -153,7 +142,7 @@ uint2 XeResolveScaledSize() {
} }
uint XeResolveDestRowPitchAlignedDiv32() { uint XeResolveDestRowPitchAlignedDiv32() {
return xe_resolve_dest_pitch_aligned & ((1u << 10u) - 1u); return xe_resolve_dest_coordinate_info & ((1u << 10u) - 1u);
} }
uint XeResolveDestRowPitchAligned() { uint XeResolveDestRowPitchAligned() {
@ -161,16 +150,21 @@ uint2 XeResolveScaledSize() {
} }
uint XeResolveDestSlicePitchAlignedDiv32() { uint XeResolveDestSlicePitchAlignedDiv32() {
return (xe_resolve_dest_pitch_aligned >> 10u) & ((1u << 10u) - 1u); return (xe_resolve_dest_coordinate_info >> 10u) & ((1u << 10u) - 1u);
} }
uint XeResolveDestSlicePitchAligned() { uint XeResolveDestSlicePitchAligned() {
return XeResolveDestSlicePitchAlignedDiv32() << 5u; return XeResolveDestSlicePitchAlignedDiv32() << 5u;
} }
uint2 XeResolveDestUnscaledXYOffsetDiv8() {
return (xe_resolve_dest_coordinate_info.xx >> uint2(20u, 24u)) &
((1u << 4u) - 1u);
}
uint XeResolveDestPixelAddress(uint2 p, uint bpp_log2) { uint XeResolveDestPixelAddress(uint2 p, uint bpp_log2) {
uint2 resolution_scale = XeResolveResolutionScale(); uint2 resolution_scale = XeResolveResolutionScale();
p += (XeResolveUnscaledOffset() & 31u) * resolution_scale; p += (XeResolveDestUnscaledXYOffsetDiv8() << 3u) * resolution_scale;
uint address; uint address;
uint row_pitch = XeResolveDestRowPitchAligned(); uint row_pitch = XeResolveDestRowPitchAligned();
#ifdef XE_RESOLVE_RESOLUTION_SCALED #ifdef XE_RESOLVE_RESOLUTION_SCALED
@ -213,7 +207,7 @@ uint2 XeResolveScaledSize() {
#define kXenosCopySampleSelect_0123 6u #define kXenosCopySampleSelect_0123 6u
uint XeResolveSampleSelect() { uint XeResolveSampleSelect() {
return xe_resolve_address_info >> 29u; return (xe_resolve_dest_coordinate_info >> 28u) & ((1u << 3u) - 1u);
} }
uint XeResolveFirstSampleIndex() { uint XeResolveFirstSampleIndex() {

View File

@ -2,7 +2,7 @@
****************************************************************************** ******************************************************************************
* Xenia : Xbox 360 Emulator Research Project * * Xenia : Xbox 360 Emulator Research Project *
****************************************************************************** ******************************************************************************
* Copyright 2018 Ben Vanik. All rights reserved. * * Copyright 2022 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. * * Released under the BSD license - see LICENSE in the root for more details. *
****************************************************************************** ******************************************************************************
*/ */
@ -346,12 +346,10 @@ TextureGuestLayout GetGuestTextureLayout(
uint32_t z_stride_bytes = level_layout.array_slice_stride_bytes; uint32_t z_stride_bytes = level_layout.array_slice_stride_bytes;
if (dimension == xenos::DataDimension::k3D) { if (dimension == xenos::DataDimension::k3D) {
level_layout.array_slice_stride_bytes *= level_layout.array_slice_stride_bytes *=
xe::align(depth_or_array_size, xenos::kTextureTiledDepthGranularity); xe::align(depth_or_array_size, xenos::kTextureTileDepth);
} }
uint32_t array_slice_stride_bytes_non_4kb_aligned =
level_layout.array_slice_stride_bytes;
level_layout.array_slice_stride_bytes = level_layout.array_slice_stride_bytes =
xe::align(array_slice_stride_bytes_non_4kb_aligned, xe::align(level_layout.array_slice_stride_bytes,
xenos::kTextureSubresourceAlignmentBytes); xenos::kTextureSubresourceAlignmentBytes);
// Estimate the memory amount actually referenced by the texture, which may // Estimate the memory amount actually referenced by the texture, which may
@ -374,43 +372,38 @@ TextureGuestLayout GetGuestTextureLayout(
xe::align(level_width_blocks, xenos::kTextureTileWidthHeight); xe::align(level_width_blocks, xenos::kTextureTileWidthHeight);
level_layout.y_extent_blocks = level_layout.y_extent_blocks =
xe::align(level_height_blocks, xenos::kTextureTileWidthHeight); xe::align(level_height_blocks, xenos::kTextureTileWidthHeight);
uint32_t bytes_per_block_log2 = xe::log2_floor(bytes_per_block);
if (dimension == xenos::DataDimension::k3D) { if (dimension == xenos::DataDimension::k3D) {
level_layout.z_extent = level_layout.z_extent =
xe::align(level_depth, xenos::kTextureTiledDepthGranularity); xe::align(level_depth, xenos::kTextureTileDepth);
// 3D texture addressing is pretty complex, so it's hard to determine // 32-block-row x 4 slice portions laid out sequentially (4-slice-major,
// the memory extent of a subregion - just use `pitch_tiles * // 32-block-row-minor), address extent within a 32x32x4 tile depends on
// height_tiles * depth_tiles * bytes_per_tile` at least for now, until // the pitch. Origins of 32x32x4 tiles grow monotonically, first along
// we find a case where it causes issues. `width > pitch` is a very // Z, then along Y, then along X.
// weird edge case anyway, and is extremely unlikely.
assert_true(level_layout.x_extent_blocks <=
row_pitch_blocks_tile_aligned);
level_layout.array_slice_data_extent_bytes = level_layout.array_slice_data_extent_bytes =
array_slice_stride_bytes_non_4kb_aligned; GetTiledAddressUpperBound3D(
level_layout.x_extent_blocks, level_layout.y_extent_blocks,
level_layout.z_extent, row_pitch_blocks_tile_aligned,
level_layout.y_extent_blocks, bytes_per_block_log2);
} else { } else {
level_layout.z_extent = 1; level_layout.z_extent = 1;
// 2D 32x32-block tiles are laid out linearly in the texture. // Origins of 32x32 tiles grow monotonically, first along Y, then along
// Calculate the extent as ((all rows except for the last * pitch in // X.
// tiles + last row length in tiles) * bytes per tile).
// FIXME(Triang3l): This is wrong for 1bpb and 2bpb. At 1bpb (32x32 is
// 1024 bytes), offset for X + 32 minus offset for X is 512, not 1024,
// but offset for X + 128 minus offset for X + 96 is 2560. Also, for
// XY = 0...31, the extent of the addresses is 2560, not 1024. At 2bpb,
// addressing repeats every 64x64, and the extent for XY = 0...31 is
// 3072, not 2048.
level_layout.array_slice_data_extent_bytes = level_layout.array_slice_data_extent_bytes =
(level_layout.y_extent_blocks - xenos::kTextureTileWidthHeight) * GetTiledAddressUpperBound2D(
level_layout.row_pitch_bytes + level_layout.x_extent_blocks, level_layout.y_extent_blocks,
bytes_per_block * level_layout.x_extent_blocks * row_pitch_blocks_tile_aligned, bytes_per_block_log2);
xenos::kTextureTileWidthHeight;
} }
} else { } else {
if (level == layout.packed_level) { if (level == layout.packed_level) {
// Calculate the portion of the mip tail actually used by the needed // Calculate the portion of the mip tail actually used by the needed
// mips. The actually used region may be significantly smaller than the // mips. The actually used region may be significantly smaller than the
// full 32x32-texel-aligned tail. A 2x2 texture (for example, in Test // full 32x32-texel-aligned tail. A 2x2 texture (for example, in
// Drive Unlimited, there's a 2x2 k_8_8_8_8 linear texture with packed // 494707D4, there's a 2x2 k_8_8_8_8 linear texture with packed mips),
// mips), for instance, would have its 2x2 base at (16, 0) and its 1x1 // for instance, would have its 2x2 base at (16, 0) and its 1x1 mip at
// mip at (8, 0) - and we need 2 or 1 rows in these cases, not 32. // (8, 0) - and we need 2 or 1 rows in these cases, not 32 - the 32 rows
// would span two 4 KB pages rather than one, taking the 256-byte pitch
// alignment in linear textures into account.
level_layout.x_extent_blocks = 0; level_layout.x_extent_blocks = 0;
level_layout.y_extent_blocks = 0; level_layout.y_extent_blocks = 0;
level_layout.z_extent = 0; level_layout.z_extent = 0;
@ -514,6 +507,69 @@ int32_t GetTiledOffset3D(int32_t x, int32_t y, int32_t z, uint32_t pitch,
return address; return address;
} }
uint32_t GetTiledAddressUpperBound2D(uint32_t right, uint32_t bottom,
uint32_t pitch,
uint32_t bytes_per_block_log2) {
if (!right || !bottom) {
return 0;
}
// Get the origin of the 32x32 tile containing the last texel.
uint32_t upper_bound = uint32_t(GetTiledOffset2D(
int32_t((right - 1) & ~(xenos::kTextureTileWidthHeight - 1)),
int32_t((bottom - 1) & ~(xenos::kTextureTileWidthHeight - 1)), pitch,
bytes_per_block_log2));
switch (bytes_per_block_log2) {
case 0:
// Independent addressing within 128x128 portions, but the extent is 0xA00
// bytes from the 32x32 tile origin.
upper_bound += 0xA00;
break;
case 1:
// Independent addressing within 64x64 portions, but the extent is 0xC00
// bytes from the 32x32 tile origin.
upper_bound += 0xC00;
break;
default:
upper_bound += UINT32_C(0x400) << bytes_per_block_log2;
break;
}
return upper_bound;
}
uint32_t GetTiledAddressUpperBound3D(uint32_t right, uint32_t bottom,
uint32_t back, uint32_t pitch,
uint32_t height,
uint32_t bytes_per_block_log2) {
if (!right || !bottom || !back) {
return 0;
}
// Get the origin of the 32x32x4 tile containing the last texel.
uint32_t upper_bound = uint32_t(GetTiledOffset3D(
int32_t((right - 1) & ~(xenos::kTextureTileWidthHeight - 1)),
int32_t((bottom - 1) & ~(xenos::kTextureTileWidthHeight - 1)),
int32_t((back - 1) & ~(xenos::kTextureTileDepth - 1)), pitch, height,
bytes_per_block_log2));
uint32_t pitch_aligned = xe::align(pitch, xenos::kTextureTileWidthHeight);
switch (bytes_per_block_log2) {
case 0:
// 64x32x8 portions have independent addressing.
// Extent relative to the 32x32x4 tile origin:
// - Pitch = 32, 96, 160...: (Pitch / 64) * 0x1000 + 0x1000
// - Pitch = 64, 128, 192...: (Pitch / 64) * 0x1000 + 0xC00
upper_bound += ((pitch_aligned >> 6) << 12) + 0xC00 +
((pitch_aligned & (1 << 5)) << (10 - 5));
break;
default:
// 32x32x8 portions have independent addressing.
// Extent: ((Pitch / 32) * 0x1000 + 0x1000) * (BPB / 2)
// Or: ((Pitch / 32) * 0x1000 / 2 + 0x1000 / 2) * BPB
upper_bound += ((pitch_aligned << (12 - 5 - 1)) + (0x1000 >> 1))
<< bytes_per_block_log2;
break;
}
return upper_bound;
}
uint8_t SwizzleSigns(const xenos::xe_gpu_texture_fetch_t& fetch) { uint8_t SwizzleSigns(const xenos::xe_gpu_texture_fetch_t& fetch) {
uint8_t signs = 0; uint8_t signs = 0;
bool any_not_signed = false, any_signed = false; bool any_not_signed = false, any_signed = false;

View File

@ -2,7 +2,7 @@
****************************************************************************** ******************************************************************************
* Xenia : Xbox 360 Emulator Research Project * * Xenia : Xbox 360 Emulator Research Project *
****************************************************************************** ******************************************************************************
* Copyright 2018 Ben Vanik. All rights reserved. * * Copyright 2022 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. * * Released under the BSD license - see LICENSE in the root for more details. *
****************************************************************************** ******************************************************************************
*/ */
@ -198,22 +198,71 @@ void GetTextureTotalSize(xenos::DataDimension dimension,
bool has_packed_mips, uint32_t* base_size_out, bool has_packed_mips, uint32_t* base_size_out,
uint32_t* mip_size_out); uint32_t* mip_size_out);
// Notes about tiled addresses that can be useful for simplifying and optimizing // Notes about tiled addresses:
// tiling/untiling: // - The tiled address calculation functions work for both positive and negative
// - Offset2D(X * 32 + x, Y * 32 + y) == // offsets, so they can be used to go both from the origin of the texture to a
// Offset2D(X * 32, Y * 32) + Offset2D(x, y) // region inside it and back (as long as the coordinates are a multiple of the
// (true for negative offsets too). // period of the tiled address function in each direction - depends on whether
// - Offset3D(X * 32 + x, Y * 32 + y, Z * 8 + z) == // the texture is 2D or 3D, and on the number of bytes per block). This is, in
// Offset3D(X * 32, Y * 32, Z * 8) + Offset3D(x, y, z) // particular, used by Direct3D 9 inside resolving to allow resolving with an
// (true for negative offsets too). // offset in the texture, so the rectangle coordinates are relative to both
// - 2D 32x32 tiles are laid out linearly. // the render target and the region (with the appropriate alignment) in the
// FIXME(Triang3l): This is wrong for 1bpb and 2bpb. At 1bpb (32x32 is 1024 // texture at the same time.
// bytes), offset for X + 32 minus offset for X is 512, not 1024, but offset for // - 2D:
// X + 128 minus offset for X + 96 is 2560. Also, for XY = 0...31, the extent of // - Origins of 32x32-block tiles grow monotonically as Y/32 (in blocks)
// the addresses is 2560, not 1024. At 2bpb, addressing repeats every 64x64, and // increases, and in each tile row, as X/32 (in blocks) increases.
// the extent for XY = 0...31 is 3072, not 2048. // - In each 32x32 tile, the block at (0, 0) within the tile has the address
// - 3D tiled texture slices 0:3 and 4:7 are stored separately in memory, in // that matches the origin of the tile itself. This is not true for the
// non-overlapping ranges, but addressing in 4:7 is different than in 0:3. // block (31, 31), however - its address will be somewhere within the memory
// extent of the tile.
// - 1bpb:
// - The tiled address sequence repeats every 128 blocks along X or Y.
// - 32x32 tiles have their origins 0x200-bytes-aligned, and the addresses
// of the blocks within a 32x32 tile span 0xA00 bytes.
// - Note that 32x32x1bpb is 0x400 bytes, but addresses of blocks within a
// tile span the range of 0xA00 bytes - so 32x32 tiles are stored in
// memory ranges that may overlap (even across 128x128 - with the pitch of
// 192 blocks, the tile at (96, 32)...(127, 63) spans 0x2200...0x2BFF,
// while the tile at (128, 32)...(159, 63) spans 0x2400...0x2DFF.
// - All blocks within a 32x32 tile are located in the same 4KB-aligned
// region.
// - 2bpb:
// - The approach to storage is conceptually similar to that of 1bpb, with
// some quantitative differences.
// - The tiled address sequence repeats every 64 blocks along X or Y.
// - 32x32 tiles have their origins 0x400-bytes-aligned, and the addresses
// of the blocks within a 32x32 tile span 0xC00 bytes.
// - 4bpb and larger:
// - 32x32 tiles (which themselves are 4 KB or larger in this case) are
// stored simply in a tile-row-major way, separately from each other in
// memory, with independent addressing within each tile.
// - 3D:
// - Origins of 32x32x4-block tiles grow monotonically as Z/4 increases, and
// in each 4-slice portion, as Y/32 (in blocks) increases, and in each tile
// row, as X/32 (in blocks) increases.
// - Along Z, addressing repeats every 8 slices. Along Y, addressing repeats
// every 32 blocks regardless of the number of bytes per block.
// - 32-block-row x 4-slice portions are stored in disjoint 4KB-aligned ranges
// in memory (thus every 4 slices are also stored in disjoint ranges).
// - Addresses within a 32x32x4-block tile span widely throughout the X pitch,
// with a lot of overlap between 32x32x4 tiles with different X.
// - 1bpb:
// - The tiled address sequence repeats every 64 blocks along X.
// - Origins of 32x32x4-block tiles within 32-block-row x 4-slice portions:
// - X = 0, 64, 128...: (X / 64) * 0x1000
// - X = 32, 96, 160...: (X / 64) * 0x1000 + 0x400
// - Or: ((X >> 6) << 12) | (((X >> 5) & 1) << 10)
// - Span of the addresses within a 32x32x4-block tile:
// - Pitch = 32, 96, 160...: (Pitch / 64) * 0x1000 + 0x1000
// - Pitch = 64, 128, 192...: (Pitch / 64) * 0x1000 + 0xC00
// - Or: ((Pitch >> 6) << 12) + 0xC00 + (((Pitch >> 5) & 1) << 10)
// - Or: ((Pitch >> 6) << 12) + 0xC00 + ((Pitch & (1 << 5)) << (10 - 5))
// - 2bpb and larger:
// - The tiled address sequence repeats every 32 blocks along X.
// - Origins of 32x32x4-block tiles within 32-block-row x 4-slice portions:
// (X / 32) * 0x1000 * (BPB / 2)
// - Span of the addresses within a 32x32x4-block tile:
// ((Pitch / 32) * 0x1000 + 0x1000) * (BPB / 2)
// - Addressing of blocks that are contiguous along X (for tiling/untiling of // - Addressing of blocks that are contiguous along X (for tiling/untiling of
// larger portions at once): // larger portions at once):
// - 1bpb - each 8 blocks are laid out sequentially, odd 8 blocks = // - 1bpb - each 8 blocks are laid out sequentially, odd 8 blocks =
@ -237,6 +286,37 @@ int32_t GetTiledOffset2D(int32_t x, int32_t y, uint32_t pitch,
uint32_t bytes_per_block_log2); uint32_t bytes_per_block_log2);
int32_t GetTiledOffset3D(int32_t x, int32_t y, int32_t z, uint32_t pitch, int32_t GetTiledOffset3D(int32_t x, int32_t y, int32_t z, uint32_t pitch,
uint32_t height, uint32_t bytes_per_block_log2); uint32_t height, uint32_t bytes_per_block_log2);
// Because (0, 0, 0) within each 32x32x4-block tile is stored in memory first,
// and the tiled address grows monotonically with Z/4, then Y/32, then X/32
// blocks.
inline uint32_t GetTiledAddressLowerBound2D(uint32_t left, uint32_t top,
uint32_t pitch,
uint32_t bytes_per_block_log2) {
return uint32_t(
GetTiledOffset2D(int32_t(left & ~(xenos::kTextureTileWidthHeight - 1)),
int32_t(top & ~(xenos::kTextureTileWidthHeight - 1)),
pitch, bytes_per_block_log2));
}
inline uint32_t GetTiledAddressLowerBound3D(uint32_t left, uint32_t top,
uint32_t front, uint32_t pitch,
uint32_t height,
uint32_t bytes_per_block_log2) {
return uint32_t(
GetTiledOffset3D(int32_t(left & ~(xenos::kTextureTileWidthHeight - 1)),
int32_t(top & ~(xenos::kTextureTileWidthHeight - 1)),
int32_t(front & ~(xenos::kTextureTileDepth)), pitch,
height, bytes_per_block_log2));
}
// Supporting the right > pitch and bottom > height (in tiles) cases also, for
// estimation how far addresses can actually go even potentially beyond the
// subresource stride.
uint32_t GetTiledAddressUpperBound2D(uint32_t right, uint32_t bottom,
uint32_t pitch,
uint32_t bytes_per_block_log2);
uint32_t GetTiledAddressUpperBound3D(uint32_t right, uint32_t bottom,
uint32_t back, uint32_t pitch,
uint32_t height,
uint32_t bytes_per_block_log2);
// Returns four packed TextureSign values swizzled according to the swizzle in // Returns four packed TextureSign values swizzled according to the swizzle in
// the fetch constant, so the shader can apply TextureSigns after reading a // the fetch constant, so the shader can apply TextureSigns after reading a

View File

@ -1049,19 +1049,27 @@ constexpr uint32_t kTextureMaxMips =
std::max(kTexture2DCubeMaxWidthHeightLog2, kTexture3DMaxWidthHeightLog2) + std::max(kTexture2DCubeMaxWidthHeightLog2, kTexture3DMaxWidthHeightLog2) +
1; 1;
// Tiled texture sizes are in 32x32 increments for 2D, 32x32x4 for 3D.
// 2DTiledOffset(X * 32 + x, Y * 32 + y) ==
// 2DTiledOffset(X * 32, Y * 32) + 2DTiledOffset(x, y)
// 3DTiledOffset(X * 32 + x, Y * 32 + y, Z * 8 + z) ==
// 3DTiledOffset(X * 32, Y * 32, Z * 8) + 3DTiledOffset(x, y, z)
// Both are true for negative offsets too.
constexpr uint32_t kTextureTileWidthHeightLog2 = 5; constexpr uint32_t kTextureTileWidthHeightLog2 = 5;
constexpr uint32_t kTextureTileWidthHeight = 1 << kTextureTileWidthHeightLog2; constexpr uint32_t kTextureTileWidthHeight = 1 << kTextureTileWidthHeightLog2;
// 3D tiled texture slices 0:3 and 4:7 are stored separately in memory, in // 3D tiled texture slices 0:3 and 4:7 are stored separately in memory, in
// non-overlapping ranges, but addressing in 4:7 is different than in 0:3. // non-overlapping ranges, but addressing in 4:7 is different than in 0:3.
constexpr uint32_t kTextureTiledDepthGranularityLog2 = 2; constexpr uint32_t kTextureTileDepthLog2 = 2;
constexpr uint32_t kTextureTiledDepthGranularity = constexpr uint32_t kTextureTileDepth = 1 << kTextureTileDepthLog2;
1 << kTextureTiledDepthGranularityLog2;
// Texture tile address function periods:
// - 2D 1bpb: 128x128
// - 2D 2bpb: 64x64
// - 2D 4bpb+: 32x32
// - 3D 1bpb: 64x32x8
// - 3D 2bpb+: 32x32x8
constexpr uint32_t GetTextureTiledXBaseGranularityLog2(
bool is_3d, uint32_t bytes_per_block_log2) {
return 7 - std::min(UINT32_C(2), bytes_per_block_log2 + uint32_t(is_3d));
}
constexpr uint32_t GetTextureTiledYBaseGranularityLog2(
bool is_3d, uint32_t bytes_per_block_log2) {
return is_3d ? 5 : (7 - std::min(UINT32_C(2), bytes_per_block_log2));
}
constexpr uint32_t kTextureTiledZBaseGranularityLog2 = 3; constexpr uint32_t kTextureTiledZBaseGranularityLog2 = 3;
constexpr uint32_t kTextureTiledZBaseGranularity = constexpr uint32_t kTextureTiledZBaseGranularity =
1 << kTextureTiledZBaseGranularityLog2; 1 << kTextureTiledZBaseGranularityLog2;

View File

@ -422,6 +422,7 @@ bool D3D12Provider::Initialize() {
rasterizer_ordered_views_supported_ = false; rasterizer_ordered_views_supported_ = false;
resource_binding_tier_ = D3D12_RESOURCE_BINDING_TIER_1; resource_binding_tier_ = D3D12_RESOURCE_BINDING_TIER_1;
tiled_resources_tier_ = D3D12_TILED_RESOURCES_TIER_NOT_SUPPORTED; tiled_resources_tier_ = D3D12_TILED_RESOURCES_TIER_NOT_SUPPORTED;
unaligned_block_textures_supported_ = false;
D3D12_FEATURE_DATA_D3D12_OPTIONS options; D3D12_FEATURE_DATA_D3D12_OPTIONS options;
if (SUCCEEDED(device->CheckFeatureSupport(D3D12_FEATURE_D3D12_OPTIONS, if (SUCCEEDED(device->CheckFeatureSupport(D3D12_FEATURE_D3D12_OPTIONS,
&options, sizeof(options)))) { &options, sizeof(options)))) {
@ -439,6 +440,12 @@ bool D3D12Provider::Initialize() {
programmable_sample_positions_tier_ = programmable_sample_positions_tier_ =
options2.ProgrammableSamplePositionsTier; options2.ProgrammableSamplePositionsTier;
} }
D3D12_FEATURE_DATA_D3D12_OPTIONS8 options8;
if (SUCCEEDED(device->CheckFeatureSupport(D3D12_FEATURE_D3D12_OPTIONS8,
&options8, sizeof(options8)))) {
unaligned_block_textures_supported_ =
bool(options8.UnalignedBlockTexturesSupported);
}
virtual_address_bits_per_resource_ = 0; virtual_address_bits_per_resource_ = 0;
D3D12_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT virtual_address_support; D3D12_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT virtual_address_support;
if (SUCCEEDED(device->CheckFeatureSupport( if (SUCCEEDED(device->CheckFeatureSupport(
@ -455,14 +462,16 @@ bool D3D12Provider::Initialize() {
"* Programmable sample positions: tier {}\n" "* Programmable sample positions: tier {}\n"
"* Rasterizer-ordered views: {}\n" "* Rasterizer-ordered views: {}\n"
"* Resource binding: tier {}\n" "* Resource binding: tier {}\n"
"* Tiled resources: tier {}\n", "* Tiled resources: tier {}\n"
"* Unaligned block-compressed textures: {}",
virtual_address_bits_per_resource_, virtual_address_bits_per_resource_,
(heap_flag_create_not_zeroed_ & D3D12_HEAP_FLAG_CREATE_NOT_ZEROED) ? "yes" (heap_flag_create_not_zeroed_ & D3D12_HEAP_FLAG_CREATE_NOT_ZEROED) ? "yes"
: "no", : "no",
ps_specified_stencil_reference_supported_ ? "yes" : "no", ps_specified_stencil_reference_supported_ ? "yes" : "no",
uint32_t(programmable_sample_positions_tier_), uint32_t(programmable_sample_positions_tier_),
rasterizer_ordered_views_supported_ ? "yes" : "no", rasterizer_ordered_views_supported_ ? "yes" : "no",
uint32_t(resource_binding_tier_), uint32_t(tiled_resources_tier_)); uint32_t(resource_binding_tier_), uint32_t(tiled_resources_tier_),
unaligned_block_textures_supported_ ? "yes" : "no");
// Get the graphics analysis interface, will silently fail if PIX is not // Get the graphics analysis interface, will silently fail if PIX is not
// attached. // attached.

View File

@ -108,6 +108,9 @@ class D3D12Provider : public GraphicsProvider {
D3D12_TILED_RESOURCES_TIER GetTiledResourcesTier() const { D3D12_TILED_RESOURCES_TIER GetTiledResourcesTier() const {
return tiled_resources_tier_; return tiled_resources_tier_;
} }
bool AreUnalignedBlockTexturesSupported() const {
return unaligned_block_textures_supported_;
}
uint32_t GetVirtualAddressBitsPerResource() const { uint32_t GetVirtualAddressBitsPerResource() const {
return virtual_address_bits_per_resource_; return virtual_address_bits_per_resource_;
} }
@ -184,11 +187,12 @@ class D3D12Provider : public GraphicsProvider {
D3D12_HEAP_FLAGS heap_flag_create_not_zeroed_; D3D12_HEAP_FLAGS heap_flag_create_not_zeroed_;
D3D12_PROGRAMMABLE_SAMPLE_POSITIONS_TIER programmable_sample_positions_tier_; D3D12_PROGRAMMABLE_SAMPLE_POSITIONS_TIER programmable_sample_positions_tier_;
bool ps_specified_stencil_reference_supported_;
bool rasterizer_ordered_views_supported_;
D3D12_RESOURCE_BINDING_TIER resource_binding_tier_; D3D12_RESOURCE_BINDING_TIER resource_binding_tier_;
D3D12_TILED_RESOURCES_TIER tiled_resources_tier_; D3D12_TILED_RESOURCES_TIER tiled_resources_tier_;
uint32_t virtual_address_bits_per_resource_; uint32_t virtual_address_bits_per_resource_;
bool ps_specified_stencil_reference_supported_;
bool rasterizer_ordered_views_supported_;
bool unaligned_block_textures_supported_;
}; };
} // namespace d3d12 } // namespace d3d12