Merge commit 'f2fabfdf0' into canary_experimental

Sync changes from master up to before the recent GPU changes, those will be
merged later
This commit is contained in:
Herman S.
2026-02-17 15:46:27 +09:00
294 changed files with 165264 additions and 173899 deletions

View File

@@ -13,9 +13,16 @@
// Must be included before D3D and DXGI for things like NOMINMAX.
#include "xenia/base/platform_win.h"
// Include the up to date versions of the headers of DXGI and Direct3D 12 rather
// than the ones from the Windows SDK before other headers that may also
// potentially include their headers.
#include "xenia/ui/dxgi_include_win.h"
#include "third_party/DirectX-Headers/include/directx/d3d12.h"
#include "third_party/DirectX-Headers/include/directx/d3d12sdklayers.h"
#include <DXProgrammableCapture.h>
#include <d3d12.h>
#include <d3d12sdklayers.h>
#include <d3dcompiler.h>
#include <dxgi1_6.h>
#include <dxgidebug.h>

View File

@@ -0,0 +1,67 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2025 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#include "xenia/ui/d3d12/d3d12_gpu_completion_timeline.h"
#include <utility>
#include "xenia/base/logging.h"
namespace xe {
namespace ui {
namespace d3d12 {
std::unique_ptr<D3D12GPUCompletionTimeline> D3D12GPUCompletionTimeline::Create(
ID3D12Device* const device) {
Microsoft::WRL::ComPtr<ID3D12Fence> fence;
const HRESULT fence_create_result =
device->CreateFence(0, D3D12_FENCE_FLAG_NONE, IID_PPV_ARGS(&fence));
if (FAILED(fence_create_result)) {
XELOGE("Failed to create a Direct3D 12 fence, result 0x{:08X}",
fence_create_result);
return nullptr;
}
return std::unique_ptr<D3D12GPUCompletionTimeline>(
new D3D12GPUCompletionTimeline(fence.Get()));
}
D3D12GPUCompletionTimeline::~D3D12GPUCompletionTimeline() {
fence_->SetEventOnCompletion(GetUpcomingSubmission() - 1, nullptr);
}
void D3D12GPUCompletionTimeline::UpdateCompletedSubmission() {
uint64_t actual_completed_submission = fence_->GetCompletedValue();
// The device has been removed if the completed value is UINT64_MAX.
if (actual_completed_submission == UINT64_MAX) {
return;
}
SetCompletedSubmission(actual_completed_submission);
}
void D3D12GPUCompletionTimeline::AwaitSubmissionImpl(
const uint64_t awaited_submission) {
fence_->SetEventOnCompletion(awaited_submission, nullptr);
}
HRESULT D3D12GPUCompletionTimeline::SignalAndAdvance(
ID3D12CommandQueue* const queue) {
const HRESULT signal_result =
queue->Signal(fence_.Get(), GetUpcomingSubmission());
if (FAILED(signal_result)) {
XELOGE("Failed to signal a Direct3D 12 fence, result 0x{:08X}",
signal_result);
} else {
IncrementUpcomingSubmission();
}
return signal_result;
}
} // namespace d3d12
} // namespace ui
} // namespace xe

View File

@@ -0,0 +1,58 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2025 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#ifndef XENIA_UI_D3D12_D3D12_GPU_COMPLETION_TIMELINE_H_
#define XENIA_UI_D3D12_D3D12_GPU_COMPLETION_TIMELINE_H_
#include <memory>
#include "xenia/ui/d3d12/d3d12_api.h"
#include "xenia/ui/gpu_completion_timeline.h"
namespace xe {
namespace ui {
namespace d3d12 {
class D3D12GPUCompletionTimeline : public GPUCompletionTimeline {
public:
static std::unique_ptr<D3D12GPUCompletionTimeline> Create(
ID3D12Device* device);
D3D12GPUCompletionTimeline(const D3D12GPUCompletionTimeline&) = delete;
D3D12GPUCompletionTimeline& operator=(const D3D12GPUCompletionTimeline&) =
delete;
D3D12GPUCompletionTimeline(D3D12GPUCompletionTimeline&&) = delete;
D3D12GPUCompletionTimeline& operator=(D3D12GPUCompletionTimeline&&) = delete;
~D3D12GPUCompletionTimeline();
ID3D12Fence* GetFence() const { return fence_.Get(); }
using GPUCompletionTimeline::IncrementUpcomingSubmission;
void UpdateCompletedSubmission() override;
// If signaling has succeeded, will advance to the next submission.
HRESULT SignalAndAdvance(ID3D12CommandQueue* queue);
protected:
void AwaitSubmissionImpl(uint64_t awaited_submission) override;
private:
explicit D3D12GPUCompletionTimeline(ID3D12Fence* const fence)
: fence_(fence) {}
Microsoft::WRL::ComPtr<ID3D12Fence> fence_;
};
} // namespace d3d12
} // namespace ui
} // namespace xe
#endif // XENIA_UI_D3D12_D3D12_GPU_COMPLETION_TIMELINE_H_

View File

@@ -10,6 +10,9 @@
#include "xenia/ui/d3d12/d3d12_presenter.h"
#include <climits>
#include <cstdint>
#include <memory>
#include <utility>
#include "xenia/base/assert.h"
#include "xenia/base/cvar.h"
@@ -45,12 +48,17 @@ namespace shaders {
} // namespace shaders
D3D12Presenter::~D3D12Presenter() {
// Await completion of the usage of everything before destroying anything.
// Await completion of the usage of everything before destroying anything,
// irrespective of the declaration order in the class.
// From most likely the latest to most likely the earliest to be signaled, so
// just one sleep will likely be needed.
paint_context_.AwaitSwapChainUsageCompletion();
guest_output_resource_refresher_submission_tracker_.Shutdown();
ui_submission_tracker_.Shutdown();
if (guest_output_resource_refresher_completion_timeline_) {
guest_output_resource_refresher_completion_timeline_->AwaitAllSubmissions();
}
if (ui_completion_timeline_) {
ui_completion_timeline_->AwaitAllSubmissions();
}
}
Surface::TypeFlags D3D12Presenter::GetSupportedSurfaceTypes() const {
@@ -149,27 +157,33 @@ bool D3D12Presenter::CaptureGuestOutput(RawImage& image_out) {
return false;
}
ID3D12CommandQueue* direct_queue = provider_.GetDirectQueue();
// Make sure that if any work is submitted, any `return` will cause an await
// before releasing the command allocator / list and the resource the RAII
// way in the destruction of the submission tracker - so create after the
// objects referenced in the submission - but don't submit anything if
// failed to initialize the fence.
D3D12SubmissionTracker submission_tracker;
if (!submission_tracker.Initialize(device, direct_queue)) {
Microsoft::WRL::ComPtr<ID3D12Fence> fence;
const HRESULT fence_create_result =
device->CreateFence(0, D3D12_FENCE_FLAG_NONE, IID_PPV_ARGS(&fence));
if (FAILED(fence_create_result)) {
XELOGE(
"D3D12Presenter: Failed to create the guest output capturing fence, "
"result 0x{:08X}",
fence_create_result);
return false;
}
ID3D12CommandQueue* const direct_queue = provider_.GetDirectQueue();
ID3D12CommandList* execute_command_list = command_list.Get();
direct_queue->ExecuteCommandLists(1, &execute_command_list);
if (!submission_tracker.NextSubmission()) {
const HRESULT fence_signal_result = direct_queue->Signal(fence.Get(), 1);
if (FAILED(fence_signal_result)) {
XELOGE(
"D3D12Presenter: Failed to signal the guest output capturing fence");
"D3D12Presenter: Failed to enqueue signaling of the guest output "
"capturing fence, result 0x{:08X}",
fence_signal_result);
return false;
}
if (!submission_tracker.AwaitAllSubmissionsCompletion()) {
const HRESULT fence_wait_result = fence->SetEventOnCompletion(1, nullptr);
if (FAILED(fence_wait_result)) {
XELOGE(
"D3D12Presenter: Failed to await the guest output capturing fence");
"D3D12Presenter: Failed to await the guest output capturing fence, "
"result 0x{:08X}",
fence_wait_result);
return false;
}
}
@@ -376,7 +390,7 @@ bool D3D12Presenter::RefreshGuestOutputImpl(
bool& is_8bpc_out_ref) {
assert_not_zero(frontbuffer_width);
assert_not_zero(frontbuffer_height);
std::pair<UINT64, Microsoft::WRL::ComPtr<ID3D12Resource>>&
std::pair<uint64_t, Microsoft::WRL::ComPtr<ID3D12Resource>>&
guest_output_resource_ref = guest_output_resources_[mailbox_index];
if (guest_output_resource_ref.second) {
D3D12_RESOURCE_DESC guest_output_resource_current_desc =
@@ -384,9 +398,9 @@ bool D3D12Presenter::RefreshGuestOutputImpl(
if (guest_output_resource_current_desc.Width != frontbuffer_width ||
guest_output_resource_current_desc.Height != frontbuffer_height) {
// Main target painting has its own reference to the textures for reading
// in its own submission tracker timeline, safe to release here.
guest_output_resource_refresher_submission_tracker_
.AwaitSubmissionCompletion(guest_output_resource_ref.first);
// in its own completion timeline, safe to release here.
guest_output_resource_refresher_completion_timeline_
->AwaitSubmissionAndUpdateCompleted(guest_output_resource_ref.first);
guest_output_resource_ref.second.Reset();
}
}
@@ -424,9 +438,10 @@ bool D3D12Presenter::RefreshGuestOutputImpl(
// signal and wait slightly longer, for nothing important, while shutting down
// than to destroy the resource while it's still in use.
guest_output_resource_ref.first =
guest_output_resource_refresher_submission_tracker_
.GetCurrentSubmission();
guest_output_resource_refresher_submission_tracker_.NextSubmission();
guest_output_resource_refresher_completion_timeline_
->GetUpcomingSubmission();
guest_output_resource_refresher_completion_timeline_->SignalAndAdvance(
provider_.GetDirectQueue());
return refresher_succeeded;
}
@@ -449,14 +464,12 @@ Presenter::PaintResult D3D12Presenter::PaintAndPresentImpl(
bool execute_ui_drawers) {
// Begin the command list with the command allocator not currently potentially
// used on the GPU.
UINT64 current_paint_submission =
paint_context_.paint_submission_tracker.GetCurrentSubmission();
UINT64 command_allocator_count =
const uint64_t current_paint_submission =
paint_context_.paint_completion_timeline->GetUpcomingSubmission();
const uint64_t command_allocator_count =
UINT64(paint_context_.command_allocators.size());
if (current_paint_submission >= command_allocator_count) {
paint_context_.paint_submission_tracker.AwaitSubmissionCompletion(
current_paint_submission - command_allocator_count);
}
paint_context_.paint_completion_timeline
->AwaitMaxSubmissionsPendingAndUpdateCompleted(command_allocator_count);
ID3D12CommandAllocator* command_allocator =
paint_context_
.command_allocators[current_paint_submission %
@@ -539,7 +552,7 @@ Presenter::PaintResult D3D12Presenter::PaintAndPresentImpl(
// released (or a taken, but never actually used) slot.
for (size_t i = 0;
i < paint_context_.guest_output_resource_paint_refs.size(); ++i) {
const std::pair<UINT64, Microsoft::WRL::ComPtr<ID3D12Resource>>&
const std::pair<uint64_t, Microsoft::WRL::ComPtr<ID3D12Resource>>&
guest_output_resource_paint_ref =
paint_context_.guest_output_resource_paint_refs[i];
if (guest_output_resource_paint_ref.second == guest_output_resource) {
@@ -570,11 +583,12 @@ Presenter::PaintResult D3D12Presenter::PaintAndPresentImpl(
}
// Await the completion of the usage of the old guest output
// resource and its SRV descriptors.
paint_context_.paint_submission_tracker.AwaitSubmissionCompletion(
paint_context_
.guest_output_resource_paint_refs
[guest_output_resource_paint_ref_new_index]
.first);
paint_context_.paint_completion_timeline
->AwaitSubmissionAndUpdateCompleted(
paint_context_
.guest_output_resource_paint_refs
[guest_output_resource_paint_ref_new_index]
.first);
}
guest_output_resource_paint_ref_index =
guest_output_resource_paint_ref_new_index;
@@ -582,7 +596,7 @@ Presenter::PaintResult D3D12Presenter::PaintAndPresentImpl(
// used, not dropped due to some error.
paint_context_.guest_output_resource_paint_refs
[guest_output_resource_paint_ref_index] =
std::make_pair(UINT64(0), guest_output_resource);
std::make_pair(uint64_t(0), guest_output_resource);
// Create the SRV descriptor of the new texture.
D3D12_SHADER_RESOURCE_VIEW_DESC guest_output_resource_srv_desc;
guest_output_resource_srv_desc.Format = kGuestOutputFormat;
@@ -625,8 +639,10 @@ Presenter::PaintResult D3D12Presenter::PaintAndPresentImpl(
// Need to replace immediately as a new texture with the requested
// size is needed.
if (intermediate_texture_ptr_ref) {
paint_context_.paint_submission_tracker.AwaitSubmissionCompletion(
paint_context_.guest_output_intermediate_texture_last_usage);
paint_context_.paint_completion_timeline
->AwaitSubmissionAndUpdateCompleted(
paint_context_
.guest_output_intermediate_texture_last_usage);
intermediate_texture_ptr_ref.Reset();
}
// Resource.
@@ -689,8 +705,8 @@ Presenter::PaintResult D3D12Presenter::PaintAndPresentImpl(
} else {
// Was previously needed, but not anymore - destroy when possible.
if (intermediate_texture_ptr_ref &&
paint_context_.paint_submission_tracker
.GetCompletedSubmission() >=
paint_context_.paint_completion_timeline
->GetCompletedSubmissionFromLastUpdate() >=
paint_context_
.guest_output_intermediate_texture_last_usage) {
intermediate_texture_ptr_ref.Reset();
@@ -982,11 +998,12 @@ Presenter::PaintResult D3D12Presenter::PaintAndPresentImpl(
// Release main target guest output texture references that aren't needed
// anymore (this is done after various potential guest-output-related main
// target submission tracker waits so the completed submission value is the
// target completion timeline waits so the completed submission value is the
// most actual).
UINT64 completed_paint_submission =
paint_context_.paint_submission_tracker.GetCompletedSubmission();
for (std::pair<UINT64, Microsoft::WRL::ComPtr<ID3D12Resource>>&
uint64_t completed_paint_submission =
paint_context_.paint_completion_timeline
->GetCompletedSubmissionFromLastUpdate();
for (std::pair<uint64_t, Microsoft::WRL::ComPtr<ID3D12Resource>>&
guest_output_resource_paint_ref :
paint_context_.guest_output_resource_paint_refs) {
if (!guest_output_resource_paint_ref.second ||
@@ -1031,8 +1048,8 @@ Presenter::PaintResult D3D12Presenter::PaintAndPresentImpl(
D3D12UIDrawContext ui_draw_context(
*this, paint_context_.swap_chain_width,
paint_context_.swap_chain_height, command_list,
ui_submission_tracker_.GetCurrentSubmission(),
ui_submission_tracker_.GetCompletedSubmission());
ui_completion_timeline_->GetUpcomingSubmission(),
ui_completion_timeline_->UpdateAndGetCompletedSubmission());
ExecuteUIDrawersFromUIThread(ui_draw_context);
}
@@ -1049,13 +1066,15 @@ Presenter::PaintResult D3D12Presenter::PaintAndPresentImpl(
command_list->ResourceBarrier(1, &barrier_rtv_to_present);
// Execute and present.
// TODO(Triang3l): Error checking.
command_list->Close();
ID3D12CommandQueue* const direct_queue = provider_.GetDirectQueue();
ID3D12CommandList* execute_command_list = command_list;
provider_.GetDirectQueue()->ExecuteCommandLists(1, &execute_command_list);
direct_queue->ExecuteCommandLists(1, &execute_command_list);
if (execute_ui_drawers) {
ui_submission_tracker_.NextSubmission();
ui_completion_timeline_->SignalAndAdvance(direct_queue);
}
paint_context_.paint_submission_tracker.NextSubmission();
paint_context_.paint_completion_timeline->SignalAndAdvance(direct_queue);
// Present as soon as possible, without waiting for vsync (the host refresh
// rate may be something like 144 Hz, which is not a multiple of the common
// 30 Hz or 60 Hz guest refresh rate), and allowing dropping outdated queued
@@ -1071,7 +1090,7 @@ Presenter::PaintResult D3D12Presenter::PaintAndPresentImpl(
// Even if presentation has failed, work might have been enqueued anyway
// internally before the failure according to Jesse Natalie from the DirectX
// Discord server.
paint_context_.present_submission_tracker.NextSubmission();
paint_context_.present_completion_timeline->SignalAndAdvance(direct_queue);
switch (present_result) {
case DXGI_ERROR_DEVICE_REMOVED:
return PaintResult::kGpuLostExternally;
@@ -1384,11 +1403,13 @@ bool D3D12Presenter::InitializeSurfaceIndependent() {
ID3D12CommandQueue* direct_queue = provider_.GetDirectQueue();
// Paint submission trackers.
if (!paint_context_.paint_submission_tracker.Initialize(device,
direct_queue) ||
!paint_context_.present_submission_tracker.Initialize(device,
direct_queue)) {
// Paint completion timelines.
paint_context_.paint_completion_timeline =
D3D12GPUCompletionTimeline::Create(device);
paint_context_.present_completion_timeline =
D3D12GPUCompletionTimeline::Create(device);
if (!paint_context_.paint_completion_timeline ||
!paint_context_.present_completion_timeline) {
return false;
}
@@ -1446,12 +1467,14 @@ bool D3D12Presenter::InitializeSurfaceIndependent() {
return false;
}
if (!guest_output_resource_refresher_submission_tracker_.Initialize(
device, direct_queue)) {
guest_output_resource_refresher_completion_timeline_ =
D3D12GPUCompletionTimeline::Create(device);
if (!guest_output_resource_refresher_completion_timeline_) {
return false;
}
if (!ui_submission_tracker_.Initialize(device, direct_queue)) {
ui_completion_timeline_ = D3D12GPUCompletionTimeline::Create(device);
if (!ui_completion_timeline_) {
return false;
}

View File

@@ -11,12 +11,13 @@
#define XENIA_UI_D3D12_D3D12_PRESENTER_H_
#include <array>
#include <cstdint>
#include <memory>
#include <utility>
#include "xenia/base/math.h"
#include "xenia/ui/d3d12/d3d12_gpu_completion_timeline.h"
#include "xenia/ui/d3d12/d3d12_provider.h"
#include "xenia/ui/d3d12/d3d12_submission_tracker.h"
#include "xenia/ui/presenter.h"
#include "xenia/ui/surface.h"
@@ -29,8 +30,8 @@ class D3D12UIDrawContext final : public UIDrawContext {
D3D12UIDrawContext(Presenter& presenter, uint32_t render_target_width,
uint32_t render_target_height,
ID3D12GraphicsCommandList* command_list,
UINT64 submission_index_current,
UINT64 submission_index_completed)
uint64_t submission_index_current,
uint64_t submission_index_completed)
: UIDrawContext(presenter, render_target_width, render_target_height),
command_list_(command_list),
submission_index_current_(submission_index_current),
@@ -39,15 +40,17 @@ class D3D12UIDrawContext final : public UIDrawContext {
ID3D12GraphicsCommandList* command_list() const {
return command_list_.Get();
}
UINT64 submission_index_current() const { return submission_index_current_; }
UINT64 submission_index_completed() const {
uint64_t submission_index_current() const {
return submission_index_current_;
}
uint64_t submission_index_completed() const {
return submission_index_completed_;
}
private:
Microsoft::WRL::ComPtr<ID3D12GraphicsCommandList> command_list_;
UINT64 submission_index_current_;
UINT64 submission_index_completed_;
uint64_t submission_index_current_;
uint64_t submission_index_completed_;
};
class D3D12Presenter final : public Presenter {
@@ -99,8 +102,9 @@ class D3D12Presenter final : public Presenter {
bool CaptureGuestOutput(RawImage& image_out) override;
void AwaitUISubmissionCompletionFromUIThread(UINT64 submission_index) {
ui_submission_tracker_.AwaitSubmissionCompletion(submission_index);
void AwaitUISubmissionCompletionFromUIThread(uint64_t submission_index) {
ui_completion_timeline_->AwaitSubmissionAndUpdateCompleted(
submission_index);
}
protected:
@@ -213,12 +217,19 @@ class D3D12Presenter final : public Presenter {
};
void AwaitSwapChainUsageCompletion() {
// May be called during destruction.
// Presentation engine usage.
present_submission_tracker.AwaitAllSubmissionsCompletion();
if (present_completion_timeline) {
present_completion_timeline->AwaitAllSubmissions();
}
// Paint (render target) usage. While the presentation fence is signaled
// on the same queue, and presentation happens after painting, awaiting
// anyway for safety just to make less assumptions in the architecture.
paint_submission_tracker.AwaitAllSubmissionsCompletion();
if (paint_completion_timeline) {
paint_completion_timeline->AwaitAllSubmissions();
}
}
void DestroySwapChain();
@@ -226,9 +237,9 @@ class D3D12Presenter final : public Presenter {
// Connection-independent.
// Signaled before presenting.
D3D12SubmissionTracker paint_submission_tracker;
std::unique_ptr<D3D12GPUCompletionTimeline> paint_completion_timeline;
// Signaled after presenting.
D3D12SubmissionTracker present_submission_tracker;
std::unique_ptr<D3D12GPUCompletionTimeline> present_completion_timeline;
std::array<Microsoft::WRL::ComPtr<ID3D12CommandAllocator>,
kSwapChainBufferCount>
@@ -251,7 +262,7 @@ class D3D12Presenter final : public Presenter {
// the reference is not in this array yet, the most outdated reference, if
// needed, is replaced with the new one, awaiting the completion of the last
// paint usage.
std::array<std::pair<UINT64, Microsoft::WRL::ComPtr<ID3D12Resource>>,
std::array<std::pair<uint64_t, Microsoft::WRL::ComPtr<ID3D12Resource>>,
kGuestOutputMailboxSize>
guest_output_resource_paint_refs;
@@ -261,7 +272,7 @@ class D3D12Presenter final : public Presenter {
std::array<Microsoft::WRL::ComPtr<ID3D12Resource>,
kMaxGuestOutputPaintEffects - 1>
guest_output_intermediate_textures;
UINT64 guest_output_intermediate_texture_last_usage = 0;
uint64_t guest_output_intermediate_texture_last_usage = 0;
// Connection-specific.
@@ -301,22 +312,23 @@ class D3D12Presenter final : public Presenter {
size_t(GuestOutputPaintEffect::kCount)>
guest_output_paint_final_pipelines_;
// The first is the refresher submission tracker fence value at which the
// guest output texture was last refreshed, the second is the reference to the
// texture, which may be null. The indices are the mailbox indices.
std::array<std::pair<UINT64, Microsoft::WRL::ComPtr<ID3D12Resource>>,
// The first is the refresher completion timeline submission index at which
// the guest output texture was last refreshed, the second is the reference to
// the texture, which may be null. The indices are the mailbox indices.
std::array<std::pair<uint64_t, Microsoft::WRL::ComPtr<ID3D12Resource>>,
kGuestOutputMailboxSize>
guest_output_resources_;
// The guest output resources are protected by two submission trackers - the
// refresher ones (for writing to them via the guest_output_resources_
// The guest output resources are protected by two completion timelines - the
// refresher one (for writing to them via the guest_output_resources_
// references) and the paint one (for presenting it via the
// paint_context_.guest_output_resource_paint_refs references taken from
// guest_output_resources_).
D3D12SubmissionTracker guest_output_resource_refresher_submission_tracker_;
std::unique_ptr<D3D12GPUCompletionTimeline>
guest_output_resource_refresher_completion_timeline_;
// UI submission tracker with the submission index that can be given to UI
// UI completion timeline with the submission index that can be given to UI
// drawers (accessible from the UI thread only, at any time).
D3D12SubmissionTracker ui_submission_tracker_;
std::unique_ptr<D3D12GPUCompletionTimeline> ui_completion_timeline_;
// Accessible only by painting and by surface connection lifetime management
// (ConnectOrReconnectPaintingToSurfaceFromUIThread,

View File

@@ -1,126 +0,0 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2021 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#include "xenia/ui/d3d12/d3d12_submission_tracker.h"
#include "xenia/base/assert.h"
#include "xenia/base/logging.h"
namespace xe {
namespace ui {
namespace d3d12 {
bool D3D12SubmissionTracker::Initialize(ID3D12Device* device,
ID3D12CommandQueue* queue) {
Shutdown();
fence_completion_event_ = CreateEvent(nullptr, false, false, nullptr);
if (!fence_completion_event_) {
XELOGE(
"D3D12SubmissionTracker: Failed to create the fence completion event");
Shutdown();
return false;
}
// Continue where the tracker was left at the last shutdown.
if (FAILED(device->CreateFence(submission_current_ - 1, D3D12_FENCE_FLAG_NONE,
IID_PPV_ARGS(&fence_)))) {
XELOGE("D3D12SubmissionTracker: Failed to create the fence");
Shutdown();
return false;
}
queue_ = queue;
submission_signal_queued_ = submission_current_ - 1;
return true;
}
void D3D12SubmissionTracker::Shutdown() {
AwaitAllSubmissionsCompletion();
queue_.Reset();
fence_.Reset();
if (fence_completion_event_) {
CloseHandle(fence_completion_event_);
fence_completion_event_ = nullptr;
}
}
bool D3D12SubmissionTracker::AwaitSubmissionCompletion(
UINT64 submission_index) {
if (!fence_ || !fence_completion_event_) {
// Not fully initialized yet or already shut down.
return false;
}
// The tracker itself can't give a submission index for a submission that
// hasn't even started being recorded yet, the client has provided a
// completely invalid value or has done overly optimistic math if such an
// index has been obtained somehow.
assert_true(submission_index <= submission_current_);
// Waiting for the current submission is fine if there was a refusal to
// submit, and the submission index wasn't incremented, but still need to
// release objects referenced in the dropped submission (while shutting down,
// for instance - in this case, waiting for the last successful submission,
// which could have also referenced the objects from the new submission - we
// can't know since the client has already overwritten its last usage index,
// would correctly ensure that GPU usage of the objects is not pending).
// Waiting for successful submissions, but failed signals, will result in a
// true race condition, however, but waiting for the closest successful signal
// is the best approximation - also retrying to signal in this case.
UINT64 fence_value = submission_index;
if (submission_index > submission_signal_queued_) {
TrySignalEnqueueing();
fence_value = submission_signal_queued_;
}
if (fence_->GetCompletedValue() < fence_value) {
if (FAILED(fence_->SetEventOnCompletion(fence_value,
fence_completion_event_))) {
return false;
}
if (WaitForSingleObject(fence_completion_event_, INFINITE) !=
WAIT_OBJECT_0) {
return false;
}
}
return fence_value == submission_index;
}
void D3D12SubmissionTracker::SetQueue(ID3D12CommandQueue* new_queue) {
if (queue_.Get() == new_queue) {
return;
}
if (queue_) {
// Make sure the first signal on the new queue won't happen before the last
// signal, if pending, on the old one, as that would result first in too
// early submission completion indication, and then in rewinding.
AwaitAllSubmissionsCompletion();
}
queue_ = new_queue;
}
bool D3D12SubmissionTracker::NextSubmission() {
++submission_current_;
assert_not_null(queue_);
assert_not_null(fence_);
return TrySignalEnqueueing();
}
bool D3D12SubmissionTracker::TrySignalEnqueueing() {
if (submission_signal_queued_ + 1 >= submission_current_) {
return true;
}
if (!queue_ || !fence_) {
return false;
}
if (FAILED(queue_->Signal(fence_.Get(), submission_current_ - 1))) {
return false;
}
submission_signal_queued_ = submission_current_ - 1;
return true;
}
} // namespace d3d12
} // namespace ui
} // namespace xe

View File

@@ -1,93 +0,0 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2021 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#ifndef XENIA_UI_D3D12_D3D12_SUBMISSION_TRACKER_H_
#define XENIA_UI_D3D12_D3D12_SUBMISSION_TRACKER_H_
#include "xenia/ui/d3d12/d3d12_api.h"
namespace xe {
namespace ui {
namespace d3d12 {
// GPU > CPU fence wrapper, safely handling cases when the fence has not been
// initialized yet or has already been shut down, dropped submissions, and also
// transfers between queues so signals stay ordered.
//
// The current submission index can be associated with the usage of objects to
// release them when the GPU isn't potentially referencing them anymore, and
// should be incremented only
//
// 0 can be used as a "never referenced" submission index.
//
// The submission index timeline survives Shutdown / Initialize, so submission
// indices can be given to clients that are not aware of the lifetime of the
// tracker.
class D3D12SubmissionTracker {
public:
D3D12SubmissionTracker() = default;
D3D12SubmissionTracker(const D3D12SubmissionTracker& submission_tracker) =
delete;
D3D12SubmissionTracker& operator=(
const D3D12SubmissionTracker& submission_tracker) = delete;
~D3D12SubmissionTracker() { Shutdown(); }
// The queue may be null if it's going to be set dynamically. Will also take a
// reference to the queue.
bool Initialize(ID3D12Device* device, ID3D12CommandQueue* queue);
void Shutdown();
// Will perform an ownership transfer if the queue is different than the
// current one, and take a reference to the queue.
void SetQueue(ID3D12CommandQueue* new_queue);
UINT64 GetCurrentSubmission() const { return submission_current_; }
// May be lower than a value awaited by AwaitSubmissionCompletion if it
// returned false.
UINT64 GetCompletedSubmission() const {
// If shut down already or haven't fully initialized yet, don't care, for
// simplicity of external code, as any downloads are unlikely in this case,
// but destruction can be simplified.
return fence_ ? fence_->GetCompletedValue() : (GetCurrentSubmission() - 1);
}
// Returns whether the expected GPU signal has actually been reached (rather
// than some fallback condition) for cases when stronger completeness
// guarantees as needed (when downloading, as opposed to just destroying).
// If false is returned, it's also not guaranteed that GetCompletedSubmission
// will return a value >= submission_index.
bool AwaitSubmissionCompletion(UINT64 submission_index);
bool AwaitAllSubmissionsCompletion() {
return AwaitSubmissionCompletion(GetCurrentSubmission() - 1);
}
// Call after a successful ExecuteCommandList. Unconditionally increments the
// current submission index, and tries to enqueue the fence signal. Returns
// true if enqueued successfully, but even if not, waiting for submissions
// without a successfully enqueued signal is handled in the tracker in a way
// that it won't be infinite, so there's no need for clients to revert updates
// to submission indices associated with GPU usage of objects.
bool NextSubmission();
// If NextSubmission has failed, but it's important that the signal is
// enqueued, can be used to retry enqueueing the signal.
bool TrySignalEnqueueing();
private:
UINT64 submission_current_ = 1;
UINT64 submission_signal_queued_ = 0;
HANDLE fence_completion_event_ = nullptr;
Microsoft::WRL::ComPtr<ID3D12Fence> fence_;
Microsoft::WRL::ComPtr<ID3D12CommandQueue> queue_;
};
} // namespace d3d12
} // namespace ui
} // namespace xe
#endif // XENIA_UI_D3D12_D3D12_SUBMISSION_TRACKER_H_

View File

@@ -0,0 +1,23 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2026 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#ifndef XENIA_UI_DXGI_INCLUDE_WIN_H_
#define XENIA_UI_DXGI_INCLUDE_WIN_H_
// Must be included before Windows headers for definitions like NOMINMAX.
#include "xenia/base/platform_win.h"
// Include the up to date versions of the DXGI header dependencies rather than
// the ones from the Windows SDK before including the DXGI header.
#include "third_party/DirectX-Headers/include/directx/dxgicommon.h"
#include "third_party/DirectX-Headers/include/directx/dxgiformat.h"
#include <dxgi1_5.h>
#endif // XENIA_UI_DXGI_INCLUDE_WIN_H_

View File

@@ -0,0 +1,101 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2025 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#ifndef XENIA_UI_GPU_COMPLETION_TIMELINE_H_
#define XENIA_UI_GPU_COMPLETION_TIMELINE_H_
#include <algorithm>
#include <cstdint>
#include "xenia/base/assert.h"
namespace xe {
namespace ui {
class GPUCompletionTimeline {
public:
GPUCompletionTimeline(const GPUCompletionTimeline&) = delete;
GPUCompletionTimeline& operator=(const GPUCompletionTimeline&) = delete;
GPUCompletionTimeline(GPUCompletionTimeline&&) = delete;
GPUCompletionTimeline& operator=(GPUCompletionTimeline&&) = delete;
// The implemention of completion timeline destruction must await all pending
// submissions (including for releasing its own GPU API fences, but also
// because code that uses the completion timeline may expect that, since the
// completion timeline is generally the only way for it to know when its GPU
// objects can be destroyed safely).
virtual ~GPUCompletionTimeline() = default;
// Always >= 1, so objects never used yet may be associated with the
// submission index 0.
uint64_t GetUpcomingSubmission() const { return upcoming_submission_; }
// Awaiting completion or updating the completed submission may mark the
// device as lost.
// The implementation is required to call `SetCompletedSubmission` if it has
// been made aware that a submission has been completed.
virtual void UpdateCompletedSubmission() = 0;
uint64_t GetCompletedSubmissionFromLastUpdate() const {
return completed_submission_;
}
uint64_t UpdateAndGetCompletedSubmission() {
UpdateCompletedSubmission();
return GetCompletedSubmissionFromLastUpdate();
}
bool AwaitSubmissionAndUpdateCompleted(const uint64_t awaited_submission) {
assert_true(awaited_submission < upcoming_submission_);
if (UpdateAndGetCompletedSubmission() < awaited_submission) {
AwaitSubmissionImpl(awaited_submission);
}
// Recheck, the wait might have been incomplete if there was an error.
return UpdateAndGetCompletedSubmission() >= awaited_submission;
}
bool AwaitMaxSubmissionsPendingAndUpdateCompleted(
const uint64_t max_submissions_pending) {
assert_not_zero(max_submissions_pending);
return AwaitSubmissionAndUpdateCompleted(
GetUpcomingSubmission() -
std::min(max_submissions_pending, GetUpcomingSubmission()));
}
bool AwaitAllSubmissions() {
return AwaitSubmissionAndUpdateCompleted(GetUpcomingSubmission() - 1);
}
protected:
explicit GPUCompletionTimeline() = default;
// Call only after a successful submission, so that it can be awaited later.
void IncrementUpcomingSubmission() { ++upcoming_submission_; }
void SetCompletedSubmission(const uint64_t new_completed_submission) {
assert_true(new_completed_submission < upcoming_submission_);
assert_true(new_completed_submission >= completed_submission_);
completed_submission_ = new_completed_submission;
}
// The implementation may call `SetCompletedSubmission`, but is not required
// to.
virtual void AwaitSubmissionImpl(uint64_t awaited_submission) = 0;
private:
uint64_t upcoming_submission_ = 1;
uint64_t completed_submission_ = 0;
};
} // namespace ui
} // namespace xe
#endif // XENIA_UI_GPU_COMPLETION_TIMELINE_H_

View File

@@ -39,7 +39,8 @@
// Windows handle types.
#include "xenia/base/platform_win.h"
#include <dxgi.h>
#include "xenia/ui/dxgi_include_win.h"
#include <wrl/client.h>
#endif // XE_PLATFORM

View File

@@ -10,9 +10,9 @@
#ifndef XENIA_UI_SHADERS_AMD_LANGUAGE_XESLI_
#define XENIA_UI_SHADERS_AMD_LANGUAGE_XESLI_
#if XESL_LANGUAGE_GLSL
#if SHADING_LANGUAGE_GLSL_XE
#define A_GLSL 1
#elif XESL_LANGUAGE_HLSL
#elif SHADING_LANGUAGE_HLSL_XE
#define A_HLSL 1
#else
#error Unknown shading language for AMD shaders.

File diff suppressed because it is too large Load Diff

View File

@@ -5,7 +5,7 @@
//
// Buffer Definitions:
//
// cbuffer xesl_pushConstants
// cbuffer push_consts_xe
// {
//
// int2 xe_bilinear_output_offset; // Offset: 0 Size: 8
@@ -20,7 +20,7 @@
// ------------------------------ ---------- ------- ----------- ------- -------------- ------
// xe_bilinear_sampler sampler NA NA S0 s0 1
// xe_bilinear_source texture float4 2d T0 t0 1
// xesl_pushConstants cbuffer NA NA CB0 cb0 1
// push_consts_xe cbuffer NA NA CB0 cb0 1
//
//
//
@@ -59,21 +59,21 @@ ret
const BYTE guest_output_bilinear_ps[] =
{
68, 88, 66, 67, 159, 77,
178, 81, 43, 87, 105, 129,
234, 205, 246, 65, 132, 172,
222, 201, 1, 0, 0, 0,
208, 4, 0, 0, 5, 0,
68, 88, 66, 67, 235, 28,
93, 216, 171, 104, 177, 132,
67, 116, 72, 226, 224, 12,
60, 100, 1, 0, 0, 0,
204, 4, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0,
72, 2, 0, 0, 124, 2,
0, 0, 176, 2, 0, 0,
52, 4, 0, 0, 82, 68,
69, 70, 12, 2, 0, 0,
1, 0, 0, 0, 240, 0,
68, 2, 0, 0, 120, 2,
0, 0, 172, 2, 0, 0,
48, 4, 0, 0, 82, 68,
69, 70, 8, 2, 0, 0,
1, 0, 0, 0, 236, 0,
0, 0, 3, 0, 0, 0,
60, 0, 0, 0, 1, 5,
255, 255, 0, 5, 0, 0,
228, 1, 0, 0, 19, 19,
224, 1, 0, 0, 19, 19,
68, 37, 60, 0, 0, 0,
24, 0, 0, 0, 40, 0,
0, 0, 40, 0, 0, 0,
@@ -105,156 +105,155 @@ const BYTE guest_output_bilinear_ps[] =
114, 0, 120, 101, 95, 98,
105, 108, 105, 110, 101, 97,
114, 95, 115, 111, 117, 114,
99, 101, 0, 120, 101, 115,
108, 95, 112, 117, 115, 104,
67, 111, 110, 115, 116, 97,
110, 116, 115, 0, 171, 171,
219, 0, 0, 0, 2, 0,
0, 0, 8, 1, 0, 0,
16, 0, 0, 0, 0, 0,
99, 101, 0, 112, 117, 115,
104, 95, 99, 111, 110, 115,
116, 115, 95, 120, 101, 0,
171, 171, 219, 0, 0, 0,
2, 0, 0, 0, 4, 1,
0, 0, 16, 0, 0, 0,
0, 0, 0, 0, 0, 0,
88, 1, 0, 0, 0, 0,
0, 0, 84, 1, 0, 0,
0, 0, 0, 0, 8, 0,
0, 0, 2, 0, 0, 0,
116, 1, 0, 0, 0, 0,
0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0,
152, 1, 0, 0, 8, 0,
0, 0, 8, 0, 0, 0,
2, 0, 0, 0, 120, 1,
2, 0, 0, 0, 188, 1,
0, 0, 0, 0, 0, 0,
255, 255, 255, 255, 0, 0,
0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 156, 1,
0, 0, 8, 0, 0, 0,
8, 0, 0, 0, 2, 0,
0, 0, 192, 1, 0, 0,
0, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0,
255, 255, 255, 255, 0, 0,
0, 0, 120, 101, 95, 98,
105, 108, 105, 110, 101, 97,
114, 95, 111, 117, 116, 112,
117, 116, 95, 111, 102, 102,
115, 101, 116, 0, 105, 110,
116, 50, 0, 171, 1, 0,
2, 0, 1, 0, 2, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
114, 1, 0, 0, 120, 101,
0, 0, 0, 0, 120, 101,
95, 98, 105, 108, 105, 110,
101, 97, 114, 95, 111, 117,
116, 112, 117, 116, 95, 115,
105, 122, 101, 95, 105, 110,
118, 0, 102, 108, 111, 97,
116, 50, 0, 171, 1, 0,
3, 0, 1, 0, 2, 0,
116, 112, 117, 116, 95, 111,
102, 102, 115, 101, 116, 0,
105, 110, 116, 50, 0, 171,
1, 0, 2, 0, 1, 0,
2, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 110, 1, 0, 0,
120, 101, 95, 98, 105, 108,
105, 110, 101, 97, 114, 95,
111, 117, 116, 112, 117, 116,
95, 115, 105, 122, 101, 95,
105, 110, 118, 0, 102, 108,
111, 97, 116, 50, 0, 171,
1, 0, 3, 0, 1, 0,
2, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
184, 1, 0, 0, 77, 105,
99, 114, 111, 115, 111, 102,
116, 32, 40, 82, 41, 32,
72, 76, 83, 76, 32, 83,
104, 97, 100, 101, 114, 32,
67, 111, 109, 112, 105, 108,
101, 114, 32, 49, 48, 46,
49, 0, 73, 83, 71, 78,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 180, 1, 0, 0,
77, 105, 99, 114, 111, 115,
111, 102, 116, 32, 40, 82,
41, 32, 72, 76, 83, 76,
32, 83, 104, 97, 100, 101,
114, 32, 67, 111, 109, 112,
105, 108, 101, 114, 32, 49,
48, 46, 49, 0, 73, 83,
71, 78, 44, 0, 0, 0,
1, 0, 0, 0, 8, 0,
0, 0, 32, 0, 0, 0,
0, 0, 0, 0, 1, 0,
0, 0, 3, 0, 0, 0,
0, 0, 0, 0, 15, 3,
0, 0, 83, 86, 95, 80,
111, 115, 105, 116, 105, 111,
110, 0, 79, 83, 71, 78,
44, 0, 0, 0, 1, 0,
0, 0, 8, 0, 0, 0,
32, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0,
3, 0, 0, 0, 0, 0,
0, 0, 15, 3, 0, 0,
83, 86, 95, 80, 111, 115,
105, 116, 105, 111, 110, 0,
79, 83, 71, 78, 44, 0,
0, 0, 1, 0, 0, 0,
8, 0, 0, 0, 32, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 3, 0,
0, 0, 0, 0, 0, 0,
15, 0, 0, 0, 83, 86,
95, 84, 97, 114, 103, 101,
116, 0, 171, 171, 83, 72,
69, 88, 124, 1, 0, 0,
81, 0, 0, 0, 95, 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, 90, 0,
0, 6, 70, 110, 48, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 88, 24,
0, 7, 70, 126, 48, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
85, 85, 0, 0, 0, 0,
0, 0, 100, 32, 0, 4,
50, 16, 16, 0, 0, 0,
0, 0, 1, 0, 0, 0,
101, 0, 0, 3, 242, 32,
16, 0, 0, 0, 0, 0,
104, 0, 0, 2, 1, 0,
0, 0, 27, 0, 0, 5,
50, 0, 16, 0, 0, 0,
0, 0, 70, 16, 16, 0,
0, 0, 0, 0, 30, 0,
0, 10, 50, 0, 16, 0,
0, 0, 0, 0, 70, 0,
16, 0, 0, 0, 0, 0,
70, 128, 48, 128, 65, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 86, 0, 0, 5,
50, 0, 16, 0, 0, 0,
0, 0, 70, 0, 16, 0,
0, 0, 0, 0, 0, 0,
0, 10, 50, 0, 16, 0,
0, 0, 0, 0, 70, 0,
16, 0, 0, 0, 0, 0,
2, 64, 0, 0, 0, 0,
0, 63, 0, 0, 0, 63,
0, 0, 0, 0, 0, 0,
0, 0, 56, 0, 0, 9,
50, 0, 16, 0, 0, 0,
0, 0, 70, 0, 16, 0,
0, 0, 0, 0, 230, 138,
48, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 72, 0, 0, 13,
114, 0, 16, 0, 0, 0,
0, 0, 70, 0, 16, 0,
0, 0, 0, 0, 70, 126,
32, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 96,
32, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 64,
0, 0, 0, 0, 0, 0,
54, 0, 0, 5, 114, 32,
16, 0, 0, 0, 0, 0,
70, 2, 16, 0, 0, 0,
0, 0, 54, 0, 0, 5,
130, 32, 16, 0, 0, 0,
0, 0, 1, 64, 0, 0,
0, 0, 128, 63, 62, 0,
0, 1, 83, 84, 65, 84,
148, 0, 0, 0, 9, 0,
0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 2, 0,
0, 0, 2, 0, 0, 0,
1, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 15, 0, 0, 0,
83, 86, 95, 84, 97, 114,
103, 101, 116, 0, 171, 171,
83, 72, 69, 88, 124, 1,
0, 0, 81, 0, 0, 0,
95, 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,
90, 0, 0, 6, 70, 110,
48, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
88, 24, 0, 7, 70, 126,
48, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 85, 85, 0, 0,
0, 0, 0, 0, 100, 32,
0, 4, 50, 16, 16, 0,
0, 0, 0, 0, 1, 0,
0, 0, 101, 0, 0, 3,
242, 32, 16, 0, 0, 0,
0, 0, 104, 0, 0, 2,
1, 0, 0, 0, 27, 0,
0, 5, 50, 0, 16, 0,
0, 0, 0, 0, 70, 16,
16, 0, 0, 0, 0, 0,
30, 0, 0, 10, 50, 0,
16, 0, 0, 0, 0, 0,
70, 0, 16, 0, 0, 0,
0, 0, 70, 128, 48, 128,
65, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 86, 0,
0, 5, 50, 0, 16, 0,
0, 0, 0, 0, 70, 0,
16, 0, 0, 0, 0, 0,
0, 0, 0, 10, 50, 0,
16, 0, 0, 0, 0, 0,
70, 0, 16, 0, 0, 0,
0, 0, 2, 64, 0, 0,
0, 0, 0, 63, 0, 0,
0, 63, 0, 0, 0, 0,
0, 0, 0, 0, 56, 0,
0, 9, 50, 0, 16, 0,
0, 0, 0, 0, 70, 0,
16, 0, 0, 0, 0, 0,
230, 138, 48, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 72, 0,
0, 13, 114, 0, 16, 0,
0, 0, 0, 0, 70, 0,
16, 0, 0, 0, 0, 0,
70, 126, 32, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 96, 32, 0, 0, 0,
0, 0, 0, 0, 0, 0,
1, 64, 0, 0, 0, 0,
0, 0, 54, 0, 0, 5,
114, 32, 16, 0, 0, 0,
0, 0, 70, 2, 16, 0,
0, 0, 0, 0, 54, 0,
0, 5, 130, 32, 16, 0,
0, 0, 0, 0, 1, 64,
0, 0, 0, 0, 128, 63,
62, 0, 0, 1, 83, 84,
65, 84, 148, 0, 0, 0,
9, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0,
2, 0, 0, 0, 2, 0,
0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 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,
1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 2, 0, 0, 0,
0, 0, 0, 0, 2, 0,
0, 0, 0, 0, 0, 0,
2, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
@@ -264,5 +263,5 @@ const BYTE guest_output_bilinear_ps[] =
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

View File

@@ -5,7 +5,7 @@
//
// Buffer Definitions:
//
// cbuffer xesl_pushConstants
// cbuffer push_consts_xe
// {
//
// int2 xe_cas_output_offset; // Offset: 0 Size: 8
@@ -19,7 +19,7 @@
// Name Type Format Dim ID HLSL Bind Count
// ------------------------------ ---------- ------- ----------- ------- -------------- ------
// xe_cas_source texture float4 2d T0 t0 1
// xesl_pushConstants cbuffer NA NA CB0 cb0 1
// push_consts_xe cbuffer NA NA CB0 cb0 1
//
//
//
@@ -97,21 +97,21 @@ ret
const BYTE guest_output_ffx_cas_sharpen_ps[] =
{
68, 88, 66, 67, 246, 148,
96, 173, 10, 53, 27, 198,
93, 67, 135, 197, 148, 79,
250, 14, 1, 0, 0, 0,
40, 9, 0, 0, 5, 0,
68, 88, 66, 67, 166, 66,
169, 116, 206, 31, 71, 185,
60, 220, 203, 253, 75, 208,
107, 220, 1, 0, 0, 0,
36, 9, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0,
4, 2, 0, 0, 56, 2,
0, 0, 108, 2, 0, 0,
140, 8, 0, 0, 82, 68,
69, 70, 200, 1, 0, 0,
1, 0, 0, 0, 176, 0,
0, 2, 0, 0, 52, 2,
0, 0, 104, 2, 0, 0,
136, 8, 0, 0, 82, 68,
69, 70, 196, 1, 0, 0,
1, 0, 0, 0, 172, 0,
0, 0, 2, 0, 0, 0,
60, 0, 0, 0, 1, 5,
255, 255, 0, 5, 0, 0,
160, 1, 0, 0, 19, 19,
156, 1, 0, 0, 19, 19,
68, 37, 60, 0, 0, 0,
24, 0, 0, 0, 40, 0,
0, 0, 40, 0, 0, 0,
@@ -132,164 +132,132 @@ const BYTE guest_output_ffx_cas_sharpen_ps[] =
0, 0, 0, 0, 0, 0,
0, 0, 120, 101, 95, 99,
97, 115, 95, 115, 111, 117,
114, 99, 101, 0, 120, 101,
115, 108, 95, 112, 117, 115,
104, 67, 111, 110, 115, 116,
97, 110, 116, 115, 0, 171,
171, 171, 154, 0, 0, 0,
2, 0, 0, 0, 200, 0,
0, 0, 16, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 24, 1, 0, 0,
0, 0, 0, 0, 8, 0,
114, 99, 101, 0, 112, 117,
115, 104, 95, 99, 111, 110,
115, 116, 115, 95, 120, 101,
0, 171, 171, 171, 154, 0,
0, 0, 2, 0, 0, 0,
52, 1, 0, 0, 0, 0,
196, 0, 0, 0, 16, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 20, 1,
0, 0, 0, 0, 0, 0,
8, 0, 0, 0, 2, 0,
0, 0, 48, 1, 0, 0,
0, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0,
255, 255, 255, 255, 0, 0,
0, 0, 84, 1, 0, 0,
8, 0, 0, 0, 4, 0,
0, 0, 2, 0, 0, 0,
120, 1, 0, 0, 0, 0,
0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0,
88, 1, 0, 0, 8, 0,
0, 0, 4, 0, 0, 0,
2, 0, 0, 0, 124, 1,
0, 0, 0, 0, 0, 0,
255, 255, 255, 255, 0, 0,
0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 120, 101,
95, 99, 97, 115, 95, 111,
117, 116, 112, 117, 116, 95,
111, 102, 102, 115, 101, 116,
0, 105, 110, 116, 50, 0,
171, 171, 1, 0, 2, 0,
1, 0, 2, 0, 0, 0,
120, 101, 95, 99, 97, 115,
95, 111, 117, 116, 112, 117,
116, 95, 111, 102, 102, 115,
101, 116, 0, 105, 110, 116,
50, 0, 171, 171, 1, 0,
2, 0, 1, 0, 2, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 45, 1,
0, 0, 120, 101, 95, 99,
97, 115, 95, 115, 104, 97,
114, 112, 110, 101, 115, 115,
95, 112, 111, 115, 116, 95,
115, 101, 116, 117, 112, 0,
102, 108, 111, 97, 116, 0,
171, 171, 0, 0, 3, 0,
1, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0,
41, 1, 0, 0, 120, 101,
95, 99, 97, 115, 95, 115,
104, 97, 114, 112, 110, 101,
115, 115, 95, 112, 111, 115,
116, 95, 115, 101, 116, 117,
112, 0, 102, 108, 111, 97,
116, 0, 171, 171, 0, 0,
3, 0, 1, 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, 116, 1,
0, 0, 77, 105, 99, 114,
111, 115, 111, 102, 116, 32,
40, 82, 41, 32, 72, 76,
83, 76, 32, 83, 104, 97,
100, 101, 114, 32, 67, 111,
109, 112, 105, 108, 101, 114,
32, 49, 48, 46, 49, 0,
73, 83, 71, 78, 44, 0,
0, 0, 0, 0, 0, 0,
112, 1, 0, 0, 77, 105,
99, 114, 111, 115, 111, 102,
116, 32, 40, 82, 41, 32,
72, 76, 83, 76, 32, 83,
104, 97, 100, 101, 114, 32,
67, 111, 109, 112, 105, 108,
101, 114, 32, 49, 48, 46,
49, 0, 73, 83, 71, 78,
44, 0, 0, 0, 1, 0,
0, 0, 8, 0, 0, 0,
32, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0,
3, 0, 0, 0, 0, 0,
0, 0, 15, 3, 0, 0,
83, 86, 95, 80, 111, 115,
105, 116, 105, 111, 110, 0,
79, 83, 71, 78, 44, 0,
0, 0, 1, 0, 0, 0,
8, 0, 0, 0, 32, 0,
0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 3, 0,
0, 0, 0, 0, 3, 0,
0, 0, 0, 0, 0, 0,
15, 3, 0, 0, 83, 86,
95, 80, 111, 115, 105, 116,
105, 111, 110, 0, 79, 83,
71, 78, 44, 0, 0, 0,
1, 0, 0, 0, 8, 0,
0, 0, 32, 0, 0, 0,
15, 0, 0, 0, 83, 86,
95, 84, 97, 114, 103, 101,
116, 0, 171, 171, 83, 72,
69, 88, 24, 6, 0, 0,
81, 0, 0, 0, 134, 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, 3, 0, 0, 0,
0, 0, 0, 0, 15, 0,
0, 0, 83, 86, 95, 84,
97, 114, 103, 101, 116, 0,
171, 171, 83, 72, 69, 88,
24, 6, 0, 0, 81, 0,
0, 0, 134, 1, 0, 0,
106, 8, 0, 1, 89, 0,
0, 7, 70, 142, 48, 0,
0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 88, 24,
0, 7, 70, 126, 48, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0,
0, 0, 88, 24, 0, 7,
70, 126, 48, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 85, 85,
0, 0, 0, 0, 0, 0,
100, 32, 0, 4, 50, 16,
85, 85, 0, 0, 0, 0,
0, 0, 100, 32, 0, 4,
50, 16, 16, 0, 0, 0,
0, 0, 1, 0, 0, 0,
101, 0, 0, 3, 242, 32,
16, 0, 0, 0, 0, 0,
1, 0, 0, 0, 101, 0,
0, 3, 242, 32, 16, 0,
0, 0, 0, 0, 104, 0,
0, 2, 5, 0, 0, 0,
27, 0, 0, 5, 50, 0,
16, 0, 0, 0, 0, 0,
70, 16, 16, 0, 0, 0,
0, 0, 30, 0, 0, 10,
104, 0, 0, 2, 5, 0,
0, 0, 27, 0, 0, 5,
50, 0, 16, 0, 0, 0,
0, 0, 70, 0, 16, 0,
0, 0, 0, 0, 70, 128,
48, 128, 65, 0, 0, 0,
0, 0, 70, 16, 16, 0,
0, 0, 0, 0, 30, 0,
0, 10, 50, 0, 16, 0,
0, 0, 0, 0, 70, 0,
16, 0, 0, 0, 0, 0,
70, 128, 48, 128, 65, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
30, 0, 0, 10, 242, 0,
16, 0, 1, 0, 0, 0,
70, 4, 16, 0, 0, 0,
0, 0, 2, 64, 0, 0,
255, 255, 255, 255, 0, 0,
0, 0, 30, 0, 0, 10,
242, 0, 16, 0, 1, 0,
0, 0, 70, 4, 16, 0,
0, 0, 0, 0, 2, 64,
0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 0, 0,
255, 255, 255, 255, 54, 0,
0, 5, 50, 0, 16, 0,
2, 0, 0, 0, 230, 10,
16, 0, 1, 0, 0, 0,
54, 0, 0, 8, 194, 0,
0, 0, 255, 255, 255, 255,
54, 0, 0, 5, 50, 0,
16, 0, 2, 0, 0, 0,
2, 64, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 45, 0, 0, 8,
114, 0, 16, 0, 2, 0,
0, 0, 70, 14, 16, 0,
2, 0, 0, 0, 70, 126,
32, 0, 0, 0, 0, 0,
0, 0, 0, 0, 54, 0,
0, 8, 194, 0, 16, 0,
1, 0, 0, 0, 2, 64,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
45, 0, 0, 8, 114, 0,
16, 0, 1, 0, 0, 0,
70, 14, 16, 0, 1, 0,
0, 0, 70, 126, 32, 0,
0, 0, 0, 0, 0, 0,
230, 10, 16, 0, 1, 0,
0, 0, 54, 0, 0, 8,
194, 0, 16, 0, 0, 0,
194, 0, 16, 0, 2, 0,
0, 0, 2, 64, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 45, 0,
0, 8, 114, 0, 16, 0,
3, 0, 0, 0, 70, 14,
16, 0, 0, 0, 0, 0,
2, 0, 0, 0, 70, 14,
16, 0, 2, 0, 0, 0,
70, 126, 32, 0, 0, 0,
0, 0, 0, 0, 0, 0,
30, 0, 0, 10, 242, 0,
16, 0, 0, 0, 0, 0,
70, 4, 16, 0, 0, 0,
0, 0, 2, 64, 0, 0,
0, 0, 0, 0, 1, 0,
0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 54, 0,
0, 5, 50, 0, 16, 0,
4, 0, 0, 0, 230, 10,
16, 0, 0, 0, 0, 0,
54, 0, 0, 8, 194, 0,
16, 0, 4, 0, 0, 0,
16, 0, 1, 0, 0, 0,
2, 64, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 45, 0, 0, 8,
114, 0, 16, 0, 4, 0,
114, 0, 16, 0, 1, 0,
0, 0, 70, 14, 16, 0,
4, 0, 0, 0, 70, 126,
1, 0, 0, 0, 70, 126,
32, 0, 0, 0, 0, 0,
0, 0, 0, 0, 54, 0,
0, 8, 194, 0, 16, 0,
@@ -298,194 +266,225 @@ const BYTE guest_output_ffx_cas_sharpen_ps[] =
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
45, 0, 0, 8, 114, 0,
16, 0, 0, 0, 0, 0,
16, 0, 3, 0, 0, 0,
70, 14, 16, 0, 0, 0,
0, 0, 70, 126, 32, 0,
0, 0, 0, 0, 0, 0,
0, 0, 56, 0, 0, 7,
114, 0, 16, 0, 2, 0,
0, 0, 70, 2, 16, 0,
0, 0, 30, 0, 0, 10,
242, 0, 16, 0, 0, 0,
0, 0, 70, 4, 16, 0,
0, 0, 0, 0, 2, 64,
0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0,
54, 0, 0, 5, 50, 0,
16, 0, 4, 0, 0, 0,
230, 10, 16, 0, 0, 0,
0, 0, 54, 0, 0, 8,
194, 0, 16, 0, 4, 0,
0, 0, 2, 64, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 45, 0,
0, 8, 114, 0, 16, 0,
4, 0, 0, 0, 70, 14,
16, 0, 4, 0, 0, 0,
70, 126, 32, 0, 0, 0,
0, 0, 0, 0, 0, 0,
54, 0, 0, 8, 194, 0,
16, 0, 0, 0, 0, 0,
2, 64, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 45, 0, 0, 8,
114, 0, 16, 0, 0, 0,
0, 0, 70, 14, 16, 0,
0, 0, 0, 0, 70, 126,
32, 0, 0, 0, 0, 0,
0, 0, 0, 0, 56, 0,
0, 7, 114, 0, 16, 0,
2, 0, 0, 0, 70, 2,
16, 0, 2, 0, 0, 0,
56, 0, 0, 7, 114, 0,
16, 0, 1, 0, 0, 0,
70, 2, 16, 0, 1, 0,
0, 0, 70, 2, 16, 0,
1, 0, 0, 0, 56, 0,
0, 7, 130, 0, 16, 0,
0, 0, 0, 0, 26, 0,
16, 0, 3, 0, 0, 0,
26, 0, 16, 0, 3, 0,
70, 2, 16, 0, 2, 0,
0, 0, 56, 0, 0, 7,
114, 0, 16, 0, 4, 0,
114, 0, 16, 0, 1, 0,
0, 0, 70, 2, 16, 0,
1, 0, 0, 0, 70, 2,
16, 0, 1, 0, 0, 0,
56, 0, 0, 7, 130, 0,
16, 0, 0, 0, 0, 0,
26, 0, 16, 0, 3, 0,
0, 0, 26, 0, 16, 0,
3, 0, 0, 0, 56, 0,
0, 7, 114, 0, 16, 0,
4, 0, 0, 0, 70, 2,
16, 0, 4, 0, 0, 0,
56, 0, 0, 7, 114, 0,
16, 0, 0, 0, 0, 0,
70, 2, 16, 0, 0, 0,
70, 2, 16, 0, 4, 0,
0, 0, 56, 0, 0, 7,
114, 0, 16, 0, 0, 0,
0, 0, 70, 2, 16, 0,
0, 0, 0, 0, 51, 0,
0, 0, 0, 0, 70, 2,
16, 0, 0, 0, 0, 0,
51, 0, 0, 7, 130, 0,
16, 0, 1, 0, 0, 0,
58, 0, 16, 0, 0, 0,
0, 0, 26, 0, 16, 0,
4, 0, 0, 0, 51, 0,
0, 7, 130, 0, 16, 0,
1, 0, 0, 0, 58, 0,
16, 0, 1, 0, 0, 0,
26, 0, 16, 0, 1, 0,
0, 0, 51, 0, 0, 7,
130, 0, 16, 0, 2, 0,
0, 0, 26, 0, 16, 0,
0, 0, 0, 0, 26, 0,
16, 0, 2, 0, 0, 0,
51, 0, 0, 7, 130, 0,
16, 0, 1, 0, 0, 0,
58, 0, 16, 0, 1, 0,
0, 0, 58, 0, 16, 0,
2, 0, 0, 0, 52, 0,
0, 7, 130, 0, 16, 0,
0, 0, 0, 0, 58, 0,
16, 0, 0, 0, 0, 0,
26, 0, 16, 0, 4, 0,
0, 0, 51, 0, 0, 7,
130, 0, 16, 0, 1, 0,
0, 0, 52, 0, 0, 7,
130, 0, 16, 0, 0, 0,
0, 0, 58, 0, 16, 0,
1, 0, 0, 0, 26, 0,
0, 0, 0, 0, 26, 0,
16, 0, 1, 0, 0, 0,
51, 0, 0, 7, 130, 0,
52, 0, 0, 7, 130, 0,
16, 0, 2, 0, 0, 0,
26, 0, 16, 0, 0, 0,
0, 0, 26, 0, 16, 0,
2, 0, 0, 0, 51, 0,
2, 0, 0, 0, 52, 0,
0, 7, 130, 0, 16, 0,
0, 0, 0, 0, 58, 0,
16, 0, 0, 0, 0, 0,
58, 0, 16, 0, 2, 0,
0, 0, 30, 0, 0, 8,
130, 0, 16, 0, 2, 0,
0, 0, 58, 0, 16, 128,
65, 0, 0, 0, 0, 0,
0, 0, 1, 64, 0, 0,
187, 126, 240, 126, 0, 0,
0, 8, 130, 0, 16, 0,
0, 0, 0, 0, 58, 0,
16, 128, 65, 0, 0, 0,
0, 0, 0, 0, 1, 64,
0, 0, 0, 0, 128, 63,
51, 0, 0, 7, 130, 0,
16, 0, 0, 0, 0, 0,
58, 0, 16, 0, 0, 0,
0, 0, 58, 0, 16, 0,
1, 0, 0, 0, 56, 32,
0, 7, 130, 0, 16, 0,
0, 0, 0, 0, 58, 0,
16, 0, 2, 0, 0, 0,
58, 0, 16, 0, 0, 0,
0, 0, 85, 0, 0, 7,
130, 0, 16, 0, 0, 0,
0, 0, 58, 0, 16, 0,
0, 0, 0, 0, 1, 64,
0, 0, 1, 0, 0, 0,
30, 0, 0, 7, 130, 0,
16, 0, 0, 0, 0, 0,
58, 0, 16, 0, 0, 0,
0, 0, 1, 64, 0, 0,
57, 70, 188, 31, 56, 0,
0, 9, 130, 0, 16, 0,
0, 0, 0, 0, 58, 0,
16, 0, 0, 0, 0, 0,
42, 128, 48, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 50, 0,
0, 9, 130, 0, 16, 0,
1, 0, 0, 0, 58, 0,
16, 0, 0, 0, 0, 0,
1, 64, 0, 0, 0, 0,
128, 64, 1, 64, 0, 0,
0, 0, 128, 63, 30, 0,
0, 8, 130, 0, 16, 0,
2, 0, 0, 0, 58, 0,
16, 128, 65, 0, 0, 0,
1, 0, 0, 0, 1, 64,
0, 0, 255, 159, 241, 126,
50, 0, 0, 10, 130, 0,
16, 0, 1, 0, 0, 0,
58, 0, 16, 128, 65, 0,
0, 0, 2, 0, 0, 0,
58, 0, 16, 0, 1, 0,
0, 0, 1, 64, 0, 0,
0, 0, 0, 64, 56, 0,
0, 7, 130, 0, 16, 0,
1, 0, 0, 0, 58, 0,
16, 0, 1, 0, 0, 0,
58, 0, 16, 0, 2, 0,
0, 0, 52, 0, 0, 7,
130, 0, 16, 0, 0, 0,
0, 0, 58, 0, 16, 0,
0, 0, 0, 0, 26, 0,
16, 0, 4, 0, 0, 0,
52, 0, 0, 7, 130, 0,
16, 0, 0, 0, 0, 0,
58, 0, 16, 0, 0, 0,
0, 0, 26, 0, 16, 0,
1, 0, 0, 0, 52, 0,
0, 7, 130, 0, 16, 0,
2, 0, 0, 0, 26, 0,
16, 0, 0, 0, 0, 0,
26, 0, 16, 0, 2, 0,
0, 0, 52, 0, 0, 7,
130, 0, 16, 0, 0, 0,
0, 0, 58, 0, 16, 0,
0, 0, 0, 0, 58, 0,
16, 0, 2, 0, 0, 0,
30, 0, 0, 8, 130, 0,
16, 0, 2, 0, 0, 0,
58, 0, 16, 128, 65, 0,
0, 0, 0, 0, 0, 0,
1, 64, 0, 0, 187, 126,
240, 126, 0, 0, 0, 8,
130, 0, 16, 0, 0, 0,
0, 0, 58, 0, 16, 128,
65, 0, 0, 0, 0, 0,
0, 0, 1, 64, 0, 0,
0, 0, 128, 63, 51, 0,
0, 7, 130, 0, 16, 0,
0, 0, 0, 0, 58, 0,
16, 0, 0, 0, 0, 0,
58, 0, 16, 0, 1, 0,
0, 0, 56, 32, 0, 7,
130, 0, 16, 0, 0, 0,
0, 0, 58, 0, 16, 0,
2, 0, 0, 0, 58, 0,
16, 0, 0, 0, 0, 0,
85, 0, 0, 7, 130, 0,
16, 0, 0, 0, 0, 0,
58, 0, 16, 0, 0, 0,
0, 0, 1, 64, 0, 0,
1, 0, 0, 0, 30, 0,
0, 7, 130, 0, 16, 0,
0, 0, 0, 0, 58, 0,
16, 0, 0, 0, 0, 0,
1, 64, 0, 0, 57, 70,
188, 31, 56, 0, 0, 9,
130, 0, 16, 0, 0, 0,
0, 0, 58, 0, 16, 0,
0, 0, 0, 0, 42, 128,
48, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 50, 0, 0, 9,
130, 0, 16, 0, 1, 0,
0, 0, 58, 0, 16, 0,
0, 0, 0, 0, 1, 64,
0, 0, 0, 0, 128, 64,
1, 64, 0, 0, 0, 0,
128, 63, 30, 0, 0, 8,
130, 0, 16, 0, 2, 0,
0, 0, 58, 0, 16, 128,
65, 0, 0, 0, 1, 0,
0, 0, 1, 64, 0, 0,
255, 159, 241, 126, 50, 0,
0, 10, 130, 0, 16, 0,
1, 0, 0, 0, 58, 0,
16, 128, 65, 0, 0, 0,
2, 0, 0, 0, 58, 0,
16, 0, 1, 0, 0, 0,
1, 64, 0, 0, 0, 0,
0, 64, 56, 0, 0, 7,
130, 0, 16, 0, 1, 0,
0, 0, 58, 0, 16, 0,
1, 0, 0, 0, 58, 0,
16, 0, 2, 0, 0, 0,
56, 0, 0, 7, 114, 0,
16, 0, 1, 0, 0, 0,
246, 15, 16, 0, 0, 0,
0, 0, 70, 2, 16, 0,
1, 0, 0, 0, 50, 0,
0, 9, 114, 0, 16, 0,
1, 0, 0, 0, 70, 2,
16, 0, 2, 0, 0, 0,
246, 15, 16, 0, 0, 0,
0, 0, 70, 2, 16, 0,
1, 0, 0, 0, 50, 0,
0, 9, 114, 0, 16, 0,
1, 0, 0, 0, 70, 2,
16, 0, 4, 0, 0, 0,
246, 15, 16, 0, 0, 0,
0, 0, 70, 2, 16, 0,
1, 0, 0, 0, 50, 0,
0, 9, 114, 0, 16, 0,
0, 0, 56, 0, 0, 7,
114, 0, 16, 0, 1, 0,
0, 0, 246, 15, 16, 0,
0, 0, 0, 0, 70, 2,
16, 0, 0, 0, 0, 0,
246, 15, 16, 0, 0, 0,
0, 0, 70, 2, 16, 0,
1, 0, 0, 0, 50, 0,
0, 9, 114, 0, 16, 0,
16, 0, 1, 0, 0, 0,
50, 0, 0, 9, 114, 0,
16, 0, 1, 0, 0, 0,
70, 2, 16, 0, 2, 0,
0, 0, 246, 15, 16, 0,
0, 0, 0, 0, 70, 2,
16, 0, 3, 0, 0, 0,
16, 0, 1, 0, 0, 0,
50, 0, 0, 9, 114, 0,
16, 0, 1, 0, 0, 0,
70, 2, 16, 0, 4, 0,
0, 0, 246, 15, 16, 0,
0, 0, 0, 0, 70, 2,
16, 0, 1, 0, 0, 0,
50, 0, 0, 9, 114, 0,
16, 0, 0, 0, 0, 0,
70, 2, 16, 0, 0, 0,
0, 0, 246, 15, 16, 0,
0, 0, 0, 0, 70, 2,
16, 0, 1, 0, 0, 0,
50, 0, 0, 9, 114, 0,
16, 0, 0, 0, 0, 0,
70, 2, 16, 0, 3, 0,
0, 0, 70, 2, 16, 0,
0, 0, 0, 0, 56, 32,
0, 7, 114, 0, 16, 0,
0, 0, 0, 0, 246, 15,
16, 0, 1, 0, 0, 0,
70, 2, 16, 0, 0, 0,
0, 0, 75, 0, 0, 5,
114, 32, 16, 0, 0, 0,
3, 0, 0, 0, 70, 2,
16, 0, 0, 0, 0, 0,
56, 32, 0, 7, 114, 0,
16, 0, 0, 0, 0, 0,
246, 15, 16, 0, 1, 0,
0, 0, 70, 2, 16, 0,
0, 0, 0, 0, 54, 0,
0, 5, 130, 32, 16, 0,
0, 0, 0, 0, 1, 64,
0, 0, 0, 0, 128, 63,
62, 0, 0, 1, 83, 84,
65, 84, 148, 0, 0, 0,
49, 0, 0, 0, 5, 0,
0, 0, 0, 0, 0, 0,
2, 0, 0, 0, 27, 0,
0, 0, 6, 0, 0, 0,
1, 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, 75, 0,
0, 5, 114, 32, 16, 0,
0, 0, 0, 0, 70, 2,
16, 0, 0, 0, 0, 0,
54, 0, 0, 5, 130, 32,
16, 0, 0, 0, 0, 0,
1, 64, 0, 0, 0, 0,
128, 63, 62, 0, 0, 1,
83, 84, 65, 84, 148, 0,
0, 0, 49, 0, 0, 0,
5, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 8, 0,
0, 0, 0, 0, 0, 0,
0, 0, 2, 0, 0, 0,
27, 0, 0, 0, 6, 0,
0, 0, 1, 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, 5, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
8, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0
0, 0, 0, 0, 0, 0,
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

View File

@@ -5,7 +5,7 @@
//
// Buffer Definitions:
//
// cbuffer xesl_pushConstants
// cbuffer push_consts_xe
// {
//
// int2 xe_fsr_rcas_output_offset; // Offset: 0 Size: 8
@@ -19,7 +19,7 @@
// Name Type Format Dim ID HLSL Bind Count
// ------------------------------ ---------- ------- ----------- ------- -------------- ------
// xe_fsr_rcas_source texture float4 2d T0 t0 1
// xesl_pushConstants cbuffer NA NA CB0 cb0 1
// push_consts_xe cbuffer NA NA CB0 cb0 1
//
//
//
@@ -97,21 +97,21 @@ ret
const BYTE guest_output_ffx_fsr_rcas_ps[] =
{
68, 88, 66, 67, 246, 223,
238, 231, 67, 24, 70, 55,
27, 63, 112, 69, 229, 25,
239, 231, 1, 0, 0, 0,
92, 9, 0, 0, 5, 0,
68, 88, 66, 67, 67, 185,
127, 150, 159, 188, 61, 246,
239, 146, 24, 229, 183, 68,
131, 230, 1, 0, 0, 0,
88, 9, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0,
16, 2, 0, 0, 68, 2,
0, 0, 120, 2, 0, 0,
192, 8, 0, 0, 82, 68,
69, 70, 212, 1, 0, 0,
1, 0, 0, 0, 180, 0,
12, 2, 0, 0, 64, 2,
0, 0, 116, 2, 0, 0,
188, 8, 0, 0, 82, 68,
69, 70, 208, 1, 0, 0,
1, 0, 0, 0, 176, 0,
0, 0, 2, 0, 0, 0,
60, 0, 0, 0, 1, 5,
255, 255, 0, 5, 0, 0,
172, 1, 0, 0, 19, 19,
168, 1, 0, 0, 19, 19,
68, 37, 60, 0, 0, 0,
24, 0, 0, 0, 40, 0,
0, 0, 40, 0, 0, 0,
@@ -133,165 +133,133 @@ const BYTE guest_output_ffx_fsr_rcas_ps[] =
0, 0, 120, 101, 95, 102,
115, 114, 95, 114, 99, 97,
115, 95, 115, 111, 117, 114,
99, 101, 0, 120, 101, 115,
108, 95, 112, 117, 115, 104,
67, 111, 110, 115, 116, 97,
110, 116, 115, 0, 171, 171,
159, 0, 0, 0, 2, 0,
0, 0, 204, 0, 0, 0,
16, 0, 0, 0, 0, 0,
99, 101, 0, 112, 117, 115,
104, 95, 99, 111, 110, 115,
116, 115, 95, 120, 101, 0,
171, 171, 159, 0, 0, 0,
2, 0, 0, 0, 200, 0,
0, 0, 16, 0, 0, 0,
0, 0, 0, 0, 0, 0,
28, 1, 0, 0, 0, 0,
0, 0, 8, 0, 0, 0,
2, 0, 0, 0, 60, 1,
0, 0, 24, 1, 0, 0,
0, 0, 0, 0, 8, 0,
0, 0, 2, 0, 0, 0,
56, 1, 0, 0, 0, 0,
0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0,
92, 1, 0, 0, 8, 0,
0, 0, 4, 0, 0, 0,
2, 0, 0, 0, 132, 1,
0, 0, 0, 0, 0, 0,
255, 255, 255, 255, 0, 0,
0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 96, 1,
0, 0, 8, 0, 0, 0,
4, 0, 0, 0, 2, 0,
0, 0, 136, 1, 0, 0,
0, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0,
255, 255, 255, 255, 0, 0,
0, 0, 120, 101, 95, 102,
115, 114, 95, 114, 99, 97,
115, 95, 111, 117, 116, 112,
117, 116, 95, 111, 102, 102,
115, 101, 116, 0, 105, 110,
116, 50, 0, 171, 1, 0,
2, 0, 1, 0, 2, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
54, 1, 0, 0, 120, 101,
0, 0, 0, 0, 120, 101,
95, 102, 115, 114, 95, 114,
99, 97, 115, 95, 115, 104,
97, 114, 112, 110, 101, 115,
115, 95, 112, 111, 115, 116,
95, 115, 101, 116, 117, 112,
0, 102, 108, 111, 97, 116,
0, 171, 0, 0, 3, 0,
1, 0, 1, 0, 0, 0,
99, 97, 115, 95, 111, 117,
116, 112, 117, 116, 95, 111,
102, 102, 115, 101, 116, 0,
105, 110, 116, 50, 0, 171,
1, 0, 2, 0, 1, 0,
2, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 129, 1,
0, 0, 77, 105, 99, 114,
111, 115, 111, 102, 116, 32,
40, 82, 41, 32, 72, 76,
83, 76, 32, 83, 104, 97,
100, 101, 114, 32, 67, 111,
109, 112, 105, 108, 101, 114,
32, 49, 48, 46, 49, 0,
73, 83, 71, 78, 44, 0,
0, 0, 50, 1, 0, 0,
120, 101, 95, 102, 115, 114,
95, 114, 99, 97, 115, 95,
115, 104, 97, 114, 112, 110,
101, 115, 115, 95, 112, 111,
115, 116, 95, 115, 101, 116,
117, 112, 0, 102, 108, 111,
97, 116, 0, 171, 0, 0,
3, 0, 1, 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,
125, 1, 0, 0, 77, 105,
99, 114, 111, 115, 111, 102,
116, 32, 40, 82, 41, 32,
72, 76, 83, 76, 32, 83,
104, 97, 100, 101, 114, 32,
67, 111, 109, 112, 105, 108,
101, 114, 32, 49, 48, 46,
49, 0, 73, 83, 71, 78,
44, 0, 0, 0, 1, 0,
0, 0, 8, 0, 0, 0,
32, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0,
3, 0, 0, 0, 0, 0,
0, 0, 15, 3, 0, 0,
83, 86, 95, 80, 111, 115,
105, 116, 105, 111, 110, 0,
79, 83, 71, 78, 44, 0,
0, 0, 1, 0, 0, 0,
8, 0, 0, 0, 32, 0,
0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 3, 0,
0, 0, 0, 0, 3, 0,
0, 0, 0, 0, 0, 0,
15, 3, 0, 0, 83, 86,
95, 80, 111, 115, 105, 116,
105, 111, 110, 0, 79, 83,
71, 78, 44, 0, 0, 0,
1, 0, 0, 0, 8, 0,
0, 0, 32, 0, 0, 0,
15, 0, 0, 0, 83, 86,
95, 84, 97, 114, 103, 101,
116, 0, 171, 171, 83, 72,
69, 88, 64, 6, 0, 0,
81, 0, 0, 0, 144, 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, 3, 0, 0, 0,
0, 0, 0, 0, 15, 0,
0, 0, 83, 86, 95, 84,
97, 114, 103, 101, 116, 0,
171, 171, 83, 72, 69, 88,
64, 6, 0, 0, 81, 0,
0, 0, 144, 1, 0, 0,
106, 8, 0, 1, 89, 0,
0, 7, 70, 142, 48, 0,
0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 88, 24,
0, 7, 70, 126, 48, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0,
0, 0, 88, 24, 0, 7,
70, 126, 48, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 85, 85,
0, 0, 0, 0, 0, 0,
100, 32, 0, 4, 50, 16,
85, 85, 0, 0, 0, 0,
0, 0, 100, 32, 0, 4,
50, 16, 16, 0, 0, 0,
0, 0, 1, 0, 0, 0,
101, 0, 0, 3, 242, 32,
16, 0, 0, 0, 0, 0,
1, 0, 0, 0, 101, 0,
0, 3, 242, 32, 16, 0,
0, 0, 0, 0, 104, 0,
0, 2, 9, 0, 0, 0,
27, 0, 0, 5, 50, 0,
16, 0, 0, 0, 0, 0,
70, 16, 16, 0, 0, 0,
0, 0, 30, 0, 0, 10,
104, 0, 0, 2, 9, 0,
0, 0, 27, 0, 0, 5,
50, 0, 16, 0, 0, 0,
0, 0, 70, 0, 16, 0,
0, 0, 0, 0, 70, 128,
48, 128, 65, 0, 0, 0,
0, 0, 70, 16, 16, 0,
0, 0, 0, 0, 30, 0,
0, 10, 50, 0, 16, 0,
0, 0, 0, 0, 70, 0,
16, 0, 0, 0, 0, 0,
70, 128, 48, 128, 65, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
30, 0, 0, 10, 242, 0,
16, 0, 1, 0, 0, 0,
70, 4, 16, 0, 0, 0,
0, 0, 2, 64, 0, 0,
255, 255, 255, 255, 0, 0,
0, 0, 30, 0, 0, 10,
242, 0, 16, 0, 1, 0,
0, 0, 70, 4, 16, 0,
0, 0, 0, 0, 2, 64,
0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 0, 0,
255, 255, 255, 255, 54, 0,
0, 5, 50, 0, 16, 0,
2, 0, 0, 0, 230, 10,
16, 0, 1, 0, 0, 0,
54, 0, 0, 8, 194, 0,
0, 0, 255, 255, 255, 255,
54, 0, 0, 5, 50, 0,
16, 0, 2, 0, 0, 0,
2, 64, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 45, 0, 0, 8,
114, 0, 16, 0, 2, 0,
0, 0, 70, 14, 16, 0,
2, 0, 0, 0, 70, 126,
32, 0, 0, 0, 0, 0,
0, 0, 0, 0, 54, 0,
0, 8, 194, 0, 16, 0,
1, 0, 0, 0, 2, 64,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
45, 0, 0, 8, 114, 0,
16, 0, 1, 0, 0, 0,
70, 14, 16, 0, 1, 0,
0, 0, 70, 126, 32, 0,
0, 0, 0, 0, 0, 0,
230, 10, 16, 0, 1, 0,
0, 0, 54, 0, 0, 8,
194, 0, 16, 0, 0, 0,
194, 0, 16, 0, 2, 0,
0, 0, 2, 64, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 45, 0,
0, 8, 114, 0, 16, 0,
3, 0, 0, 0, 70, 14,
16, 0, 0, 0, 0, 0,
2, 0, 0, 0, 70, 14,
16, 0, 2, 0, 0, 0,
70, 126, 32, 0, 0, 0,
0, 0, 0, 0, 0, 0,
30, 0, 0, 10, 242, 0,
16, 0, 0, 0, 0, 0,
70, 4, 16, 0, 0, 0,
0, 0, 2, 64, 0, 0,
0, 0, 0, 0, 1, 0,
0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 54, 0,
0, 5, 50, 0, 16, 0,
4, 0, 0, 0, 230, 10,
16, 0, 0, 0, 0, 0,
54, 0, 0, 8, 194, 0,
16, 0, 4, 0, 0, 0,
16, 0, 1, 0, 0, 0,
2, 64, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 45, 0, 0, 8,
114, 0, 16, 0, 4, 0,
114, 0, 16, 0, 1, 0,
0, 0, 70, 14, 16, 0,
4, 0, 0, 0, 70, 126,
1, 0, 0, 0, 70, 126,
32, 0, 0, 0, 0, 0,
0, 0, 0, 0, 54, 0,
0, 8, 194, 0, 16, 0,
@@ -300,201 +268,232 @@ const BYTE guest_output_ffx_fsr_rcas_ps[] =
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
45, 0, 0, 8, 114, 0,
16, 0, 0, 0, 0, 0,
16, 0, 3, 0, 0, 0,
70, 14, 16, 0, 0, 0,
0, 0, 70, 126, 32, 0,
0, 0, 0, 0, 0, 0,
0, 0, 30, 0, 0, 10,
242, 0, 16, 0, 0, 0,
0, 0, 70, 4, 16, 0,
0, 0, 0, 0, 2, 64,
0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0,
54, 0, 0, 5, 50, 0,
16, 0, 4, 0, 0, 0,
230, 10, 16, 0, 0, 0,
0, 0, 54, 0, 0, 8,
194, 0, 16, 0, 4, 0,
0, 0, 2, 64, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 45, 0,
0, 8, 114, 0, 16, 0,
4, 0, 0, 0, 70, 14,
16, 0, 4, 0, 0, 0,
70, 126, 32, 0, 0, 0,
0, 0, 0, 0, 0, 0,
54, 0, 0, 8, 194, 0,
16, 0, 0, 0, 0, 0,
2, 64, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 45, 0, 0, 8,
114, 0, 16, 0, 0, 0,
0, 0, 70, 14, 16, 0,
0, 0, 0, 0, 70, 126,
32, 0, 0, 0, 0, 0,
0, 0, 0, 0, 51, 0,
0, 7, 114, 0, 16, 0,
5, 0, 0, 0, 70, 2,
16, 0, 1, 0, 0, 0,
70, 2, 16, 0, 4, 0,
0, 0, 51, 0, 0, 7,
114, 0, 16, 0, 5, 0,
0, 0, 70, 2, 16, 0,
1, 0, 0, 0, 70, 2,
16, 0, 4, 0, 0, 0,
2, 0, 0, 0, 70, 2,
16, 0, 5, 0, 0, 0,
51, 0, 0, 7, 114, 0,
16, 0, 5, 0, 0, 0,
70, 2, 16, 0, 2, 0,
70, 2, 16, 0, 0, 0,
0, 0, 70, 2, 16, 0,
5, 0, 0, 0, 51, 0,
5, 0, 0, 0, 52, 0,
0, 7, 114, 0, 16, 0,
5, 0, 0, 0, 70, 2,
16, 0, 0, 0, 0, 0,
70, 2, 16, 0, 5, 0,
6, 0, 0, 0, 70, 2,
16, 0, 1, 0, 0, 0,
70, 2, 16, 0, 4, 0,
0, 0, 52, 0, 0, 7,
114, 0, 16, 0, 6, 0,
0, 0, 70, 2, 16, 0,
1, 0, 0, 0, 70, 2,
16, 0, 4, 0, 0, 0,
2, 0, 0, 0, 70, 2,
16, 0, 6, 0, 0, 0,
52, 0, 0, 7, 114, 0,
16, 0, 6, 0, 0, 0,
70, 2, 16, 0, 2, 0,
70, 2, 16, 0, 0, 0,
0, 0, 70, 2, 16, 0,
6, 0, 0, 0, 52, 0,
6, 0, 0, 0, 51, 0,
0, 7, 114, 0, 16, 0,
6, 0, 0, 0, 70, 2,
16, 0, 0, 0, 0, 0,
70, 2, 16, 0, 6, 0,
0, 0, 51, 0, 0, 7,
7, 0, 0, 0, 70, 2,
16, 0, 3, 0, 0, 0,
70, 2, 16, 0, 5, 0,
0, 0, 56, 0, 0, 10,
114, 0, 16, 0, 8, 0,
0, 0, 70, 2, 16, 0,
6, 0, 0, 0, 2, 64,
0, 0, 0, 0, 128, 64,
0, 0, 128, 64, 0, 0,
128, 64, 0, 0, 0, 0,
129, 0, 0, 5, 114, 0,
16, 0, 8, 0, 0, 0,
70, 2, 16, 0, 8, 0,
0, 0, 56, 0, 0, 7,
114, 0, 16, 0, 7, 0,
0, 0, 70, 2, 16, 0,
3, 0, 0, 0, 70, 2,
16, 0, 5, 0, 0, 0,
56, 0, 0, 10, 114, 0,
7, 0, 0, 0, 70, 2,
16, 0, 8, 0, 0, 0,
70, 2, 16, 0, 6, 0,
0, 0, 2, 64, 0, 0,
0, 0, 128, 64, 0, 0,
128, 64, 0, 0, 128, 64,
0, 0, 0, 0, 129, 0,
0, 5, 114, 0, 16, 0,
8, 0, 0, 0, 70, 2,
16, 0, 8, 0, 0, 0,
56, 0, 0, 7, 114, 0,
16, 0, 7, 0, 0, 0,
70, 2, 16, 0, 7, 0,
52, 0, 0, 7, 114, 0,
16, 0, 6, 0, 0, 0,
70, 2, 16, 0, 3, 0,
0, 0, 70, 2, 16, 0,
8, 0, 0, 0, 52, 0,
0, 7, 114, 0, 16, 0,
6, 0, 0, 0, 0, 0,
0, 11, 114, 0, 16, 0,
6, 0, 0, 0, 70, 2,
16, 0, 3, 0, 0, 0,
70, 2, 16, 0, 6, 0,
0, 0, 0, 0, 0, 11,
114, 0, 16, 0, 6, 0,
0, 0, 70, 2, 16, 128,
65, 0, 0, 0, 6, 0,
0, 0, 2, 64, 0, 0,
16, 128, 65, 0, 0, 0,
6, 0, 0, 0, 2, 64,
0, 0, 0, 0, 128, 63,
0, 0, 128, 63, 0, 0,
128, 63, 0, 0, 128, 63,
0, 0, 0, 0, 50, 0,
0, 15, 114, 0, 16, 0,
5, 0, 0, 0, 70, 2,
16, 0, 5, 0, 0, 0,
2, 64, 0, 0, 0, 0,
128, 64, 0, 0, 128, 64,
0, 0, 128, 64, 0, 0,
0, 0, 2, 64, 0, 0,
0, 0, 128, 192, 0, 0,
128, 192, 0, 0, 128, 192,
0, 0, 0, 0, 129, 0,
0, 5, 114, 0, 16, 0,
5, 0, 0, 0, 70, 2,
16, 0, 5, 0, 0, 0,
56, 0, 0, 7, 114, 0,
128, 63, 0, 0, 0, 0,
50, 0, 0, 15, 114, 0,
16, 0, 5, 0, 0, 0,
70, 2, 16, 0, 5, 0,
0, 0, 70, 2, 16, 0,
6, 0, 0, 0, 52, 0,
0, 8, 114, 0, 16, 0,
5, 0, 0, 0, 70, 2,
0, 0, 2, 64, 0, 0,
0, 0, 128, 64, 0, 0,
128, 64, 0, 0, 128, 64,
0, 0, 0, 0, 2, 64,
0, 0, 0, 0, 128, 192,
0, 0, 128, 192, 0, 0,
128, 192, 0, 0, 0, 0,
129, 0, 0, 5, 114, 0,
16, 0, 5, 0, 0, 0,
70, 2, 16, 128, 65, 0,
0, 0, 7, 0, 0, 0,
52, 0, 0, 7, 130, 0,
16, 0, 0, 0, 0, 0,
42, 0, 16, 0, 5, 0,
0, 0, 26, 0, 16, 0,
5, 0, 0, 0, 52, 0,
0, 7, 130, 0, 16, 0,
0, 0, 0, 0, 58, 0,
16, 0, 0, 0, 0, 0,
10, 0, 16, 0, 5, 0,
0, 0, 51, 0, 0, 7,
70, 2, 16, 0, 5, 0,
0, 0, 56, 0, 0, 7,
114, 0, 16, 0, 5, 0,
0, 0, 70, 2, 16, 0,
5, 0, 0, 0, 70, 2,
16, 0, 6, 0, 0, 0,
52, 0, 0, 8, 114, 0,
16, 0, 5, 0, 0, 0,
70, 2, 16, 0, 5, 0,
0, 0, 70, 2, 16, 128,
65, 0, 0, 0, 7, 0,
0, 0, 52, 0, 0, 7,
130, 0, 16, 0, 0, 0,
0, 0, 58, 0, 16, 0,
0, 0, 0, 0, 1, 64,
0, 0, 0, 0, 0, 0,
0, 0, 42, 0, 16, 0,
5, 0, 0, 0, 26, 0,
16, 0, 5, 0, 0, 0,
52, 0, 0, 7, 130, 0,
16, 0, 0, 0, 0, 0,
58, 0, 16, 0, 0, 0,
0, 0, 1, 64, 0, 0,
0, 0, 64, 190, 56, 0,
0, 9, 130, 0, 16, 0,
0, 0, 10, 0, 16, 0,
5, 0, 0, 0, 51, 0,
0, 7, 130, 0, 16, 0,
0, 0, 0, 0, 58, 0,
16, 0, 0, 0, 0, 0,
42, 128, 48, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 50, 0,
0, 9, 130, 0, 16, 0,
1, 0, 0, 0, 58, 0,
16, 0, 0, 0, 0, 0,
1, 64, 0, 0, 0, 0,
128, 64, 1, 64, 0, 0,
0, 0, 128, 63, 30, 0,
0, 8, 130, 0, 16, 0,
2, 0, 0, 0, 58, 0,
16, 128, 65, 0, 0, 0,
1, 0, 0, 0, 1, 64,
0, 0, 255, 159, 241, 126,
50, 0, 0, 10, 130, 0,
0, 0, 52, 0, 0, 7,
130, 0, 16, 0, 0, 0,
0, 0, 58, 0, 16, 0,
0, 0, 0, 0, 1, 64,
0, 0, 0, 0, 64, 190,
56, 0, 0, 9, 130, 0,
16, 0, 0, 0, 0, 0,
58, 0, 16, 0, 0, 0,
0, 0, 42, 128, 48, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
50, 0, 0, 9, 130, 0,
16, 0, 1, 0, 0, 0,
58, 0, 16, 0, 0, 0,
0, 0, 1, 64, 0, 0,
0, 0, 128, 64, 1, 64,
0, 0, 0, 0, 128, 63,
30, 0, 0, 8, 130, 0,
16, 0, 2, 0, 0, 0,
58, 0, 16, 128, 65, 0,
0, 0, 2, 0, 0, 0,
58, 0, 16, 0, 1, 0,
0, 0, 1, 64, 0, 0,
0, 0, 0, 64, 56, 0,
0, 7, 130, 0, 16, 0,
1, 0, 0, 0, 58, 0,
16, 0, 1, 0, 0, 0,
58, 0, 16, 0, 2, 0,
0, 0, 56, 0, 0, 7,
114, 0, 16, 0, 1, 0,
0, 0, 70, 2, 16, 0,
1, 0, 0, 0, 246, 15,
16, 0, 0, 0, 0, 0,
50, 0, 0, 9, 114, 0,
16, 0, 1, 0, 0, 0,
246, 15, 16, 0, 0, 0,
0, 0, 70, 2, 16, 0,
2, 0, 0, 0, 70, 2,
16, 0, 1, 0, 0, 0,
50, 0, 0, 9, 114, 0,
16, 0, 0, 0, 0, 0,
246, 15, 16, 0, 0, 0,
0, 0, 70, 2, 16, 0,
0, 0, 0, 0, 70, 2,
16, 0, 1, 0, 0, 0,
50, 0, 0, 9, 114, 0,
16, 0, 0, 0, 0, 0,
246, 15, 16, 0, 0, 0,
0, 0, 70, 2, 16, 0,
4, 0, 0, 0, 70, 2,
16, 0, 0, 0, 0, 0,
0, 0, 0, 7, 114, 0,
16, 0, 0, 0, 0, 0,
70, 2, 16, 0, 3, 0,
0, 0, 70, 2, 16, 0,
0, 0, 0, 0, 56, 0,
0, 7, 114, 32, 16, 0,
0, 0, 0, 0, 246, 15,
16, 0, 1, 0, 0, 0,
70, 2, 16, 0, 0, 0,
0, 0, 54, 0, 0, 5,
130, 32, 16, 0, 0, 0,
0, 0, 1, 64, 0, 0,
0, 0, 128, 63, 62, 0,
0, 1, 83, 84, 65, 84,
148, 0, 0, 0, 49, 0,
0, 0, 9, 0, 0, 0,
0, 0, 0, 0, 2, 0,
0, 0, 28, 0, 0, 0,
4, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0,
1, 64, 0, 0, 255, 159,
241, 126, 50, 0, 0, 10,
130, 0, 16, 0, 1, 0,
0, 0, 58, 0, 16, 128,
65, 0, 0, 0, 2, 0,
0, 0, 58, 0, 16, 0,
1, 0, 0, 0, 1, 64,
0, 0, 0, 0, 0, 64,
56, 0, 0, 7, 130, 0,
16, 0, 1, 0, 0, 0,
58, 0, 16, 0, 1, 0,
0, 0, 58, 0, 16, 0,
2, 0, 0, 0, 56, 0,
0, 7, 114, 0, 16, 0,
1, 0, 0, 0, 70, 2,
16, 0, 1, 0, 0, 0,
246, 15, 16, 0, 0, 0,
0, 0, 50, 0, 0, 9,
114, 0, 16, 0, 1, 0,
0, 0, 246, 15, 16, 0,
0, 0, 0, 0, 70, 2,
16, 0, 2, 0, 0, 0,
70, 2, 16, 0, 1, 0,
0, 0, 50, 0, 0, 9,
114, 0, 16, 0, 0, 0,
0, 0, 246, 15, 16, 0,
0, 0, 0, 0, 70, 2,
16, 0, 0, 0, 0, 0,
70, 2, 16, 0, 1, 0,
0, 0, 50, 0, 0, 9,
114, 0, 16, 0, 0, 0,
0, 0, 246, 15, 16, 0,
0, 0, 0, 0, 70, 2,
16, 0, 4, 0, 0, 0,
70, 2, 16, 0, 0, 0,
0, 0, 0, 0, 0, 7,
114, 0, 16, 0, 0, 0,
0, 0, 70, 2, 16, 0,
3, 0, 0, 0, 70, 2,
16, 0, 0, 0, 0, 0,
56, 0, 0, 7, 114, 32,
16, 0, 0, 0, 0, 0,
246, 15, 16, 0, 1, 0,
0, 0, 70, 2, 16, 0,
0, 0, 0, 0, 54, 0,
0, 5, 130, 32, 16, 0,
0, 0, 0, 0, 1, 64,
0, 0, 0, 0, 128, 63,
62, 0, 0, 1, 83, 84,
65, 84, 148, 0, 0, 0,
49, 0, 0, 0, 9, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 5, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 8, 0, 0, 0,
2, 0, 0, 0, 28, 0,
0, 0, 4, 0, 0, 0,
0, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
5, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 8, 0,
0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0
};

View File

@@ -5,7 +5,7 @@
//
// Buffer Definitions:
//
// cbuffer xesl_pushConstants
// cbuffer push_consts_xe
// {
//
// float2 xe_triangle_strip_rect_offset;// Offset: 0 Size: 8
@@ -18,7 +18,7 @@
//
// Name Type Format Dim ID HLSL Bind Count
// ------------------------------ ---------- ------- ----------- ------- -------------- ------
// xesl_pushConstants cbuffer NA NA CB0 cb0 1
// push_consts_xe cbuffer NA NA CB0 cb0 1
//
//
//
@@ -53,21 +53,21 @@ ret
const BYTE guest_output_triangle_strip_rect_vs[] =
{
68, 88, 66, 67, 7, 8,
151, 116, 244, 223, 181, 252,
225, 125, 49, 199, 242, 21,
127, 234, 1, 0, 0, 0,
204, 3, 0, 0, 5, 0,
68, 88, 66, 67, 50, 140,
173, 83, 164, 102, 25, 145,
174, 164, 206, 34, 69, 212,
161, 224, 1, 0, 0, 0,
200, 3, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0,
172, 1, 0, 0, 224, 1,
0, 0, 20, 2, 0, 0,
48, 3, 0, 0, 82, 68,
69, 70, 112, 1, 0, 0,
1, 0, 0, 0, 120, 0,
168, 1, 0, 0, 220, 1,
0, 0, 16, 2, 0, 0,
44, 3, 0, 0, 82, 68,
69, 70, 108, 1, 0, 0,
1, 0, 0, 0, 116, 0,
0, 0, 1, 0, 0, 0,
60, 0, 0, 0, 1, 5,
254, 255, 0, 5, 0, 0,
72, 1, 0, 0, 19, 19,
68, 1, 0, 0, 19, 19,
68, 37, 60, 0, 0, 0,
24, 0, 0, 0, 40, 0,
0, 0, 40, 0, 0, 0,
@@ -79,131 +79,121 @@ const BYTE guest_output_triangle_strip_rect_vs[] =
0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 120, 101,
115, 108, 95, 112, 117, 115,
104, 67, 111, 110, 115, 116,
97, 110, 116, 115, 0, 171,
100, 0, 0, 0, 2, 0,
0, 0, 144, 0, 0, 0,
16, 0, 0, 0, 0, 0,
0, 0, 0, 0, 112, 117,
115, 104, 95, 99, 111, 110,
115, 116, 115, 95, 120, 101,
0, 171, 100, 0, 0, 0,
2, 0, 0, 0, 140, 0,
0, 0, 16, 0, 0, 0,
0, 0, 0, 0, 0, 0,
224, 0, 0, 0, 0, 0,
0, 0, 220, 0, 0, 0,
0, 0, 0, 0, 8, 0,
0, 0, 2, 0, 0, 0,
4, 1, 0, 0, 0, 0,
0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0,
40, 1, 0, 0, 8, 0,
0, 0, 8, 0, 0, 0,
2, 0, 0, 0, 8, 1,
2, 0, 0, 0, 4, 1,
0, 0, 0, 0, 0, 0,
255, 255, 255, 255, 0, 0,
0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 44, 1,
0, 0, 8, 0, 0, 0,
8, 0, 0, 0, 2, 0,
0, 0, 8, 1, 0, 0,
0, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0,
255, 255, 255, 255, 0, 0,
0, 0, 0, 0, 120, 101,
95, 116, 114, 105, 97, 110,
103, 108, 101, 95, 115, 116,
114, 105, 112, 95, 114, 101,
99, 116, 95, 111, 102, 102,
115, 101, 116, 0, 102, 108,
111, 97, 116, 50, 0, 171,
171, 171, 1, 0, 3, 0,
1, 0, 2, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 250, 0,
0, 0, 120, 101, 95, 116,
114, 105, 97, 110, 103, 108,
101, 95, 115, 116, 114, 105,
112, 95, 114, 101, 99, 116,
95, 111, 102, 102, 115, 101,
116, 0, 102, 108, 111, 97,
116, 50, 0, 171, 171, 171,
1, 0, 3, 0, 1, 0,
2, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 254, 0, 0, 0,
120, 101, 95, 116, 114, 105,
97, 110, 103, 108, 101, 95,
115, 116, 114, 105, 112, 95,
114, 101, 99, 116, 95, 115,
105, 122, 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,
95, 115, 105, 122, 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, 44, 0, 0, 0,
1, 0, 0, 0, 8, 0,
0, 0, 32, 0, 0, 0,
0, 0, 0, 0, 6, 0,
0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 1, 1,
0, 0, 83, 86, 95, 86,
101, 114, 116, 101, 120, 73,
68, 0, 79, 83, 71, 78,
44, 0, 0, 0, 1, 0,
0, 0, 8, 0, 0, 0,
32, 0, 0, 0, 0, 0,
0, 0, 6, 0, 0, 0,
1, 0, 0, 0, 0, 0,
0, 0, 1, 1, 0, 0,
83, 86, 95, 86, 101, 114,
116, 101, 120, 73, 68, 0,
79, 83, 71, 78, 44, 0,
0, 0, 1, 0, 0, 0,
8, 0, 0, 0, 32, 0,
3, 0, 0, 0, 0, 0,
0, 0, 15, 0, 0, 0,
83, 86, 95, 80, 111, 115,
105, 116, 105, 111, 110, 0,
83, 72, 69, 88, 20, 1,
0, 0, 81, 0, 1, 0,
69, 0, 0, 0, 106, 8,
0, 1, 89, 0, 0, 7,
70, 142, 48, 0, 0, 0,
0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 3, 0,
0, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0,
15, 0, 0, 0, 83, 86,
95, 80, 111, 115, 105, 116,
105, 111, 110, 0, 83, 72,
69, 88, 20, 1, 0, 0,
81, 0, 1, 0, 69, 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, 96, 0,
0, 4, 18, 16, 16, 0,
0, 0, 0, 0, 6, 0,
0, 0, 103, 0, 0, 4,
242, 32, 16, 0, 0, 0,
0, 0, 1, 0, 0, 0,
104, 0, 0, 2, 1, 0,
0, 0, 85, 0, 0, 7,
34, 0, 16, 0, 0, 0,
0, 0, 10, 16, 16, 0,
0, 0, 0, 0, 1, 64,
0, 0, 1, 0, 0, 0,
54, 0, 0, 5, 18, 0,
96, 0, 0, 4, 18, 16,
16, 0, 0, 0, 0, 0,
10, 16, 16, 0, 0, 0,
0, 0, 1, 0, 0, 10,
6, 0, 0, 0, 103, 0,
0, 4, 242, 32, 16, 0,
0, 0, 0, 0, 1, 0,
0, 0, 104, 0, 0, 2,
1, 0, 0, 0, 85, 0,
0, 7, 34, 0, 16, 0,
0, 0, 0, 0, 10, 16,
16, 0, 0, 0, 0, 0,
1, 64, 0, 0, 1, 0,
0, 0, 54, 0, 0, 5,
18, 0, 16, 0, 0, 0,
0, 0, 10, 16, 16, 0,
0, 0, 0, 0, 1, 0,
0, 10, 50, 0, 16, 0,
0, 0, 0, 0, 70, 0,
16, 0, 0, 0, 0, 0,
2, 64, 0, 0, 1, 0,
0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 86, 0, 0, 5,
50, 0, 16, 0, 0, 0,
0, 0, 70, 0, 16, 0,
0, 0, 0, 0, 2, 64,
0, 0, 1, 0, 0, 0,
1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
86, 0, 0, 5, 50, 0,
0, 0, 0, 0, 50, 0,
0, 13, 50, 32, 16, 0,
0, 0, 0, 0, 70, 0,
16, 0, 0, 0, 0, 0,
70, 0, 16, 0, 0, 0,
0, 0, 50, 0, 0, 13,
50, 32, 16, 0, 0, 0,
0, 0, 70, 0, 16, 0,
0, 0, 0, 0, 230, 138,
230, 138, 48, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 70, 128,
48, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 70, 128, 48, 0,
0, 0, 54, 0, 0, 8,
194, 32, 16, 0, 0, 0,
0, 0, 2, 64, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
54, 0, 0, 8, 194, 32,
16, 0, 0, 0, 0, 0,
2, 64, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
128, 63, 62, 0, 0, 1,
83, 84, 65, 84, 148, 0,
0, 0, 7, 0, 0, 0,
1, 0, 0, 0, 0, 0,
0, 0, 2, 0, 0, 0,
1, 0, 0, 0, 0, 0,
0, 0, 2, 0, 0, 0,
1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
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, 128, 63, 62, 0,
0, 1, 83, 84, 65, 84,
148, 0, 0, 0, 7, 0,
0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 2, 0,
0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 2, 0,
0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
@@ -212,7 +202,17 @@ const BYTE guest_output_triangle_strip_rect_vs[] =
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, 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
};

View File

@@ -7,7 +7,7 @@
//
// Name Type Format Dim ID HLSL Bind Count
// ------------------------------ ---------- ------- ----------- ------- -------------- ------
// xesl_id_sampler_xe_immediate_texture sampler NA NA S0 s0 1
// xe_immediate_texture_xe_sampler sampler NA NA S0 s0 1
// xe_immediate_texture texture float4 2d T0 t0 1
//
//
@@ -42,21 +42,21 @@ ret
const BYTE immediate_ps[] =
{
68, 88, 66, 67, 152, 87,
131, 55, 21, 197, 40, 238,
220, 42, 65, 152, 57, 144,
44, 106, 1, 0, 0, 0,
20, 3, 0, 0, 5, 0,
68, 88, 66, 67, 107, 181,
28, 66, 229, 168, 59, 0,
81, 196, 220, 121, 194, 12,
76, 233, 1, 0, 0, 0,
16, 3, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0,
44, 1, 0, 0, 124, 1,
0, 0, 176, 1, 0, 0,
120, 2, 0, 0, 82, 68,
69, 70, 240, 0, 0, 0,
40, 1, 0, 0, 120, 1,
0, 0, 172, 1, 0, 0,
116, 2, 0, 0, 82, 68,
69, 70, 236, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 2, 0, 0, 0,
60, 0, 0, 0, 1, 5,
255, 255, 0, 5, 0, 0,
198, 0, 0, 0, 19, 19,
193, 0, 0, 0, 19, 19,
68, 37, 60, 0, 0, 0,
24, 0, 0, 0, 40, 0,
0, 0, 40, 0, 0, 0,
@@ -68,95 +68,89 @@ const BYTE immediate_ps[] =
0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 177, 0,
0, 0, 0, 0, 172, 0,
0, 0, 2, 0, 0, 0,
5, 0, 0, 0, 4, 0,
0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 1, 0,
0, 0, 12, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 120, 101, 115, 108,
95, 105, 100, 95, 115, 97,
109, 112, 108, 101, 114, 95,
120, 101, 95, 105, 109, 109,
101, 100, 105, 97, 116, 101,
95, 116, 101, 120, 116, 117,
114, 101, 0, 120, 101, 95,
105, 109, 109, 101, 100, 105,
97, 116, 101, 95, 116, 101,
120, 116, 117, 114, 101, 0,
77, 105, 99, 114, 111, 115,
111, 102, 116, 32, 40, 82,
41, 32, 72, 76, 83, 76,
32, 83, 104, 97, 100, 101,
114, 32, 67, 111, 109, 112,
105, 108, 101, 114, 32, 49,
48, 46, 49, 0, 171, 171,
73, 83, 71, 78, 72, 0,
0, 0, 2, 0, 0, 0,
8, 0, 0, 0, 56, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 3, 0,
0, 0, 0, 0, 0, 0,
3, 3, 0, 0, 65, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 3, 0,
0, 0, 1, 0, 0, 0,
15, 15, 0, 0, 84, 69,
88, 67, 79, 79, 82, 68,
0, 67, 79, 76, 79, 82,
0, 171, 79, 83, 71, 78,
44, 0, 0, 0, 1, 0,
0, 0, 120, 101, 95, 105,
109, 109, 101, 100, 105, 97,
116, 101, 95, 116, 101, 120,
116, 117, 114, 101, 95, 120,
101, 95, 115, 97, 109, 112,
108, 101, 114, 0, 120, 101,
95, 105, 109, 109, 101, 100,
105, 97, 116, 101, 95, 116,
101, 120, 116, 117, 114, 101,
0, 77, 105, 99, 114, 111,
115, 111, 102, 116, 32, 40,
82, 41, 32, 72, 76, 83,
76, 32, 83, 104, 97, 100,
101, 114, 32, 67, 111, 109,
112, 105, 108, 101, 114, 32,
49, 48, 46, 49, 0, 171,
171, 171, 73, 83, 71, 78,
72, 0, 0, 0, 2, 0,
0, 0, 8, 0, 0, 0,
32, 0, 0, 0, 0, 0,
56, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
3, 0, 0, 0, 0, 0,
0, 0, 15, 0, 0, 0,
83, 86, 95, 84, 97, 114,
103, 101, 116, 0, 171, 171,
83, 72, 69, 88, 192, 0,
0, 0, 81, 0, 0, 0,
48, 0, 0, 0, 106, 8,
0, 1, 90, 0, 0, 6,
70, 110, 48, 0, 0, 0,
0, 0, 3, 3, 0, 0,
65, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
3, 0, 0, 0, 1, 0,
0, 0, 15, 15, 0, 0,
84, 69, 88, 67, 79, 79,
82, 68, 0, 67, 79, 76,
79, 82, 0, 171, 79, 83,
71, 78, 44, 0, 0, 0,
1, 0, 0, 0, 8, 0,
0, 0, 32, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 3, 0, 0, 0,
0, 0, 0, 0, 15, 0,
0, 0, 83, 86, 95, 84,
97, 114, 103, 101, 116, 0,
171, 171, 83, 72, 69, 88,
192, 0, 0, 0, 81, 0,
0, 0, 48, 0, 0, 0,
106, 8, 0, 1, 90, 0,
0, 6, 70, 110, 48, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 88, 24, 0, 7,
70, 126, 48, 0, 0, 0,
0, 0, 0, 0, 88, 24,
0, 7, 70, 126, 48, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 85, 85,
0, 0, 0, 0, 0, 0,
98, 16, 0, 3, 50, 16,
85, 85, 0, 0, 0, 0,
0, 0, 98, 16, 0, 3,
50, 16, 16, 0, 0, 0,
0, 0, 98, 16, 0, 3,
242, 16, 16, 0, 1, 0,
0, 0, 101, 0, 0, 3,
242, 32, 16, 0, 0, 0,
0, 0, 104, 0, 0, 2,
1, 0, 0, 0, 72, 0,
0, 13, 242, 0, 16, 0,
0, 0, 0, 0, 70, 16,
16, 0, 0, 0, 0, 0,
98, 16, 0, 3, 242, 16,
70, 126, 32, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 96, 32, 0, 0, 0,
0, 0, 0, 0, 0, 0,
1, 64, 0, 0, 0, 0,
0, 0, 56, 0, 0, 7,
242, 32, 16, 0, 0, 0,
0, 0, 70, 14, 16, 0,
0, 0, 0, 0, 70, 30,
16, 0, 1, 0, 0, 0,
101, 0, 0, 3, 242, 32,
16, 0, 0, 0, 0, 0,
104, 0, 0, 2, 1, 0,
0, 0, 72, 0, 0, 13,
242, 0, 16, 0, 0, 0,
0, 0, 70, 16, 16, 0,
0, 0, 0, 0, 70, 126,
32, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 96,
32, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 64,
0, 0, 0, 0, 0, 0,
56, 0, 0, 7, 242, 32,
16, 0, 0, 0, 0, 0,
70, 14, 16, 0, 0, 0,
0, 0, 70, 30, 16, 0,
1, 0, 0, 0, 62, 0,
0, 1, 83, 84, 65, 84,
148, 0, 0, 0, 3, 0,
0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 3, 0,
0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
62, 0, 0, 1, 83, 84,
65, 84, 148, 0, 0, 0,
3, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0,
3, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0,
@@ -164,6 +158,7 @@ const BYTE immediate_ps[] =
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, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
@@ -173,5 +168,9 @@ const BYTE immediate_ps[] =
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0
};

View File

@@ -5,7 +5,7 @@
//
// Buffer Definitions:
//
// cbuffer xesl_pushConstants
// cbuffer push_consts_xe
// {
//
// float2 xe_coordinate_space_size_inv;// Offset: 0 Size: 8
@@ -17,7 +17,7 @@
//
// Name Type Format Dim ID HLSL Bind Count
// ------------------------------ ---------- ------- ----------- ------- -------------- ------
// xesl_pushConstants cbuffer NA NA CB0 cb0 1
// push_consts_xe cbuffer NA NA CB0 cb0 1
//
//
//
@@ -59,21 +59,21 @@ ret
const BYTE immediate_vs[] =
{
68, 88, 66, 67, 114, 172,
128, 43, 132, 204, 20, 17,
17, 47, 214, 22, 21, 124,
168, 133, 1, 0, 0, 0,
20, 4, 0, 0, 5, 0,
68, 88, 66, 67, 150, 136,
152, 237, 155, 249, 84, 3,
80, 221, 206, 175, 204, 144,
211, 193, 1, 0, 0, 0,
16, 4, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0,
100, 1, 0, 0, 212, 1,
0, 0, 72, 2, 0, 0,
120, 3, 0, 0, 82, 68,
69, 70, 40, 1, 0, 0,
1, 0, 0, 0, 120, 0,
96, 1, 0, 0, 208, 1,
0, 0, 68, 2, 0, 0,
116, 3, 0, 0, 82, 68,
69, 70, 36, 1, 0, 0,
1, 0, 0, 0, 116, 0,
0, 0, 1, 0, 0, 0,
60, 0, 0, 0, 1, 5,
254, 255, 0, 5, 0, 0,
0, 1, 0, 0, 19, 19,
252, 0, 0, 0, 19, 19,
68, 37, 60, 0, 0, 0,
24, 0, 0, 0, 40, 0,
0, 0, 40, 0, 0, 0,
@@ -85,135 +85,134 @@ const BYTE immediate_vs[] =
0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 120, 101,
115, 108, 95, 112, 117, 115,
104, 67, 111, 110, 115, 116,
97, 110, 116, 115, 0, 171,
100, 0, 0, 0, 1, 0,
0, 0, 144, 0, 0, 0,
16, 0, 0, 0, 0, 0,
0, 0, 0, 0, 112, 117,
115, 104, 95, 99, 111, 110,
115, 116, 115, 95, 120, 101,
0, 171, 100, 0, 0, 0,
1, 0, 0, 0, 140, 0,
0, 0, 16, 0, 0, 0,
0, 0, 0, 0, 0, 0,
184, 0, 0, 0, 0, 0,
0, 0, 8, 0, 0, 0,
2, 0, 0, 0, 220, 0,
0, 0, 0, 0, 0, 0,
255, 255, 255, 255, 0, 0,
0, 0, 180, 0, 0, 0,
0, 0, 0, 0, 8, 0,
0, 0, 2, 0, 0, 0,
216, 0, 0, 0, 0, 0,
0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 120, 101,
95, 99, 111, 111, 114, 100,
105, 110, 97, 116, 101, 95,
115, 112, 97, 99, 101, 95,
115, 105, 122, 101, 95, 105,
110, 118, 0, 102, 108, 111,
97, 116, 50, 0, 1, 0,
3, 0, 1, 0, 2, 0,
0, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0,
120, 101, 95, 99, 111, 111,
114, 100, 105, 110, 97, 116,
101, 95, 115, 112, 97, 99,
101, 95, 115, 105, 122, 101,
95, 105, 110, 118, 0, 102,
108, 111, 97, 116, 50, 0,
1, 0, 3, 0, 1, 0,
2, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 209, 0, 0, 0,
77, 105, 99, 114, 111, 115,
111, 102, 116, 32, 40, 82,
41, 32, 72, 76, 83, 76,
32, 83, 104, 97, 100, 101,
114, 32, 67, 111, 109, 112,
105, 108, 101, 114, 32, 49,
48, 46, 49, 0, 73, 83,
71, 78, 104, 0, 0, 0,
3, 0, 0, 0, 8, 0,
0, 0, 80, 0, 0, 0,
0, 0, 0, 0, 0, 0,
213, 0, 0, 0, 77, 105,
99, 114, 111, 115, 111, 102,
116, 32, 40, 82, 41, 32,
72, 76, 83, 76, 32, 83,
104, 97, 100, 101, 114, 32,
67, 111, 109, 112, 105, 108,
101, 114, 32, 49, 48, 46,
49, 0, 73, 83, 71, 78,
104, 0, 0, 0, 3, 0,
0, 0, 3, 0, 0, 0,
0, 0, 0, 0, 3, 3,
0, 0, 89, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 3, 0, 0, 0,
1, 0, 0, 0, 3, 3,
0, 0, 98, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 3, 0, 0, 0,
2, 0, 0, 0, 15, 15,
0, 0, 80, 79, 83, 73,
84, 73, 79, 78, 0, 84,
69, 88, 67, 79, 79, 82,
68, 0, 67, 79, 76, 79,
82, 0, 79, 83, 71, 78,
108, 0, 0, 0, 3, 0,
0, 0, 8, 0, 0, 0,
80, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
3, 0, 0, 0, 0, 0,
0, 0, 3, 3, 0, 0,
0, 0, 3, 12, 0, 0,
89, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
3, 0, 0, 0, 1, 0,
0, 0, 3, 3, 0, 0,
98, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 15, 0, 0, 0,
95, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0,
3, 0, 0, 0, 2, 0,
0, 0, 15, 15, 0, 0,
80, 79, 83, 73, 84, 73,
79, 78, 0, 84, 69, 88,
67, 79, 79, 82, 68, 0,
67, 79, 76, 79, 82, 0,
79, 83, 71, 78, 108, 0,
0, 0, 3, 0, 0, 0,
8, 0, 0, 0, 80, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 3, 0,
0, 0, 0, 0, 0, 0,
3, 12, 0, 0, 89, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 3, 0,
0, 0, 1, 0, 0, 0,
15, 0, 0, 0, 95, 0,
0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 3, 0,
0, 0, 2, 0, 0, 0,
15, 0, 0, 0, 84, 69,
88, 67, 79, 79, 82, 68,
0, 67, 79, 76, 79, 82,
0, 83, 86, 95, 80, 111,
115, 105, 116, 105, 111, 110,
0, 171, 83, 72, 69, 88,
40, 1, 0, 0, 81, 0,
1, 0, 74, 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, 95, 0, 0, 3,
50, 16, 16, 0, 0, 0,
0, 0, 95, 0, 0, 3,
50, 16, 16, 0, 1, 0,
0, 0, 95, 0, 0, 3,
242, 16, 16, 0, 2, 0,
0, 0, 101, 0, 0, 3,
50, 32, 16, 0, 0, 0,
0, 0, 101, 0, 0, 3,
242, 32, 16, 0, 1, 0,
0, 0, 103, 0, 0, 4,
242, 32, 16, 0, 2, 0,
0, 0, 1, 0, 0, 0,
104, 0, 0, 2, 1, 0,
0, 0, 56, 0, 0, 9,
50, 0, 16, 0, 0, 0,
0, 0, 70, 16, 16, 0,
0, 0, 0, 0, 70, 128,
0, 0, 15, 0, 0, 0,
84, 69, 88, 67, 79, 79,
82, 68, 0, 67, 79, 76,
79, 82, 0, 83, 86, 95,
80, 111, 115, 105, 116, 105,
111, 110, 0, 171, 83, 72,
69, 88, 40, 1, 0, 0,
81, 0, 1, 0, 74, 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, 50, 0, 0, 15,
50, 32, 16, 0, 2, 0,
0, 0, 70, 0, 16, 0,
0, 0, 0, 0, 2, 64,
0, 0, 0, 0, 0, 64,
0, 0, 0, 192, 0, 0,
0, 0, 0, 0, 0, 0,
2, 64, 0, 0, 0, 0,
128, 191, 0, 0, 128, 63,
0, 0, 0, 0, 0, 0,
0, 0, 54, 0, 0, 5,
242, 32, 16, 0, 1, 0,
0, 0, 70, 30, 16, 0,
2, 0, 0, 0, 54, 0,
0, 8, 194, 32, 16, 0,
2, 0, 0, 0, 2, 64,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 128, 63,
54, 0, 0, 5, 50, 32,
0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 95, 0,
0, 3, 50, 16, 16, 0,
0, 0, 0, 0, 95, 0,
0, 3, 50, 16, 16, 0,
1, 0, 0, 0, 95, 0,
0, 3, 242, 16, 16, 0,
2, 0, 0, 0, 101, 0,
0, 3, 50, 32, 16, 0,
0, 0, 0, 0, 101, 0,
0, 3, 242, 32, 16, 0,
1, 0, 0, 0, 103, 0,
0, 4, 242, 32, 16, 0,
2, 0, 0, 0, 1, 0,
0, 0, 104, 0, 0, 2,
1, 0, 0, 0, 56, 0,
0, 9, 50, 0, 16, 0,
0, 0, 0, 0, 70, 16,
16, 0, 0, 0, 0, 0,
70, 16, 16, 0, 1, 0,
0, 0, 62, 0, 0, 1,
83, 84, 65, 84, 148, 0,
0, 0, 6, 0, 0, 0,
1, 0, 0, 0, 0, 0,
0, 0, 6, 0, 0, 0,
2, 0, 0, 0, 0, 0,
70, 128, 48, 0, 0, 0,
0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 50, 0,
0, 15, 50, 32, 16, 0,
2, 0, 0, 0, 70, 0,
16, 0, 0, 0, 0, 0,
2, 64, 0, 0, 0, 0,
0, 64, 0, 0, 0, 192,
0, 0, 0, 0, 0, 0,
0, 0, 2, 64, 0, 0,
0, 0, 128, 191, 0, 0,
128, 63, 0, 0, 0, 0,
0, 0, 0, 0, 54, 0,
0, 5, 242, 32, 16, 0,
1, 0, 0, 0, 70, 30,
16, 0, 2, 0, 0, 0,
54, 0, 0, 8, 194, 32,
16, 0, 2, 0, 0, 0,
2, 64, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
128, 63, 54, 0, 0, 5,
50, 32, 16, 0, 0, 0,
0, 0, 70, 16, 16, 0,
1, 0, 0, 0, 62, 0,
0, 1, 83, 84, 65, 84,
148, 0, 0, 0, 6, 0,
0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 6, 0,
0, 0, 2, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
@@ -221,7 +220,7 @@ const BYTE immediate_vs[] =
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, 3, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
@@ -232,5 +231,6 @@ const BYTE immediate_vs[] =
0, 0, 0, 0, 0, 0,
0, 0, 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 one or more lines are too long

View File

@@ -2,23 +2,37 @@
#if 0
; SPIR-V
; Version: 1.0
; Generator: Khronos Glslang Reference Front End; 10
; Generator: Khronos Glslang Reference Front End; 11
; Bound: 24950
; Schema: 0
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %5663 "main" %gl_FragCoord %5312
OpExecutionMode %5663 OriginUpperLeft
OpEntryPoint Fragment %main "main" %gl_FragCoord %xe_bilinear_color
OpExecutionMode %main OriginUpperLeft
OpSource GLSL 460
OpSourceExtension "GL_EXT_control_flow_attributes"
OpSourceExtension "GL_EXT_samplerless_texture_functions"
OpSourceExtension "GL_GOOGLE_cpp_style_line_directive"
OpSourceExtension "GL_GOOGLE_include_directive"
OpName %main "main"
OpName %gl_FragCoord "gl_FragCoord"
OpName %push_const_block_xe "push_const_block_xe"
OpMemberName %push_const_block_xe 0 "xe_bilinear_output_offset"
OpMemberName %push_const_block_xe 1 "xe_bilinear_output_size_inv"
OpName %push_consts_xe "push_consts_xe"
OpName %xe_bilinear_source "xe_bilinear_source"
OpName %xe_bilinear_sampler "xe_bilinear_sampler"
OpName %xe_bilinear_color "xe_bilinear_color"
OpDecorate %gl_FragCoord BuiltIn FragCoord
OpMemberDecorate %_struct_1028 0 Offset 16
OpMemberDecorate %_struct_1028 1 Offset 24
OpDecorate %_struct_1028 Block
OpDecorate %4448 DescriptorSet 0
OpDecorate %4448 Binding 0
OpDecorate %4927 DescriptorSet 0
OpDecorate %4927 Binding 1
OpDecorate %5312 Location 0
OpDecorate %push_const_block_xe Block
OpMemberDecorate %push_const_block_xe 0 Offset 16
OpMemberDecorate %push_const_block_xe 1 Offset 24
OpDecorate %xe_bilinear_source Binding 0
OpDecorate %xe_bilinear_source DescriptorSet 0
OpDecorate %xe_bilinear_sampler Binding 1
OpDecorate %xe_bilinear_sampler DescriptorSet 0
OpDecorate %xe_bilinear_color Location 0
%void = OpTypeVoid
%1282 = OpTypeFunction %void
%uint = OpTypeInt 32 0
@@ -30,17 +44,17 @@
%v2float = OpTypeVector %float 2
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
%_struct_1028 = OpTypeStruct %v2int %v2float
%_ptr_PushConstant__struct_1028 = OpTypePointer PushConstant %_struct_1028
%4495 = OpVariable %_ptr_PushConstant__struct_1028 PushConstant
%push_const_block_xe = OpTypeStruct %v2int %v2float
%_ptr_PushConstant_push_const_block_xe = OpTypePointer PushConstant %push_const_block_xe
%push_consts_xe = OpVariable %_ptr_PushConstant_push_const_block_xe PushConstant
%int_0 = OpConstant %int 0
%_ptr_PushConstant_v2int = OpTypePointer PushConstant %v2int
%150 = OpTypeImage %float 2D 0 0 0 1 Unknown
%_ptr_UniformConstant_150 = OpTypePointer UniformConstant %150
%4448 = OpVariable %_ptr_UniformConstant_150 UniformConstant
%xe_bilinear_source = OpVariable %_ptr_UniformConstant_150 UniformConstant
%508 = OpTypeSampler
%_ptr_UniformConstant_508 = OpTypePointer UniformConstant %508
%4927 = OpVariable %_ptr_UniformConstant_508 UniformConstant
%xe_bilinear_sampler = OpVariable %_ptr_UniformConstant_508 UniformConstant
%510 = OpTypeSampledImage %150
%float_0_5 = OpConstant %float 0.5
%int_1 = OpConstant %int 1
@@ -48,91 +62,101 @@
%float_0 = OpConstant %float 0
%float_1 = OpConstant %float 1
%_ptr_Output_v4float = OpTypePointer Output %v4float
%5312 = OpVariable %_ptr_Output_v4float Output
%10264 = OpUndef %v4float
%xe_bilinear_color = OpVariable %_ptr_Output_v4float Output
%1566 = OpConstantComposite %v2float %float_0_5 %float_0_5
%5663 = OpFunction %void None %1282
%main = OpFunction %void None %1282
%24949 = OpLabel
%18571 = OpLoad %v4float %gl_FragCoord
%14008 = OpVectorShuffle %v2float %18571 %18571 0 1
%17656 = OpConvertFToS %v2int %14008
%19279 = OpAccessChain %_ptr_PushConstant_v2int %4495 %int_0
%19279 = OpAccessChain %_ptr_PushConstant_v2int %push_consts_xe %int_0
%22822 = OpLoad %v2int %19279
%23236 = OpISub %v2int %17656 %22822
%10630 = OpBitcast %v2uint %23236
%14905 = OpLoad %150 %4448
%16965 = OpLoad %508 %4927
%14905 = OpLoad %150 %xe_bilinear_source
%16965 = OpLoad %508 %xe_bilinear_sampler
%8907 = OpSampledImage %510 %14905 %16965
%13759 = OpConvertUToF %v2float %10630
%15917 = OpFAdd %v2float %13759 %1566
%11863 = OpAccessChain %_ptr_PushConstant_v2float %4495 %int_1
%11863 = OpAccessChain %_ptr_PushConstant_v2float %push_consts_xe %int_1
%20800 = OpLoad %v2float %11863
%24336 = OpFMul %v2float %15917 %20800
%9248 = OpImageSampleExplicitLod %v4float %8907 %24336 Lod %float_0
%21554 = OpCompositeExtract %float %9248 0
%14517 = OpCompositeInsert %v4float %21554 %10264 0
%19852 = OpCompositeExtract %float %9248 1
%16135 = OpCompositeInsert %v4float %19852 %14517 1
%19871 = OpCompositeExtract %float %9248 2
%15582 = OpCompositeInsert %v4float %19871 %16135 2
%18387 = OpCompositeInsert %v4float %float_1 %15582 3
OpStore %5312 %18387
%9229 = OpImageSampleExplicitLod %v4float %8907 %24336 Lod %float_0
%21727 = OpCompositeExtract %float %9229 0
%22672 = OpCompositeExtract %float %9229 1
%7472 = OpCompositeExtract %float %9229 2
%22408 = OpCompositeConstruct %v4float %21727 %22672 %7472 %float_1
OpStore %xe_bilinear_color %22408
OpReturn
OpFunctionEnd
#endif
const uint32_t guest_output_bilinear_ps[] = {
0x07230203, 0x00010000, 0x0008000A, 0x00006176, 0x00000000, 0x00020011,
0x07230203, 0x00010000, 0x0008000B, 0x00006176, 0x00000000, 0x00020011,
0x00000001, 0x0006000B, 0x00000001, 0x4C534C47, 0x6474732E, 0x3035342E,
0x00000000, 0x0003000E, 0x00000000, 0x00000001, 0x0007000F, 0x00000004,
0x0000161F, 0x6E69616D, 0x00000000, 0x00000C93, 0x000014C0, 0x00030010,
0x0000161F, 0x00000007, 0x00040047, 0x00000C93, 0x0000000B, 0x0000000F,
0x0000161F, 0x00000007, 0x00030003, 0x00000002, 0x000001CC, 0x00090004,
0x455F4C47, 0x635F5458, 0x72746E6F, 0x665F6C6F, 0x5F776F6C, 0x72747461,
0x74756269, 0x00007365, 0x000B0004, 0x455F4C47, 0x735F5458, 0x6C706D61,
0x656C7265, 0x745F7373, 0x75747865, 0x665F6572, 0x74636E75, 0x736E6F69,
0x00000000, 0x000A0004, 0x475F4C47, 0x4C474F4F, 0x70635F45, 0x74735F70,
0x5F656C79, 0x656E696C, 0x7269645F, 0x69746365, 0x00006576, 0x00080004,
0x475F4C47, 0x4C474F4F, 0x6E695F45, 0x64756C63, 0x69645F65, 0x74636572,
0x00657669, 0x00040005, 0x0000161F, 0x6E69616D, 0x00000000, 0x00060005,
0x00000C93, 0x465F6C67, 0x43676172, 0x64726F6F, 0x00000000, 0x00070005,
0x00000404, 0x68737570, 0x6E6F635F, 0x625F7473, 0x6B636F6C, 0x0065785F,
0x000A0006, 0x00000404, 0x00000000, 0x625F6578, 0x6E696C69, 0x5F726165,
0x7074756F, 0x6F5F7475, 0x65736666, 0x00000074, 0x000A0006, 0x00000404,
0x00000001, 0x625F6578, 0x6E696C69, 0x5F726165, 0x7074756F, 0x735F7475,
0x5F657A69, 0x00766E69, 0x00060005, 0x00000CE9, 0x68737570, 0x6E6F635F,
0x5F737473, 0x00006578, 0x00070005, 0x00001160, 0x625F6578, 0x6E696C69,
0x5F726165, 0x72756F73, 0x00006563, 0x00070005, 0x0000133F, 0x625F6578,
0x6E696C69, 0x5F726165, 0x706D6173, 0x0072656C, 0x00070005, 0x000014C0,
0x625F6578, 0x6E696C69, 0x5F726165, 0x6F6C6F63, 0x00000072, 0x00040047,
0x00000C93, 0x0000000B, 0x0000000F, 0x00030047, 0x00000404, 0x00000002,
0x00050048, 0x00000404, 0x00000000, 0x00000023, 0x00000010, 0x00050048,
0x00000404, 0x00000001, 0x00000023, 0x00000018, 0x00030047, 0x00000404,
0x00000002, 0x00040047, 0x00001160, 0x00000022, 0x00000000, 0x00040047,
0x00001160, 0x00000021, 0x00000000, 0x00040047, 0x0000133F, 0x00000022,
0x00000000, 0x00040047, 0x0000133F, 0x00000021, 0x00000001, 0x00040047,
0x000014C0, 0x0000001E, 0x00000000, 0x00020013, 0x00000008, 0x00030021,
0x00000502, 0x00000008, 0x00040015, 0x0000000B, 0x00000020, 0x00000000,
0x00040017, 0x00000011, 0x0000000B, 0x00000002, 0x00030016, 0x0000000D,
0x00000020, 0x00040017, 0x0000001D, 0x0000000D, 0x00000004, 0x00040020,
0x0000029A, 0x00000001, 0x0000001D, 0x0004003B, 0x0000029A, 0x00000C93,
0x00000001, 0x00040017, 0x00000013, 0x0000000D, 0x00000002, 0x00040015,
0x0000000C, 0x00000020, 0x00000001, 0x00040017, 0x00000012, 0x0000000C,
0x00000002, 0x0004001E, 0x00000404, 0x00000012, 0x00000013, 0x00040020,
0x00000681, 0x00000009, 0x00000404, 0x0004003B, 0x00000681, 0x0000118F,
0x00000009, 0x0004002B, 0x0000000C, 0x00000A0B, 0x00000000, 0x00040020,
0x0000028F, 0x00000009, 0x00000012, 0x00090019, 0x00000096, 0x0000000D,
0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000,
0x00040020, 0x00000313, 0x00000000, 0x00000096, 0x0004003B, 0x00000313,
0x00001160, 0x00000000, 0x0002001A, 0x000001FC, 0x00040020, 0x00000479,
0x00000000, 0x000001FC, 0x0004003B, 0x00000479, 0x0000133F, 0x00000000,
0x0003001B, 0x000001FE, 0x00000096, 0x0004002B, 0x0000000D, 0x000000FC,
0x3F000000, 0x0004002B, 0x0000000C, 0x00000A0E, 0x00000001, 0x00040020,
0x00000290, 0x00000009, 0x00000013, 0x0004002B, 0x0000000D, 0x00000A0C,
0x00000000, 0x0004002B, 0x0000000D, 0x0000008A, 0x3F800000, 0x00040020,
0x0000029B, 0x00000003, 0x0000001D, 0x0004003B, 0x0000029B, 0x000014C0,
0x00000003, 0x00030001, 0x0000001D, 0x00002818, 0x0005002C, 0x00000013,
0x00000404, 0x00000001, 0x00000023, 0x00000018, 0x00040047, 0x00001160,
0x00000021, 0x00000000, 0x00040047, 0x00001160, 0x00000022, 0x00000000,
0x00040047, 0x0000133F, 0x00000021, 0x00000001, 0x00040047, 0x0000133F,
0x00000022, 0x00000000, 0x00040047, 0x000014C0, 0x0000001E, 0x00000000,
0x00020013, 0x00000008, 0x00030021, 0x00000502, 0x00000008, 0x00040015,
0x0000000B, 0x00000020, 0x00000000, 0x00040017, 0x00000011, 0x0000000B,
0x00000002, 0x00030016, 0x0000000D, 0x00000020, 0x00040017, 0x0000001D,
0x0000000D, 0x00000004, 0x00040020, 0x0000029A, 0x00000001, 0x0000001D,
0x0004003B, 0x0000029A, 0x00000C93, 0x00000001, 0x00040017, 0x00000013,
0x0000000D, 0x00000002, 0x00040015, 0x0000000C, 0x00000020, 0x00000001,
0x00040017, 0x00000012, 0x0000000C, 0x00000002, 0x0004001E, 0x00000404,
0x00000012, 0x00000013, 0x00040020, 0x00000681, 0x00000009, 0x00000404,
0x0004003B, 0x00000681, 0x00000CE9, 0x00000009, 0x0004002B, 0x0000000C,
0x00000A0B, 0x00000000, 0x00040020, 0x0000028F, 0x00000009, 0x00000012,
0x00090019, 0x00000096, 0x0000000D, 0x00000001, 0x00000000, 0x00000000,
0x00000000, 0x00000001, 0x00000000, 0x00040020, 0x00000313, 0x00000000,
0x00000096, 0x0004003B, 0x00000313, 0x00001160, 0x00000000, 0x0002001A,
0x000001FC, 0x00040020, 0x00000479, 0x00000000, 0x000001FC, 0x0004003B,
0x00000479, 0x0000133F, 0x00000000, 0x0003001B, 0x000001FE, 0x00000096,
0x0004002B, 0x0000000D, 0x000000FC, 0x3F000000, 0x0004002B, 0x0000000C,
0x00000A0E, 0x00000001, 0x00040020, 0x00000290, 0x00000009, 0x00000013,
0x0004002B, 0x0000000D, 0x00000A0C, 0x00000000, 0x0004002B, 0x0000000D,
0x0000008A, 0x3F800000, 0x00040020, 0x0000029B, 0x00000003, 0x0000001D,
0x0004003B, 0x0000029B, 0x000014C0, 0x00000003, 0x0005002C, 0x00000013,
0x0000061E, 0x000000FC, 0x000000FC, 0x00050036, 0x00000008, 0x0000161F,
0x00000000, 0x00000502, 0x000200F8, 0x00006175, 0x0004003D, 0x0000001D,
0x0000488B, 0x00000C93, 0x0007004F, 0x00000013, 0x000036B8, 0x0000488B,
0x0000488B, 0x00000000, 0x00000001, 0x0004006E, 0x00000012, 0x000044F8,
0x000036B8, 0x00050041, 0x0000028F, 0x00004B4F, 0x0000118F, 0x00000A0B,
0x000036B8, 0x00050041, 0x0000028F, 0x00004B4F, 0x00000CE9, 0x00000A0B,
0x0004003D, 0x00000012, 0x00005926, 0x00004B4F, 0x00050082, 0x00000012,
0x00005AC4, 0x000044F8, 0x00005926, 0x0004007C, 0x00000011, 0x00002986,
0x00005AC4, 0x0004003D, 0x00000096, 0x00003A39, 0x00001160, 0x0004003D,
0x000001FC, 0x00004245, 0x0000133F, 0x00050056, 0x000001FE, 0x000022CB,
0x00003A39, 0x00004245, 0x00040070, 0x00000013, 0x000035BF, 0x00002986,
0x00050081, 0x00000013, 0x00003E2D, 0x000035BF, 0x0000061E, 0x00050041,
0x00000290, 0x00002E57, 0x0000118F, 0x00000A0E, 0x0004003D, 0x00000013,
0x00000290, 0x00002E57, 0x00000CE9, 0x00000A0E, 0x0004003D, 0x00000013,
0x00005140, 0x00002E57, 0x00050085, 0x00000013, 0x00005F10, 0x00003E2D,
0x00005140, 0x00070058, 0x0000001D, 0x00002420, 0x000022CB, 0x00005F10,
0x00000002, 0x00000A0C, 0x00050051, 0x0000000D, 0x00005432, 0x00002420,
0x00000000, 0x00060052, 0x0000001D, 0x000038B5, 0x00005432, 0x00002818,
0x00000000, 0x00050051, 0x0000000D, 0x00004D8C, 0x00002420, 0x00000001,
0x00060052, 0x0000001D, 0x00003F07, 0x00004D8C, 0x000038B5, 0x00000001,
0x00050051, 0x0000000D, 0x00004D9F, 0x00002420, 0x00000002, 0x00060052,
0x0000001D, 0x00003CDE, 0x00004D9F, 0x00003F07, 0x00000002, 0x00060052,
0x0000001D, 0x000047D3, 0x0000008A, 0x00003CDE, 0x00000003, 0x0003003E,
0x000014C0, 0x000047D3, 0x000100FD, 0x00010038,
0x00005140, 0x00070058, 0x0000001D, 0x0000240D, 0x000022CB, 0x00005F10,
0x00000002, 0x00000A0C, 0x00050051, 0x0000000D, 0x000054DF, 0x0000240D,
0x00000000, 0x00050051, 0x0000000D, 0x00005890, 0x0000240D, 0x00000001,
0x00050051, 0x0000000D, 0x00001D30, 0x0000240D, 0x00000002, 0x00070050,
0x0000001D, 0x00005788, 0x000054DF, 0x00005890, 0x00001D30, 0x0000008A,
0x0003003E, 0x000014C0, 0x00005788, 0x000100FD, 0x00010038,
};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -2,21 +2,34 @@
#if 0
; SPIR-V
; Version: 1.0
; Generator: Khronos Glslang Reference Front End; 10
; Generator: Khronos Glslang Reference Front End; 11
; Bound: 24950
; Schema: 0
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %5663 "main" %gl_FragCoord %5334
OpExecutionMode %5663 OriginUpperLeft
OpEntryPoint Fragment %main "main" %gl_FragCoord %xe_cas_color
OpExecutionMode %main OriginUpperLeft
OpSource GLSL 460
OpSourceExtension "GL_EXT_control_flow_attributes"
OpSourceExtension "GL_EXT_samplerless_texture_functions"
OpSourceExtension "GL_GOOGLE_cpp_style_line_directive"
OpSourceExtension "GL_GOOGLE_include_directive"
OpName %main "main"
OpName %gl_FragCoord "gl_FragCoord"
OpName %push_const_block_xe "push_const_block_xe"
OpMemberName %push_const_block_xe 0 "xe_cas_output_offset"
OpMemberName %push_const_block_xe 1 "xe_cas_sharpness_post_setup"
OpName %push_consts_xe "push_consts_xe"
OpName %xe_cas_color "xe_cas_color"
OpName %xe_cas_source "xe_cas_source"
OpDecorate %gl_FragCoord BuiltIn FragCoord
OpMemberDecorate %_struct_1010 0 Offset 16
OpMemberDecorate %_struct_1010 1 Offset 24
OpDecorate %_struct_1010 Block
OpDecorate %5334 Location 0
OpDecorate %5163 DescriptorSet 0
OpDecorate %5163 Binding 0
OpDecorate %push_const_block_xe Block
OpMemberDecorate %push_const_block_xe 0 Offset 16
OpMemberDecorate %push_const_block_xe 1 Offset 24
OpDecorate %xe_cas_color Location 0
OpDecorate %xe_cas_source Binding 0
OpDecorate %xe_cas_source DescriptorSet 0
%void = OpTypeVoid
%1282 = OpTypeFunction %void
%float = OpTypeFloat 32
@@ -29,9 +42,9 @@
%_ptr_Input_v4float = OpTypePointer Input %v4float
%gl_FragCoord = OpVariable %_ptr_Input_v4float Input
%v2float = OpTypeVector %float 2
%_struct_1010 = OpTypeStruct %v2int %float
%_ptr_PushConstant__struct_1010 = OpTypePointer PushConstant %_struct_1010
%4495 = OpVariable %_ptr_PushConstant__struct_1010 PushConstant
%push_const_block_xe = OpTypeStruct %v2int %float
%_ptr_PushConstant_push_const_block_xe = OpTypePointer PushConstant %push_const_block_xe
%push_consts_xe = OpVariable %_ptr_PushConstant_push_const_block_xe PushConstant
%int_0 = OpConstant %int 0
%_ptr_PushConstant_v2int = OpTypePointer PushConstant %v2int
%float_1 = OpConstant %float 1
@@ -40,71 +53,75 @@
%_ptr_PushConstant_float = OpTypePointer PushConstant %float
%uint_1 = OpConstant %uint 1
%_ptr_Output_v4float = OpTypePointer Output %v4float
%5334 = OpVariable %_ptr_Output_v4float Output
%xe_cas_color = OpVariable %_ptr_Output_v4float Output
%uint_532432441 = OpConstant %uint 532432441
%uint_2129690299 = OpConstant %uint 2129690299
%uint_2129764351 = OpConstant %uint 2129764351
%float_2 = OpConstant %float 2
%150 = OpTypeImage %float 2D 0 0 0 1 Unknown
%_ptr_UniformConstant_150 = OpTypePointer UniformConstant %150
%5163 = OpVariable %_ptr_UniformConstant_150 UniformConstant
%xe_cas_source = OpVariable %_ptr_UniformConstant_150 UniformConstant
%int_n1 = OpConstant %int -1
%1803 = OpConstantComposite %v2int %int_0 %int_n1
%1806 = OpConstantComposite %v2int %int_n1 %int_0
%1824 = OpConstantComposite %v2int %int_1 %int_0
%1827 = OpConstantComposite %v2int %int_0 %int_1
%float_4 = OpConstant %float 4
%10264 = OpUndef %v4float
%5663 = OpFunction %void None %1282
%2 = OpUndef %v4float
%main = OpFunction %void None %1282
%24949 = OpLabel
%18571 = OpLoad %v4float %gl_FragCoord
%14008 = OpVectorShuffle %v2float %18571 %18571 0 1
%17656 = OpConvertFToS %v2int %14008
%19279 = OpAccessChain %_ptr_PushConstant_v2int %4495 %int_0
%19279 = OpAccessChain %_ptr_PushConstant_v2int %push_consts_xe %int_0
%22822 = OpLoad %v2int %19279
%23312 = OpISub %v2int %17656 %22822
%9938 = OpBitcast %v2uint %23312
%20997 = OpAccessChain %_ptr_PushConstant_float %4495 %int_1
%20997 = OpAccessChain %_ptr_PushConstant_float %push_consts_xe %int_1
%22237 = OpLoad %float %20997
%16454 = OpBitcast %uint %22237
%6990 = OpBitcast %v2int %9938
%14365 = OpIAdd %v2int %6990 %1803
%23057 = OpLoad %150 %5163
%20105 = OpImageFetch %v4float %23057 %14365 Lod %int_0
%7465 = OpIAdd %v2int %6990 %1806
%23314 = OpImageFetch %v4float %23057 %7465 Lod %int_0
%17196 = OpImageFetch %v4float %23057 %6990 Lod %int_0
%16142 = OpIAdd %v2int %6990 %1824
%16978 = OpImageFetch %v4float %23057 %16142 Lod %int_0
%19264 = OpIAdd %v2int %6990 %1827
%24843 = OpImageFetch %v4float %23057 %19264 Lod %int_0
%6266 = OpCompositeExtract %float %20105 0
%7025 = OpCompositeExtract %float %20105 1
%18723 = OpCompositeExtract %float %20105 2
%24863 = OpFMul %float %6266 %6266
%23057 = OpLoad %150 %xe_cas_source
%19459 = OpImageFetch %v4float %23057 %14365 Lod %int_0
%13347 = OpIAdd %v2int %6990 %1806
%14538 = OpLoad %150 %xe_cas_source
%12625 = OpImageFetch %v4float %14538 %13347 Lod %int_0
%10421 = OpLoad %150 %xe_cas_source
%15444 = OpImageFetch %v4float %10421 %6990 Lod %int_0
%13348 = OpIAdd %v2int %6990 %1824
%15811 = OpLoad %150 %xe_cas_source
%19460 = OpImageFetch %v4float %15811 %13348 Lod %int_0
%13349 = OpIAdd %v2int %6990 %1827
%14918 = OpLoad %150 %xe_cas_source
%8899 = OpImageFetch %v4float %14918 %13349 Lod %int_0
%19729 = OpCompositeExtract %float %19459 0
%7025 = OpCompositeExtract %float %19459 1
%18723 = OpCompositeExtract %float %19459 2
%24863 = OpFMul %float %19729 %19729
%16184 = OpFMul %float %7025 %7025
%9305 = OpFMul %float %18723 %18723
%22236 = OpCompositeExtract %float %23314 0
%11844 = OpCompositeExtract %float %23314 1
%18724 = OpCompositeExtract %float %23314 2
%22236 = OpCompositeExtract %float %12625 0
%11844 = OpCompositeExtract %float %12625 1
%18724 = OpCompositeExtract %float %12625 2
%24864 = OpFMul %float %22236 %22236
%16185 = OpFMul %float %11844 %11844
%9306 = OpFMul %float %18724 %18724
%22238 = OpCompositeExtract %float %17196 0
%11845 = OpCompositeExtract %float %17196 1
%18725 = OpCompositeExtract %float %17196 2
%22238 = OpCompositeExtract %float %15444 0
%11845 = OpCompositeExtract %float %15444 1
%18725 = OpCompositeExtract %float %15444 2
%24865 = OpFMul %float %22238 %22238
%16186 = OpFMul %float %11845 %11845
%9307 = OpFMul %float %18725 %18725
%22239 = OpCompositeExtract %float %16978 0
%11846 = OpCompositeExtract %float %16978 1
%18726 = OpCompositeExtract %float %16978 2
%22239 = OpCompositeExtract %float %19460 0
%11846 = OpCompositeExtract %float %19460 1
%18726 = OpCompositeExtract %float %19460 2
%24866 = OpFMul %float %22239 %22239
%16187 = OpFMul %float %11846 %11846
%9308 = OpFMul %float %18726 %18726
%22240 = OpCompositeExtract %float %24843 0
%11847 = OpCompositeExtract %float %24843 1
%18727 = OpCompositeExtract %float %24843 2
%22240 = OpCompositeExtract %float %8899 0
%11847 = OpCompositeExtract %float %8899 1
%18727 = OpCompositeExtract %float %8899 2
%24867 = OpFMul %float %22240 %22240
%14910 = OpFMul %float %11847 %11847
%8590 = OpFMul %float %18727 %18727
@@ -159,161 +176,173 @@
%15975 = OpFAdd %float %12675 %9307
%7244 = OpFMul %float %15975 %9366
%22380 = OpExtInst %float %1 FClamp %7244 %float_0 %float_1
%24270 = OpCompositeInsert %v4float %15142 %10264 0
%24270 = OpCompositeInsert %v4float %15142 %2 0
%11074 = OpCompositeInsert %v4float %15143 %24270 1
%14933 = OpCompositeInsert %v4float %22380 %11074 2
%12955 = OpVectorShuffle %v3float %14933 %14933 0 1 2
%6471 = OpExtInst %v3float %1 Sqrt %12955
%22742 = OpCompositeExtract %float %6471 0
%19769 = OpCompositeInsert %v4float %22742 %14933 0
%19852 = OpCompositeExtract %float %6471 1
%16135 = OpCompositeInsert %v4float %19852 %19769 1
%19871 = OpCompositeExtract %float %6471 2
%15582 = OpCompositeInsert %v4float %19871 %16135 2
%18387 = OpCompositeInsert %v4float %float_1 %15582 3
OpStore %5334 %18387
%6452 = OpExtInst %v3float %1 Sqrt %12955
%22915 = OpCompositeExtract %float %6452 0
%8853 = OpCompositeExtract %float %6452 1
%7472 = OpCompositeExtract %float %6452 2
%22408 = OpCompositeConstruct %v4float %22915 %8853 %7472 %float_1
OpStore %xe_cas_color %22408
OpReturn
OpFunctionEnd
#endif
const uint32_t guest_output_ffx_cas_sharpen_ps[] = {
0x07230203, 0x00010000, 0x0008000A, 0x00006176, 0x00000000, 0x00020011,
0x07230203, 0x00010000, 0x0008000B, 0x00006176, 0x00000000, 0x00020011,
0x00000001, 0x0006000B, 0x00000001, 0x4C534C47, 0x6474732E, 0x3035342E,
0x00000000, 0x0003000E, 0x00000000, 0x00000001, 0x0007000F, 0x00000004,
0x0000161F, 0x6E69616D, 0x00000000, 0x00000C93, 0x000014D6, 0x00030010,
0x0000161F, 0x00000007, 0x00040047, 0x00000C93, 0x0000000B, 0x0000000F,
0x00050048, 0x000003F2, 0x00000000, 0x00000023, 0x00000010, 0x00050048,
0x000003F2, 0x00000001, 0x00000023, 0x00000018, 0x00030047, 0x000003F2,
0x00000002, 0x00040047, 0x000014D6, 0x0000001E, 0x00000000, 0x00040047,
0x0000142B, 0x00000022, 0x00000000, 0x00040047, 0x0000142B, 0x00000021,
0x00000000, 0x00020013, 0x00000008, 0x00030021, 0x00000502, 0x00000008,
0x00030016, 0x0000000D, 0x00000020, 0x00040015, 0x0000000B, 0x00000020,
0x00000000, 0x00040015, 0x0000000C, 0x00000020, 0x00000001, 0x00040017,
0x00000012, 0x0000000C, 0x00000002, 0x00040017, 0x00000018, 0x0000000D,
0x00000003, 0x00040017, 0x00000011, 0x0000000B, 0x00000002, 0x00040017,
0x0000001D, 0x0000000D, 0x00000004, 0x00040020, 0x0000029A, 0x00000001,
0x0000001D, 0x0004003B, 0x0000029A, 0x00000C93, 0x00000001, 0x00040017,
0x00000013, 0x0000000D, 0x00000002, 0x0004001E, 0x000003F2, 0x00000012,
0x0000000D, 0x00040020, 0x0000066F, 0x00000009, 0x000003F2, 0x0004003B,
0x0000066F, 0x0000118F, 0x00000009, 0x0004002B, 0x0000000C, 0x00000A0B,
0x00000000, 0x00040020, 0x0000028F, 0x00000009, 0x00000012, 0x0004002B,
0x0000000D, 0x0000008A, 0x3F800000, 0x0004002B, 0x0000000D, 0x00000A0C,
0x00000000, 0x0004002B, 0x0000000C, 0x00000A0E, 0x00000001, 0x00040020,
0x0000028A, 0x00000009, 0x0000000D, 0x0004002B, 0x0000000B, 0x00000A0D,
0x00000001, 0x00040020, 0x0000029B, 0x00000003, 0x0000001D, 0x0004003B,
0x0000029B, 0x000014D6, 0x00000003, 0x0004002B, 0x0000000B, 0x0000020D,
0x1FBC4639, 0x0004002B, 0x0000000B, 0x00000344, 0x7EF07EBB, 0x0004002B,
0x0000000B, 0x000000B2, 0x7EF19FFF, 0x0004002B, 0x0000000D, 0x00000019,
0x40000000, 0x00090019, 0x00000096, 0x0000000D, 0x00000001, 0x00000000,
0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00040020, 0x00000313,
0x00000000, 0x00000096, 0x0004003B, 0x00000313, 0x0000142B, 0x00000000,
0x0004002B, 0x0000000C, 0x00000A08, 0xFFFFFFFF, 0x0005002C, 0x00000012,
0x0000070B, 0x00000A0B, 0x00000A08, 0x0005002C, 0x00000012, 0x0000070E,
0x00000A08, 0x00000A0B, 0x0005002C, 0x00000012, 0x00000720, 0x00000A0E,
0x00000A0B, 0x0005002C, 0x00000012, 0x00000723, 0x00000A0B, 0x00000A0E,
0x0004002B, 0x0000000D, 0x00000B69, 0x40800000, 0x00030001, 0x0000001D,
0x00002818, 0x00050036, 0x00000008, 0x0000161F, 0x00000000, 0x00000502,
0x000200F8, 0x00006175, 0x0004003D, 0x0000001D, 0x0000488B, 0x00000C93,
0x0007004F, 0x00000013, 0x000036B8, 0x0000488B, 0x0000488B, 0x00000000,
0x00000001, 0x0004006E, 0x00000012, 0x000044F8, 0x000036B8, 0x00050041,
0x0000028F, 0x00004B4F, 0x0000118F, 0x00000A0B, 0x0004003D, 0x00000012,
0x00005926, 0x00004B4F, 0x00050082, 0x00000012, 0x00005B10, 0x000044F8,
0x00005926, 0x0004007C, 0x00000011, 0x000026D2, 0x00005B10, 0x00050041,
0x0000028A, 0x00005205, 0x0000118F, 0x00000A0E, 0x0004003D, 0x0000000D,
0x000056DD, 0x00005205, 0x0004007C, 0x0000000B, 0x00004046, 0x000056DD,
0x0004007C, 0x00000012, 0x00001B4E, 0x000026D2, 0x00050080, 0x00000012,
0x0000381D, 0x00001B4E, 0x0000070B, 0x0004003D, 0x00000096, 0x00005A11,
0x0000142B, 0x0007005F, 0x0000001D, 0x00004E89, 0x00005A11, 0x0000381D,
0x00000002, 0x00000A0B, 0x00050080, 0x00000012, 0x00001D29, 0x00001B4E,
0x0000070E, 0x0007005F, 0x0000001D, 0x00005B12, 0x00005A11, 0x00001D29,
0x00000002, 0x00000A0B, 0x0007005F, 0x0000001D, 0x0000432C, 0x00005A11,
0x00001B4E, 0x00000002, 0x00000A0B, 0x00050080, 0x00000012, 0x00003F0E,
0x00001B4E, 0x00000720, 0x0007005F, 0x0000001D, 0x00004252, 0x00005A11,
0x00003F0E, 0x00000002, 0x00000A0B, 0x00050080, 0x00000012, 0x00004B40,
0x00001B4E, 0x00000723, 0x0007005F, 0x0000001D, 0x0000610B, 0x00005A11,
0x00004B40, 0x00000002, 0x00000A0B, 0x00050051, 0x0000000D, 0x0000187A,
0x00004E89, 0x00000000, 0x00050051, 0x0000000D, 0x00001B71, 0x00004E89,
0x00000001, 0x00050051, 0x0000000D, 0x00004923, 0x00004E89, 0x00000002,
0x00050085, 0x0000000D, 0x0000611F, 0x0000187A, 0x0000187A, 0x00050085,
0x0000000D, 0x00003F38, 0x00001B71, 0x00001B71, 0x00050085, 0x0000000D,
0x00002459, 0x00004923, 0x00004923, 0x00050051, 0x0000000D, 0x000056DC,
0x00005B12, 0x00000000, 0x00050051, 0x0000000D, 0x00002E44, 0x00005B12,
0x00000001, 0x00050051, 0x0000000D, 0x00004924, 0x00005B12, 0x00000002,
0x00050085, 0x0000000D, 0x00006120, 0x000056DC, 0x000056DC, 0x00050085,
0x0000000D, 0x00003F39, 0x00002E44, 0x00002E44, 0x00050085, 0x0000000D,
0x0000245A, 0x00004924, 0x00004924, 0x00050051, 0x0000000D, 0x000056DE,
0x0000432C, 0x00000000, 0x00050051, 0x0000000D, 0x00002E45, 0x0000432C,
0x00000001, 0x00050051, 0x0000000D, 0x00004925, 0x0000432C, 0x00000002,
0x00050085, 0x0000000D, 0x00006121, 0x000056DE, 0x000056DE, 0x00050085,
0x0000000D, 0x00003F3A, 0x00002E45, 0x00002E45, 0x00050085, 0x0000000D,
0x0000245B, 0x00004925, 0x00004925, 0x00050051, 0x0000000D, 0x000056DF,
0x00004252, 0x00000000, 0x00050051, 0x0000000D, 0x00002E46, 0x00004252,
0x00000001, 0x00050051, 0x0000000D, 0x00004926, 0x00004252, 0x00000002,
0x00050085, 0x0000000D, 0x00006122, 0x000056DF, 0x000056DF, 0x00050085,
0x0000000D, 0x00003F3B, 0x00002E46, 0x00002E46, 0x00050085, 0x0000000D,
0x0000245C, 0x00004926, 0x00004926, 0x00050051, 0x0000000D, 0x000056E0,
0x0000610B, 0x00000000, 0x00050051, 0x0000000D, 0x00002E47, 0x0000610B,
0x00000001, 0x00050051, 0x0000000D, 0x00004927, 0x0000610B, 0x00000002,
0x00050085, 0x0000000D, 0x00006123, 0x000056E0, 0x000056E0, 0x00050085,
0x0000000D, 0x00003A3E, 0x00002E47, 0x00002E47, 0x00050085, 0x0000000D,
0x0000218E, 0x00004927, 0x00004927, 0x0007000C, 0x0000000D, 0x00002A7D,
0x00000001, 0x00000025, 0x00003F3A, 0x00003F3B, 0x0007000C, 0x0000000D,
0x0000243C, 0x00000001, 0x00000025, 0x00003F39, 0x00002A7D, 0x0007000C,
0x0000000D, 0x00003E4F, 0x00000001, 0x00000025, 0x00003F38, 0x00003A3E,
0x0007000C, 0x0000000D, 0x00002A99, 0x00000001, 0x00000025, 0x0000243C,
0x00003E4F, 0x0007000C, 0x0000000D, 0x00005EE8, 0x00000001, 0x00000028,
0x00003F3A, 0x00003F3B, 0x0007000C, 0x0000000D, 0x00004473, 0x00000001,
0x00000028, 0x00003F39, 0x00005EE8, 0x0007000C, 0x0000000D, 0x00005D83,
0x00000001, 0x00000028, 0x00003F38, 0x00003A3E, 0x0007000C, 0x0000000D,
0x0000526D, 0x00000001, 0x00000028, 0x00004473, 0x00005D83, 0x0004007C,
0x0000000B, 0x00001FF5, 0x0000526D, 0x00050082, 0x0000000B, 0x000022F7,
0x00000344, 0x00001FF5, 0x0004007C, 0x0000000D, 0x00001941, 0x000022F7,
0x00050083, 0x0000000D, 0x00005E43, 0x0000008A, 0x0000526D, 0x0007000C,
0x0000000D, 0x00005B1C, 0x00000001, 0x00000025, 0x00002A99, 0x00005E43,
0x00050085, 0x0000000D, 0x00005977, 0x00005B1C, 0x00001941, 0x0008000C,
0x0000000D, 0x000050CB, 0x00000001, 0x0000002B, 0x00005977, 0x00000A0C,
0x0000008A, 0x0004007C, 0x0000000B, 0x00005DCB, 0x000050CB, 0x000500C2,
0x0000000B, 0x0000564A, 0x00005DCB, 0x00000A0D, 0x00050080, 0x0000000B,
0x00005ABD, 0x0000564A, 0x0000020D, 0x0004007C, 0x0000000D, 0x000054BC,
0x00005ABD, 0x0004007C, 0x0000000D, 0x00004C66, 0x00004046, 0x00050085,
0x0000000D, 0x00004973, 0x000054BC, 0x00004C66, 0x00050085, 0x0000000D,
0x00005B14, 0x00000B69, 0x00004973, 0x00050081, 0x0000000D, 0x00004072,
0x0000008A, 0x00005B14, 0x0004007C, 0x0000000B, 0x00001997, 0x00004072,
0x00050082, 0x0000000B, 0x00001D8B, 0x000000B2, 0x00001997, 0x0004007C,
0x0000000D, 0x000024CB, 0x00001D8B, 0x0004007F, 0x0000000D, 0x000023AA,
0x000024CB, 0x00050085, 0x0000000D, 0x0000304F, 0x000023AA, 0x00004072,
0x00050081, 0x0000000D, 0x0000409C, 0x0000304F, 0x00000019, 0x00050085,
0x0000000D, 0x00002496, 0x000024CB, 0x0000409C, 0x00050081, 0x0000000D,
0x0000499D, 0x0000611F, 0x00006120, 0x00050081, 0x0000000D, 0x00005A67,
0x0000499D, 0x00006122, 0x00050081, 0x0000000D, 0x00001987, 0x00005A67,
0x00006123, 0x00050085, 0x0000000D, 0x00003181, 0x00004973, 0x00001987,
0x00050081, 0x0000000D, 0x00003E65, 0x00003181, 0x00006121, 0x00050085,
0x0000000D, 0x00001FC9, 0x00003E65, 0x00002496, 0x0008000C, 0x0000000D,
0x00003B26, 0x00000001, 0x0000002B, 0x00001FC9, 0x00000A0C, 0x0000008A,
0x00050081, 0x0000000D, 0x00003445, 0x00003F38, 0x00003F39, 0x00050081,
0x0000000D, 0x0000328F, 0x00003445, 0x00003F3B, 0x00050081, 0x0000000D,
0x00001988, 0x0000328F, 0x00003A3E, 0x00050085, 0x0000000D, 0x00003182,
0x00004973, 0x00001988, 0x00050081, 0x0000000D, 0x00003E66, 0x00003182,
0x00003F3A, 0x00050085, 0x0000000D, 0x00001FCA, 0x00003E66, 0x00002496,
0x0008000C, 0x0000000D, 0x00003B27, 0x00000001, 0x0000002B, 0x00001FCA,
0x00000A0C, 0x0000008A, 0x00050081, 0x0000000D, 0x00003446, 0x00002459,
0x0000245A, 0x00050081, 0x0000000D, 0x00003290, 0x00003446, 0x0000245C,
0x00050081, 0x0000000D, 0x00001989, 0x00003290, 0x0000218E, 0x00050085,
0x0000000D, 0x00003183, 0x00004973, 0x00001989, 0x00050081, 0x0000000D,
0x00003E67, 0x00003183, 0x0000245B, 0x00050085, 0x0000000D, 0x00001C4C,
0x00003E67, 0x00002496, 0x0008000C, 0x0000000D, 0x0000576C, 0x00000001,
0x0000002B, 0x00001C4C, 0x00000A0C, 0x0000008A, 0x00060052, 0x0000001D,
0x00005ECE, 0x00003B26, 0x00002818, 0x00000000, 0x00060052, 0x0000001D,
0x00002B42, 0x00003B27, 0x00005ECE, 0x00000001, 0x00060052, 0x0000001D,
0x00003A55, 0x0000576C, 0x00002B42, 0x00000002, 0x0008004F, 0x00000018,
0x0000329B, 0x00003A55, 0x00003A55, 0x00000000, 0x00000001, 0x00000002,
0x0006000C, 0x00000018, 0x00001947, 0x00000001, 0x0000001F, 0x0000329B,
0x00050051, 0x0000000D, 0x000058D6, 0x00001947, 0x00000000, 0x00060052,
0x0000001D, 0x00004D39, 0x000058D6, 0x00003A55, 0x00000000, 0x00050051,
0x0000000D, 0x00004D8C, 0x00001947, 0x00000001, 0x00060052, 0x0000001D,
0x00003F07, 0x00004D8C, 0x00004D39, 0x00000001, 0x00050051, 0x0000000D,
0x00004D9F, 0x00001947, 0x00000002, 0x00060052, 0x0000001D, 0x00003CDE,
0x00004D9F, 0x00003F07, 0x00000002, 0x00060052, 0x0000001D, 0x000047D3,
0x0000008A, 0x00003CDE, 0x00000003, 0x0003003E, 0x000014D6, 0x000047D3,
0x000100FD, 0x00010038,
0x0000161F, 0x00000007, 0x00030003, 0x00000002, 0x000001CC, 0x00090004,
0x455F4C47, 0x635F5458, 0x72746E6F, 0x665F6C6F, 0x5F776F6C, 0x72747461,
0x74756269, 0x00007365, 0x000B0004, 0x455F4C47, 0x735F5458, 0x6C706D61,
0x656C7265, 0x745F7373, 0x75747865, 0x665F6572, 0x74636E75, 0x736E6F69,
0x00000000, 0x000A0004, 0x475F4C47, 0x4C474F4F, 0x70635F45, 0x74735F70,
0x5F656C79, 0x656E696C, 0x7269645F, 0x69746365, 0x00006576, 0x00080004,
0x475F4C47, 0x4C474F4F, 0x6E695F45, 0x64756C63, 0x69645F65, 0x74636572,
0x00657669, 0x00040005, 0x0000161F, 0x6E69616D, 0x00000000, 0x00060005,
0x00000C93, 0x465F6C67, 0x43676172, 0x64726F6F, 0x00000000, 0x00070005,
0x000003F2, 0x68737570, 0x6E6F635F, 0x625F7473, 0x6B636F6C, 0x0065785F,
0x00090006, 0x000003F2, 0x00000000, 0x635F6578, 0x6F5F7361, 0x75707475,
0x666F5F74, 0x74657366, 0x00000000, 0x000A0006, 0x000003F2, 0x00000001,
0x635F6578, 0x735F7361, 0x70726168, 0x7373656E, 0x736F705F, 0x65735F74,
0x00707574, 0x00060005, 0x00000CE9, 0x68737570, 0x6E6F635F, 0x5F737473,
0x00006578, 0x00060005, 0x000014D6, 0x635F6578, 0x635F7361, 0x726F6C6F,
0x00000000, 0x00060005, 0x0000142B, 0x635F6578, 0x735F7361, 0x6372756F,
0x00000065, 0x00040047, 0x00000C93, 0x0000000B, 0x0000000F, 0x00030047,
0x000003F2, 0x00000002, 0x00050048, 0x000003F2, 0x00000000, 0x00000023,
0x00000010, 0x00050048, 0x000003F2, 0x00000001, 0x00000023, 0x00000018,
0x00040047, 0x000014D6, 0x0000001E, 0x00000000, 0x00040047, 0x0000142B,
0x00000021, 0x00000000, 0x00040047, 0x0000142B, 0x00000022, 0x00000000,
0x00020013, 0x00000008, 0x00030021, 0x00000502, 0x00000008, 0x00030016,
0x0000000D, 0x00000020, 0x00040015, 0x0000000B, 0x00000020, 0x00000000,
0x00040015, 0x0000000C, 0x00000020, 0x00000001, 0x00040017, 0x00000012,
0x0000000C, 0x00000002, 0x00040017, 0x00000018, 0x0000000D, 0x00000003,
0x00040017, 0x00000011, 0x0000000B, 0x00000002, 0x00040017, 0x0000001D,
0x0000000D, 0x00000004, 0x00040020, 0x0000029A, 0x00000001, 0x0000001D,
0x0004003B, 0x0000029A, 0x00000C93, 0x00000001, 0x00040017, 0x00000013,
0x0000000D, 0x00000002, 0x0004001E, 0x000003F2, 0x00000012, 0x0000000D,
0x00040020, 0x0000066F, 0x00000009, 0x000003F2, 0x0004003B, 0x0000066F,
0x00000CE9, 0x00000009, 0x0004002B, 0x0000000C, 0x00000A0B, 0x00000000,
0x00040020, 0x0000028F, 0x00000009, 0x00000012, 0x0004002B, 0x0000000D,
0x0000008A, 0x3F800000, 0x0004002B, 0x0000000D, 0x00000A0C, 0x00000000,
0x0004002B, 0x0000000C, 0x00000A0E, 0x00000001, 0x00040020, 0x0000028A,
0x00000009, 0x0000000D, 0x0004002B, 0x0000000B, 0x00000A0D, 0x00000001,
0x00040020, 0x0000029B, 0x00000003, 0x0000001D, 0x0004003B, 0x0000029B,
0x000014D6, 0x00000003, 0x0004002B, 0x0000000B, 0x0000020D, 0x1FBC4639,
0x0004002B, 0x0000000B, 0x00000344, 0x7EF07EBB, 0x0004002B, 0x0000000B,
0x000000B2, 0x7EF19FFF, 0x0004002B, 0x0000000D, 0x00000019, 0x40000000,
0x00090019, 0x00000096, 0x0000000D, 0x00000001, 0x00000000, 0x00000000,
0x00000000, 0x00000001, 0x00000000, 0x00040020, 0x00000313, 0x00000000,
0x00000096, 0x0004003B, 0x00000313, 0x0000142B, 0x00000000, 0x0004002B,
0x0000000C, 0x00000A08, 0xFFFFFFFF, 0x0005002C, 0x00000012, 0x0000070B,
0x00000A0B, 0x00000A08, 0x0005002C, 0x00000012, 0x0000070E, 0x00000A08,
0x00000A0B, 0x0005002C, 0x00000012, 0x00000720, 0x00000A0E, 0x00000A0B,
0x0005002C, 0x00000012, 0x00000723, 0x00000A0B, 0x00000A0E, 0x0004002B,
0x0000000D, 0x00000B69, 0x40800000, 0x00030001, 0x0000001D, 0x00000002,
0x00050036, 0x00000008, 0x0000161F, 0x00000000, 0x00000502, 0x000200F8,
0x00006175, 0x0004003D, 0x0000001D, 0x0000488B, 0x00000C93, 0x0007004F,
0x00000013, 0x000036B8, 0x0000488B, 0x0000488B, 0x00000000, 0x00000001,
0x0004006E, 0x00000012, 0x000044F8, 0x000036B8, 0x00050041, 0x0000028F,
0x00004B4F, 0x00000CE9, 0x00000A0B, 0x0004003D, 0x00000012, 0x00005926,
0x00004B4F, 0x00050082, 0x00000012, 0x00005B10, 0x000044F8, 0x00005926,
0x0004007C, 0x00000011, 0x000026D2, 0x00005B10, 0x00050041, 0x0000028A,
0x00005205, 0x00000CE9, 0x00000A0E, 0x0004003D, 0x0000000D, 0x000056DD,
0x00005205, 0x0004007C, 0x0000000B, 0x00004046, 0x000056DD, 0x0004007C,
0x00000012, 0x00001B4E, 0x000026D2, 0x00050080, 0x00000012, 0x0000381D,
0x00001B4E, 0x0000070B, 0x0004003D, 0x00000096, 0x00005A11, 0x0000142B,
0x0007005F, 0x0000001D, 0x00004C03, 0x00005A11, 0x0000381D, 0x00000002,
0x00000A0B, 0x00050080, 0x00000012, 0x00003423, 0x00001B4E, 0x0000070E,
0x0004003D, 0x00000096, 0x000038CA, 0x0000142B, 0x0007005F, 0x0000001D,
0x00003151, 0x000038CA, 0x00003423, 0x00000002, 0x00000A0B, 0x0004003D,
0x00000096, 0x000028B5, 0x0000142B, 0x0007005F, 0x0000001D, 0x00003C54,
0x000028B5, 0x00001B4E, 0x00000002, 0x00000A0B, 0x00050080, 0x00000012,
0x00003424, 0x00001B4E, 0x00000720, 0x0004003D, 0x00000096, 0x00003DC3,
0x0000142B, 0x0007005F, 0x0000001D, 0x00004C04, 0x00003DC3, 0x00003424,
0x00000002, 0x00000A0B, 0x00050080, 0x00000012, 0x00003425, 0x00001B4E,
0x00000723, 0x0004003D, 0x00000096, 0x00003A46, 0x0000142B, 0x0007005F,
0x0000001D, 0x000022C3, 0x00003A46, 0x00003425, 0x00000002, 0x00000A0B,
0x00050051, 0x0000000D, 0x00004D11, 0x00004C03, 0x00000000, 0x00050051,
0x0000000D, 0x00001B71, 0x00004C03, 0x00000001, 0x00050051, 0x0000000D,
0x00004923, 0x00004C03, 0x00000002, 0x00050085, 0x0000000D, 0x0000611F,
0x00004D11, 0x00004D11, 0x00050085, 0x0000000D, 0x00003F38, 0x00001B71,
0x00001B71, 0x00050085, 0x0000000D, 0x00002459, 0x00004923, 0x00004923,
0x00050051, 0x0000000D, 0x000056DC, 0x00003151, 0x00000000, 0x00050051,
0x0000000D, 0x00002E44, 0x00003151, 0x00000001, 0x00050051, 0x0000000D,
0x00004924, 0x00003151, 0x00000002, 0x00050085, 0x0000000D, 0x00006120,
0x000056DC, 0x000056DC, 0x00050085, 0x0000000D, 0x00003F39, 0x00002E44,
0x00002E44, 0x00050085, 0x0000000D, 0x0000245A, 0x00004924, 0x00004924,
0x00050051, 0x0000000D, 0x000056DE, 0x00003C54, 0x00000000, 0x00050051,
0x0000000D, 0x00002E45, 0x00003C54, 0x00000001, 0x00050051, 0x0000000D,
0x00004925, 0x00003C54, 0x00000002, 0x00050085, 0x0000000D, 0x00006121,
0x000056DE, 0x000056DE, 0x00050085, 0x0000000D, 0x00003F3A, 0x00002E45,
0x00002E45, 0x00050085, 0x0000000D, 0x0000245B, 0x00004925, 0x00004925,
0x00050051, 0x0000000D, 0x000056DF, 0x00004C04, 0x00000000, 0x00050051,
0x0000000D, 0x00002E46, 0x00004C04, 0x00000001, 0x00050051, 0x0000000D,
0x00004926, 0x00004C04, 0x00000002, 0x00050085, 0x0000000D, 0x00006122,
0x000056DF, 0x000056DF, 0x00050085, 0x0000000D, 0x00003F3B, 0x00002E46,
0x00002E46, 0x00050085, 0x0000000D, 0x0000245C, 0x00004926, 0x00004926,
0x00050051, 0x0000000D, 0x000056E0, 0x000022C3, 0x00000000, 0x00050051,
0x0000000D, 0x00002E47, 0x000022C3, 0x00000001, 0x00050051, 0x0000000D,
0x00004927, 0x000022C3, 0x00000002, 0x00050085, 0x0000000D, 0x00006123,
0x000056E0, 0x000056E0, 0x00050085, 0x0000000D, 0x00003A3E, 0x00002E47,
0x00002E47, 0x00050085, 0x0000000D, 0x0000218E, 0x00004927, 0x00004927,
0x0007000C, 0x0000000D, 0x00002A7D, 0x00000001, 0x00000025, 0x00003F3A,
0x00003F3B, 0x0007000C, 0x0000000D, 0x0000243C, 0x00000001, 0x00000025,
0x00003F39, 0x00002A7D, 0x0007000C, 0x0000000D, 0x00003E4F, 0x00000001,
0x00000025, 0x00003F38, 0x00003A3E, 0x0007000C, 0x0000000D, 0x00002A99,
0x00000001, 0x00000025, 0x0000243C, 0x00003E4F, 0x0007000C, 0x0000000D,
0x00005EE8, 0x00000001, 0x00000028, 0x00003F3A, 0x00003F3B, 0x0007000C,
0x0000000D, 0x00004473, 0x00000001, 0x00000028, 0x00003F39, 0x00005EE8,
0x0007000C, 0x0000000D, 0x00005D83, 0x00000001, 0x00000028, 0x00003F38,
0x00003A3E, 0x0007000C, 0x0000000D, 0x0000526D, 0x00000001, 0x00000028,
0x00004473, 0x00005D83, 0x0004007C, 0x0000000B, 0x00001FF5, 0x0000526D,
0x00050082, 0x0000000B, 0x000022F7, 0x00000344, 0x00001FF5, 0x0004007C,
0x0000000D, 0x00001941, 0x000022F7, 0x00050083, 0x0000000D, 0x00005E43,
0x0000008A, 0x0000526D, 0x0007000C, 0x0000000D, 0x00005B1C, 0x00000001,
0x00000025, 0x00002A99, 0x00005E43, 0x00050085, 0x0000000D, 0x00005977,
0x00005B1C, 0x00001941, 0x0008000C, 0x0000000D, 0x000050CB, 0x00000001,
0x0000002B, 0x00005977, 0x00000A0C, 0x0000008A, 0x0004007C, 0x0000000B,
0x00005DCB, 0x000050CB, 0x000500C2, 0x0000000B, 0x0000564A, 0x00005DCB,
0x00000A0D, 0x00050080, 0x0000000B, 0x00005ABD, 0x0000564A, 0x0000020D,
0x0004007C, 0x0000000D, 0x000054BC, 0x00005ABD, 0x0004007C, 0x0000000D,
0x00004C66, 0x00004046, 0x00050085, 0x0000000D, 0x00004973, 0x000054BC,
0x00004C66, 0x00050085, 0x0000000D, 0x00005B14, 0x00000B69, 0x00004973,
0x00050081, 0x0000000D, 0x00004072, 0x0000008A, 0x00005B14, 0x0004007C,
0x0000000B, 0x00001997, 0x00004072, 0x00050082, 0x0000000B, 0x00001D8B,
0x000000B2, 0x00001997, 0x0004007C, 0x0000000D, 0x000024CB, 0x00001D8B,
0x0004007F, 0x0000000D, 0x000023AA, 0x000024CB, 0x00050085, 0x0000000D,
0x0000304F, 0x000023AA, 0x00004072, 0x00050081, 0x0000000D, 0x0000409C,
0x0000304F, 0x00000019, 0x00050085, 0x0000000D, 0x00002496, 0x000024CB,
0x0000409C, 0x00050081, 0x0000000D, 0x0000499D, 0x0000611F, 0x00006120,
0x00050081, 0x0000000D, 0x00005A67, 0x0000499D, 0x00006122, 0x00050081,
0x0000000D, 0x00001987, 0x00005A67, 0x00006123, 0x00050085, 0x0000000D,
0x00003181, 0x00004973, 0x00001987, 0x00050081, 0x0000000D, 0x00003E65,
0x00003181, 0x00006121, 0x00050085, 0x0000000D, 0x00001FC9, 0x00003E65,
0x00002496, 0x0008000C, 0x0000000D, 0x00003B26, 0x00000001, 0x0000002B,
0x00001FC9, 0x00000A0C, 0x0000008A, 0x00050081, 0x0000000D, 0x00003445,
0x00003F38, 0x00003F39, 0x00050081, 0x0000000D, 0x0000328F, 0x00003445,
0x00003F3B, 0x00050081, 0x0000000D, 0x00001988, 0x0000328F, 0x00003A3E,
0x00050085, 0x0000000D, 0x00003182, 0x00004973, 0x00001988, 0x00050081,
0x0000000D, 0x00003E66, 0x00003182, 0x00003F3A, 0x00050085, 0x0000000D,
0x00001FCA, 0x00003E66, 0x00002496, 0x0008000C, 0x0000000D, 0x00003B27,
0x00000001, 0x0000002B, 0x00001FCA, 0x00000A0C, 0x0000008A, 0x00050081,
0x0000000D, 0x00003446, 0x00002459, 0x0000245A, 0x00050081, 0x0000000D,
0x00003290, 0x00003446, 0x0000245C, 0x00050081, 0x0000000D, 0x00001989,
0x00003290, 0x0000218E, 0x00050085, 0x0000000D, 0x00003183, 0x00004973,
0x00001989, 0x00050081, 0x0000000D, 0x00003E67, 0x00003183, 0x0000245B,
0x00050085, 0x0000000D, 0x00001C4C, 0x00003E67, 0x00002496, 0x0008000C,
0x0000000D, 0x0000576C, 0x00000001, 0x0000002B, 0x00001C4C, 0x00000A0C,
0x0000008A, 0x00060052, 0x0000001D, 0x00005ECE, 0x00003B26, 0x00000002,
0x00000000, 0x00060052, 0x0000001D, 0x00002B42, 0x00003B27, 0x00005ECE,
0x00000001, 0x00060052, 0x0000001D, 0x00003A55, 0x0000576C, 0x00002B42,
0x00000002, 0x0008004F, 0x00000018, 0x0000329B, 0x00003A55, 0x00003A55,
0x00000000, 0x00000001, 0x00000002, 0x0006000C, 0x00000018, 0x00001934,
0x00000001, 0x0000001F, 0x0000329B, 0x00050051, 0x0000000D, 0x00005983,
0x00001934, 0x00000000, 0x00050051, 0x0000000D, 0x00002295, 0x00001934,
0x00000001, 0x00050051, 0x0000000D, 0x00001D30, 0x00001934, 0x00000002,
0x00070050, 0x0000001D, 0x00005788, 0x00005983, 0x00002295, 0x00001D30,
0x0000008A, 0x0003003E, 0x000014D6, 0x00005788, 0x000100FD, 0x00010038,
};

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -2,21 +2,34 @@
#if 0
; SPIR-V
; Version: 1.0
; Generator: Khronos Glslang Reference Front End; 10
; Generator: Khronos Glslang Reference Front End; 11
; Bound: 25152
; Schema: 0
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %5663 "main" %gl_FragCoord %3253
OpExecutionMode %5663 OriginUpperLeft
OpEntryPoint Fragment %main "main" %gl_FragCoord %xe_fsr_rcas_color
OpExecutionMode %main OriginUpperLeft
OpSource GLSL 460
OpSourceExtension "GL_EXT_control_flow_attributes"
OpSourceExtension "GL_EXT_samplerless_texture_functions"
OpSourceExtension "GL_GOOGLE_cpp_style_line_directive"
OpSourceExtension "GL_GOOGLE_include_directive"
OpName %main "main"
OpName %gl_FragCoord "gl_FragCoord"
OpName %push_const_block_xe "push_const_block_xe"
OpMemberName %push_const_block_xe 0 "xe_fsr_rcas_output_offset"
OpMemberName %push_const_block_xe 1 "xe_fsr_rcas_sharpness_post_setup"
OpName %push_consts_xe "push_consts_xe"
OpName %xe_fsr_rcas_color "xe_fsr_rcas_color"
OpName %xe_fsr_rcas_source "xe_fsr_rcas_source"
OpDecorate %gl_FragCoord BuiltIn FragCoord
OpMemberDecorate %_struct_1010 0 Offset 16
OpMemberDecorate %_struct_1010 1 Offset 24
OpDecorate %_struct_1010 Block
OpDecorate %3253 Location 0
OpDecorate %3575 DescriptorSet 0
OpDecorate %3575 Binding 0
OpDecorate %push_const_block_xe Block
OpMemberDecorate %push_const_block_xe 0 Offset 16
OpMemberDecorate %push_const_block_xe 1 Offset 24
OpDecorate %xe_fsr_rcas_color Location 0
OpDecorate %xe_fsr_rcas_source Binding 0
OpDecorate %xe_fsr_rcas_source DescriptorSet 0
%void = OpTypeVoid
%1282 = OpTypeFunction %void
%float = OpTypeFloat 32
@@ -28,22 +41,22 @@
%_ptr_Input_v4float = OpTypePointer Input %v4float
%gl_FragCoord = OpVariable %_ptr_Input_v4float Input
%v2float = OpTypeVector %float 2
%_struct_1010 = OpTypeStruct %v2int %float
%_ptr_PushConstant__struct_1010 = OpTypePointer PushConstant %_struct_1010
%4495 = OpVariable %_ptr_PushConstant__struct_1010 PushConstant
%push_const_block_xe = OpTypeStruct %v2int %float
%_ptr_PushConstant_push_const_block_xe = OpTypePointer PushConstant %push_const_block_xe
%push_consts_xe = OpVariable %_ptr_PushConstant_push_const_block_xe PushConstant
%int_0 = OpConstant %int 0
%_ptr_PushConstant_v2int = OpTypePointer PushConstant %v2int
%int_1 = OpConstant %int 1
%_ptr_PushConstant_float = OpTypePointer PushConstant %float
%float_1 = OpConstant %float 1
%_ptr_Output_v4float = OpTypePointer Output %v4float
%3253 = OpVariable %_ptr_Output_v4float Output
%xe_fsr_rcas_color = OpVariable %_ptr_Output_v4float Output
%float_0 = OpConstant %float 0
%uint_2129764351 = OpConstant %uint 2129764351
%float_2 = OpConstant %float 2
%150 = OpTypeImage %float 2D 0 0 0 1 Unknown
%_ptr_UniformConstant_150 = OpTypePointer UniformConstant %150
%3575 = OpVariable %_ptr_UniformConstant_150 UniformConstant
%xe_fsr_rcas_source = OpVariable %_ptr_UniformConstant_150 UniformConstant
%int_n1 = OpConstant %int -1
%1803 = OpConstantComposite %v2int %int_0 %int_n1
%1806 = OpConstantComposite %v2int %int_n1 %int_0
@@ -52,74 +65,77 @@
%float_n4 = OpConstant %float -4
%float_4 = OpConstant %float 4
%float_n0_1875 = OpConstant %float -0.1875
%10264 = OpUndef %v4float
%float_0_25 = OpConstant %float 0.25
%5663 = OpFunction %void None %1282
%main = OpFunction %void None %1282
%24949 = OpLabel
%18571 = OpLoad %v4float %gl_FragCoord
%14008 = OpVectorShuffle %v2float %18571 %18571 0 1
%17656 = OpConvertFToS %v2int %14008
%19279 = OpAccessChain %_ptr_PushConstant_v2int %4495 %int_0
%19279 = OpAccessChain %_ptr_PushConstant_v2int %push_consts_xe %int_0
%22822 = OpLoad %v2int %19279
%23312 = OpISub %v2int %17656 %22822
%9938 = OpBitcast %v2uint %23312
%20997 = OpAccessChain %_ptr_PushConstant_float %4495 %int_1
%20997 = OpAccessChain %_ptr_PushConstant_float %push_consts_xe %int_1
%22237 = OpLoad %float %20997
%16454 = OpBitcast %uint %22237
%6990 = OpBitcast %v2int %9938
%14365 = OpIAdd %v2int %6990 %1803
%22164 = OpLoad %150 %3575
%22164 = OpLoad %150 %xe_fsr_rcas_source
%8899 = OpImageFetch %v4float %22164 %14365 Lod %int_0
%19729 = OpCompositeExtract %float %8899 0
%6930 = OpCompositeExtract %float %8899 1
%18866 = OpCompositeExtract %float %8899 2
%14201 = OpIAdd %v2int %6990 %1806
%20009 = OpImageFetch %v4float %22164 %14201 Lod %int_0
%6266 = OpCompositeExtract %float %20009 0
%6303 = OpCompositeExtract %float %20009 1
%24309 = OpCompositeExtract %float %20009 2
%7384 = OpImageFetch %v4float %22164 %6990 Lod %int_0
%22945 = OpCompositeExtract %float %7384 0
%6931 = OpCompositeExtract %float %7384 1
%18867 = OpCompositeExtract %float %7384 2
%14202 = OpIAdd %v2int %6990 %1824
%20010 = OpImageFetch %v4float %22164 %14202 Lod %int_0
%6267 = OpCompositeExtract %float %20010 0
%6932 = OpCompositeExtract %float %20010 1
%18868 = OpCompositeExtract %float %20010 2
%14203 = OpIAdd %v2int %6990 %1827
%20011 = OpImageFetch %v4float %22164 %14203 Lod %int_0
%6268 = OpCompositeExtract %float %20011 0
%23834 = OpCompositeExtract %float %20011 1
%6945 = OpCompositeExtract %float %20011 2
%15372 = OpExtInst %float %1 FMin %6266 %6267
%18220 = OpCompositeExtract %float %8899 2
%20349 = OpIAdd %v2int %6990 %1806
%16541 = OpLoad %150 %xe_fsr_rcas_source
%8900 = OpImageFetch %v4float %16541 %20349 Lod %int_0
%19730 = OpCompositeExtract %float %8900 0
%24728 = OpCompositeExtract %float %8900 1
%11386 = OpCompositeExtract %float %8900 2
%16530 = OpLoad %150 %xe_fsr_rcas_source
%19121 = OpImageFetch %v4float %16530 %6990 Lod %int_0
%19731 = OpCompositeExtract %float %19121 0
%6931 = OpCompositeExtract %float %19121 1
%18221 = OpCompositeExtract %float %19121 2
%20350 = OpIAdd %v2int %6990 %1824
%16542 = OpLoad %150 %xe_fsr_rcas_source
%8901 = OpImageFetch %v4float %16542 %20350 Lod %int_0
%19732 = OpCompositeExtract %float %8901 0
%6932 = OpCompositeExtract %float %8901 1
%18222 = OpCompositeExtract %float %8901 2
%20351 = OpIAdd %v2int %6990 %1827
%16543 = OpLoad %150 %xe_fsr_rcas_source
%8902 = OpImageFetch %v4float %16543 %20351 Lod %int_0
%19733 = OpCompositeExtract %float %8902 0
%23834 = OpCompositeExtract %float %8902 1
%6945 = OpCompositeExtract %float %8902 2
%15372 = OpExtInst %float %1 FMin %19730 %19732
%25151 = OpExtInst %float %1 FMin %19729 %15372
%15948 = OpExtInst %float %1 FMin %25151 %6268
%15949 = OpExtInst %float %1 FMin %6303 %6932
%15948 = OpExtInst %float %1 FMin %25151 %19733
%15949 = OpExtInst %float %1 FMin %24728 %6932
%15950 = OpExtInst %float %1 FMin %6930 %15949
%15951 = OpExtInst %float %1 FMin %15950 %23834
%15952 = OpExtInst %float %1 FMin %24309 %18868
%15953 = OpExtInst %float %1 FMin %18866 %15952
%15952 = OpExtInst %float %1 FMin %11386 %18222
%15953 = OpExtInst %float %1 FMin %18220 %15952
%10905 = OpExtInst %float %1 FMin %15953 %6945
%24296 = OpExtInst %float %1 FMax %6266 %6267
%24296 = OpExtInst %float %1 FMax %19730 %19732
%17523 = OpExtInst %float %1 FMax %19729 %24296
%21851 = OpExtInst %float %1 FMax %17523 %6268
%21852 = OpExtInst %float %1 FMax %6303 %6932
%21851 = OpExtInst %float %1 FMax %17523 %19733
%21852 = OpExtInst %float %1 FMax %24728 %6932
%21853 = OpExtInst %float %1 FMax %6930 %21852
%21854 = OpExtInst %float %1 FMax %21853 %23834
%21855 = OpExtInst %float %1 FMax %24309 %18868
%21848 = OpExtInst %float %1 FMax %18866 %21855
%21855 = OpExtInst %float %1 FMax %11386 %18222
%21848 = OpExtInst %float %1 FMax %18220 %21855
%10142 = OpExtInst %float %1 FMax %21848 %6945
%24762 = OpExtInst %float %1 FMin %15948 %22945
%24762 = OpExtInst %float %1 FMin %15948 %19731
%21997 = OpFDiv %float %float_0_25 %21851
%10377 = OpFMul %float %24762 %21997
%21327 = OpExtInst %float %1 FMin %15951 %6931
%17454 = OpFDiv %float %float_0_25 %21854
%10378 = OpFMul %float %21327 %17454
%21328 = OpExtInst %float %1 FMin %10905 %18867
%21328 = OpExtInst %float %1 FMin %10905 %18221
%17457 = OpFDiv %float %float_0_25 %10142
%24307 = OpFMul %float %21328 %17457
%16512 = OpExtInst %float %1 FMax %21851 %22945
%16512 = OpExtInst %float %1 FMax %21851 %19731
%22147 = OpFSub %float %float_1 %16512
%13544 = OpFMul %float %float_4 %15948
%19323 = OpFAdd %float %13544 %float_n4
@@ -131,7 +147,7 @@
%19324 = OpFAdd %float %13545 %float_n4
%20055 = OpFDiv %float %float_1 %19324
%20867 = OpFMul %float %22148 %20055
%16514 = OpExtInst %float %1 FMax %10142 %18867
%16514 = OpExtInst %float %1 FMax %10142 %18221
%22149 = OpFSub %float %float_1 %16514
%13546 = OpFMul %float %float_4 %10905
%19325 = OpFAdd %float %13546 %float_n4
@@ -158,183 +174,196 @@
%12367 = OpFMul %float %9130 %16498
%16540 = OpFAdd %float %12367 %float_2
%9366 = OpFMul %float %9419 %16540
%18845 = OpFAdd %float %19729 %6266
%23143 = OpFAdd %float %18845 %6268
%6535 = OpFAdd %float %23143 %6267
%18845 = OpFAdd %float %19729 %19730
%23143 = OpFAdd %float %18845 %19733
%6535 = OpFAdd %float %23143 %19732
%12673 = OpFMul %float %20919 %6535
%18153 = OpFAdd %float %12673 %22945
%18153 = OpFAdd %float %12673 %19731
%9367 = OpFMul %float %18153 %9366
%18846 = OpFAdd %float %6930 %6303
%18846 = OpFAdd %float %6930 %24728
%23144 = OpFAdd %float %18846 %23834
%6536 = OpFAdd %float %23144 %6932
%12674 = OpFMul %float %20919 %6536
%18154 = OpFAdd %float %12674 %6931
%9368 = OpFMul %float %18154 %9366
%18847 = OpFAdd %float %18866 %24309
%18847 = OpFAdd %float %18220 %11386
%23145 = OpFAdd %float %18847 %6945
%6537 = OpFAdd %float %23145 %18868
%6537 = OpFAdd %float %23145 %18222
%12675 = OpFMul %float %20919 %6537
%17260 = OpFAdd %float %12675 %18867
%16604 = OpFMul %float %17260 %9366
%10663 = OpCompositeInsert %v4float %9367 %10264 0
%21331 = OpCompositeInsert %v4float %9368 %10663 1
%15333 = OpCompositeInsert %v4float %16604 %21331 2
%22422 = OpCompositeInsert %v4float %float_1 %15333 3
OpStore %3253 %22422
%17222 = OpFAdd %float %12675 %18221
%16570 = OpFMul %float %17222 %9366
%14687 = OpCompositeConstruct %v4float %9367 %9368 %16570 %float_1
OpStore %xe_fsr_rcas_color %14687
OpReturn
OpFunctionEnd
#endif
const uint32_t guest_output_ffx_fsr_rcas_ps[] = {
0x07230203, 0x00010000, 0x0008000A, 0x00006240, 0x00000000, 0x00020011,
0x07230203, 0x00010000, 0x0008000B, 0x00006240, 0x00000000, 0x00020011,
0x00000001, 0x0006000B, 0x00000001, 0x4C534C47, 0x6474732E, 0x3035342E,
0x00000000, 0x0003000E, 0x00000000, 0x00000001, 0x0007000F, 0x00000004,
0x0000161F, 0x6E69616D, 0x00000000, 0x00000C93, 0x00000CB5, 0x00030010,
0x0000161F, 0x00000007, 0x00040047, 0x00000C93, 0x0000000B, 0x0000000F,
0x00050048, 0x000003F2, 0x00000000, 0x00000023, 0x00000010, 0x00050048,
0x000003F2, 0x00000001, 0x00000023, 0x00000018, 0x00030047, 0x000003F2,
0x00000002, 0x00040047, 0x00000CB5, 0x0000001E, 0x00000000, 0x00040047,
0x00000DF7, 0x00000022, 0x00000000, 0x00040047, 0x00000DF7, 0x00000021,
0x00000000, 0x00020013, 0x00000008, 0x00030021, 0x00000502, 0x00000008,
0x00030016, 0x0000000D, 0x00000020, 0x00040015, 0x0000000B, 0x00000020,
0x00000000, 0x00040015, 0x0000000C, 0x00000020, 0x00000001, 0x00040017,
0x00000012, 0x0000000C, 0x00000002, 0x00040017, 0x0000001D, 0x0000000D,
0x00000004, 0x00040017, 0x00000011, 0x0000000B, 0x00000002, 0x00040020,
0x0000029A, 0x00000001, 0x0000001D, 0x0004003B, 0x0000029A, 0x00000C93,
0x00000001, 0x00040017, 0x00000013, 0x0000000D, 0x00000002, 0x0004001E,
0x000003F2, 0x00000012, 0x0000000D, 0x00040020, 0x0000066F, 0x00000009,
0x000003F2, 0x0004003B, 0x0000066F, 0x0000118F, 0x00000009, 0x0004002B,
0x0000000C, 0x00000A0B, 0x00000000, 0x00040020, 0x0000028F, 0x00000009,
0x00000012, 0x0004002B, 0x0000000C, 0x00000A0E, 0x00000001, 0x00040020,
0x0000028A, 0x00000009, 0x0000000D, 0x0004002B, 0x0000000D, 0x0000008A,
0x3F800000, 0x00040020, 0x0000029B, 0x00000003, 0x0000001D, 0x0004003B,
0x0000029B, 0x00000CB5, 0x00000003, 0x0004002B, 0x0000000D, 0x00000A0C,
0x00000000, 0x0004002B, 0x0000000B, 0x000000B2, 0x7EF19FFF, 0x0004002B,
0x0000000D, 0x00000018, 0x40000000, 0x00090019, 0x00000096, 0x0000000D,
0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000,
0x00040020, 0x00000313, 0x00000000, 0x00000096, 0x0004003B, 0x00000313,
0x00000DF7, 0x00000000, 0x0004002B, 0x0000000C, 0x00000A08, 0xFFFFFFFF,
0x0005002C, 0x00000012, 0x0000070B, 0x00000A0B, 0x00000A08, 0x0005002C,
0x00000012, 0x0000070E, 0x00000A08, 0x00000A0B, 0x0005002C, 0x00000012,
0x00000720, 0x00000A0E, 0x00000A0B, 0x0005002C, 0x00000012, 0x00000723,
0x00000A0B, 0x00000A0E, 0x0004002B, 0x0000000D, 0x0000025D, 0xC0800000,
0x0004002B, 0x0000000D, 0x00000B69, 0x40800000, 0x0004002B, 0x0000000D,
0x0000045E, 0xBE400000, 0x00030001, 0x0000001D, 0x00002818, 0x0004002B,
0x0000000D, 0x0000016E, 0x3E800000, 0x00050036, 0x00000008, 0x0000161F,
0x00000000, 0x00000502, 0x000200F8, 0x00006175, 0x0004003D, 0x0000001D,
0x0000488B, 0x00000C93, 0x0007004F, 0x00000013, 0x000036B8, 0x0000488B,
0x0000488B, 0x00000000, 0x00000001, 0x0004006E, 0x00000012, 0x000044F8,
0x000036B8, 0x00050041, 0x0000028F, 0x00004B4F, 0x0000118F, 0x00000A0B,
0x0004003D, 0x00000012, 0x00005926, 0x00004B4F, 0x00050082, 0x00000012,
0x00005B10, 0x000044F8, 0x00005926, 0x0004007C, 0x00000011, 0x000026D2,
0x00005B10, 0x00050041, 0x0000028A, 0x00005205, 0x0000118F, 0x00000A0E,
0x0004003D, 0x0000000D, 0x000056DD, 0x00005205, 0x0004007C, 0x0000000B,
0x00004046, 0x000056DD, 0x0004007C, 0x00000012, 0x00001B4E, 0x000026D2,
0x00050080, 0x00000012, 0x0000381D, 0x00001B4E, 0x0000070B, 0x0004003D,
0x00000096, 0x00005694, 0x00000DF7, 0x0007005F, 0x0000001D, 0x000022C3,
0x00005694, 0x0000381D, 0x00000002, 0x00000A0B, 0x00050051, 0x0000000D,
0x00004D11, 0x000022C3, 0x00000000, 0x00050051, 0x0000000D, 0x00001B12,
0x000022C3, 0x00000001, 0x00050051, 0x0000000D, 0x000049B2, 0x000022C3,
0x00000002, 0x00050080, 0x00000012, 0x00003779, 0x00001B4E, 0x0000070E,
0x0007005F, 0x0000001D, 0x00004E29, 0x00005694, 0x00003779, 0x00000002,
0x00000A0B, 0x00050051, 0x0000000D, 0x0000187A, 0x00004E29, 0x00000000,
0x00050051, 0x0000000D, 0x0000189F, 0x00004E29, 0x00000001, 0x00050051,
0x0000000D, 0x00005EF5, 0x00004E29, 0x00000002, 0x0007005F, 0x0000001D,
0x00001CD8, 0x00005694, 0x00001B4E, 0x00000002, 0x00000A0B, 0x00050051,
0x0000000D, 0x000059A1, 0x00001CD8, 0x00000000, 0x00050051, 0x0000000D,
0x00001B13, 0x00001CD8, 0x00000001, 0x00050051, 0x0000000D, 0x000049B3,
0x00001CD8, 0x00000002, 0x00050080, 0x00000012, 0x0000377A, 0x00001B4E,
0x00000720, 0x0007005F, 0x0000001D, 0x00004E2A, 0x00005694, 0x0000377A,
0x00000002, 0x00000A0B, 0x00050051, 0x0000000D, 0x0000187B, 0x00004E2A,
0x00000000, 0x00050051, 0x0000000D, 0x00001B14, 0x00004E2A, 0x00000001,
0x00050051, 0x0000000D, 0x000049B4, 0x00004E2A, 0x00000002, 0x00050080,
0x00000012, 0x0000377B, 0x00001B4E, 0x00000723, 0x0007005F, 0x0000001D,
0x00004E2B, 0x00005694, 0x0000377B, 0x00000002, 0x00000A0B, 0x00050051,
0x0000000D, 0x0000187C, 0x00004E2B, 0x00000000, 0x00050051, 0x0000000D,
0x00005D1A, 0x00004E2B, 0x00000001, 0x00050051, 0x0000000D, 0x00001B21,
0x00004E2B, 0x00000002, 0x0007000C, 0x0000000D, 0x00003C0C, 0x00000001,
0x00000025, 0x0000187A, 0x0000187B, 0x0007000C, 0x0000000D, 0x0000623F,
0x00000001, 0x00000025, 0x00004D11, 0x00003C0C, 0x0007000C, 0x0000000D,
0x00003E4C, 0x00000001, 0x00000025, 0x0000623F, 0x0000187C, 0x0007000C,
0x0000000D, 0x00003E4D, 0x00000001, 0x00000025, 0x0000189F, 0x00001B14,
0x0007000C, 0x0000000D, 0x00003E4E, 0x00000001, 0x00000025, 0x00001B12,
0x00003E4D, 0x0007000C, 0x0000000D, 0x00003E4F, 0x00000001, 0x00000025,
0x00003E4E, 0x00005D1A, 0x0007000C, 0x0000000D, 0x00003E50, 0x00000001,
0x00000025, 0x00005EF5, 0x000049B4, 0x0007000C, 0x0000000D, 0x00003E51,
0x00000001, 0x00000025, 0x000049B2, 0x00003E50, 0x0007000C, 0x0000000D,
0x00002A99, 0x00000001, 0x00000025, 0x00003E51, 0x00001B21, 0x0007000C,
0x0000000D, 0x00005EE8, 0x00000001, 0x00000028, 0x0000187A, 0x0000187B,
0x0007000C, 0x0000000D, 0x00004473, 0x00000001, 0x00000028, 0x00004D11,
0x00005EE8, 0x0007000C, 0x0000000D, 0x0000555B, 0x00000001, 0x00000028,
0x00004473, 0x0000187C, 0x0007000C, 0x0000000D, 0x0000555C, 0x00000001,
0x00000028, 0x0000189F, 0x00001B14, 0x0007000C, 0x0000000D, 0x0000555D,
0x00000001, 0x00000028, 0x00001B12, 0x0000555C, 0x0007000C, 0x0000000D,
0x0000555E, 0x00000001, 0x00000028, 0x0000555D, 0x00005D1A, 0x0007000C,
0x0000000D, 0x0000555F, 0x00000001, 0x00000028, 0x00005EF5, 0x000049B4,
0x0007000C, 0x0000000D, 0x00005558, 0x00000001, 0x00000028, 0x000049B2,
0x0000555F, 0x0007000C, 0x0000000D, 0x0000279E, 0x00000001, 0x00000028,
0x00005558, 0x00001B21, 0x0007000C, 0x0000000D, 0x000060BA, 0x00000001,
0x00000025, 0x00003E4C, 0x000059A1, 0x00050088, 0x0000000D, 0x000055ED,
0x0000016E, 0x0000555B, 0x00050085, 0x0000000D, 0x00002889, 0x000060BA,
0x000055ED, 0x0007000C, 0x0000000D, 0x0000534F, 0x00000001, 0x00000025,
0x00003E4F, 0x00001B13, 0x00050088, 0x0000000D, 0x0000442E, 0x0000016E,
0x0000555E, 0x00050085, 0x0000000D, 0x0000288A, 0x0000534F, 0x0000442E,
0x0007000C, 0x0000000D, 0x00005350, 0x00000001, 0x00000025, 0x00002A99,
0x000049B3, 0x00050088, 0x0000000D, 0x00004431, 0x0000016E, 0x0000279E,
0x00050085, 0x0000000D, 0x00005EF3, 0x00005350, 0x00004431, 0x0007000C,
0x0000000D, 0x00004080, 0x00000001, 0x00000028, 0x0000555B, 0x000059A1,
0x00050083, 0x0000000D, 0x00005683, 0x0000008A, 0x00004080, 0x00050085,
0x0000000D, 0x000034E8, 0x00000B69, 0x00003E4C, 0x00050081, 0x0000000D,
0x00004B7B, 0x000034E8, 0x0000025D, 0x00050088, 0x0000000D, 0x00004E56,
0x0000008A, 0x00004B7B, 0x00050085, 0x0000000D, 0x00005182, 0x00005683,
0x00004E56, 0x0007000C, 0x0000000D, 0x00004081, 0x00000001, 0x00000028,
0x0000555E, 0x00001B13, 0x00050083, 0x0000000D, 0x00005684, 0x0000008A,
0x00004081, 0x00050085, 0x0000000D, 0x000034E9, 0x00000B69, 0x00003E4F,
0x00050081, 0x0000000D, 0x00004B7C, 0x000034E9, 0x0000025D, 0x00050088,
0x0000000D, 0x00004E57, 0x0000008A, 0x00004B7C, 0x00050085, 0x0000000D,
0x00005183, 0x00005684, 0x00004E57, 0x0007000C, 0x0000000D, 0x00004082,
0x00000001, 0x00000028, 0x0000279E, 0x000049B3, 0x00050083, 0x0000000D,
0x00005685, 0x0000008A, 0x00004082, 0x00050085, 0x0000000D, 0x000034EA,
0x00000B69, 0x00002A99, 0x00050081, 0x0000000D, 0x00004B7D, 0x000034EA,
0x0000025D, 0x00050088, 0x0000000D, 0x000056B7, 0x0000008A, 0x00004B7D,
0x00050085, 0x0000000D, 0x00003B46, 0x00005685, 0x000056B7, 0x0004007F,
0x0000000D, 0x00005754, 0x00002889, 0x0007000C, 0x0000000D, 0x00005C99,
0x00000001, 0x00000028, 0x00005754, 0x00005182, 0x0004007F, 0x0000000D,
0x00004019, 0x0000288A, 0x0007000C, 0x0000000D, 0x000023D9, 0x00000001,
0x00000028, 0x00004019, 0x00005183, 0x0004007F, 0x0000000D, 0x000037B8,
0x00005EF3, 0x0007000C, 0x0000000D, 0x00003168, 0x00000001, 0x00000028,
0x000037B8, 0x00003B46, 0x0007000C, 0x0000000D, 0x000049EB, 0x00000001,
0x00000028, 0x000023D9, 0x00003168, 0x0007000C, 0x0000000D, 0x00001E92,
0x00000001, 0x00000028, 0x00005C99, 0x000049EB, 0x0007000C, 0x0000000D,
0x00002934, 0x00000001, 0x00000025, 0x00001E92, 0x00000A0C, 0x0007000C,
0x0000000D, 0x0000229C, 0x00000001, 0x00000028, 0x0000045E, 0x00002934,
0x0004007C, 0x0000000D, 0x00005830, 0x00004046, 0x00050085, 0x0000000D,
0x000051B7, 0x0000229C, 0x00005830, 0x00050085, 0x0000000D, 0x00005B14,
0x00000B69, 0x000051B7, 0x00050081, 0x0000000D, 0x00004072, 0x00005B14,
0x0000008A, 0x0004007C, 0x0000000B, 0x00001997, 0x00004072, 0x00050082,
0x0000000B, 0x00001D8B, 0x000000B2, 0x00001997, 0x0004007C, 0x0000000D,
0x000024CB, 0x00001D8B, 0x0004007F, 0x0000000D, 0x000023AA, 0x000024CB,
0x00050085, 0x0000000D, 0x0000304F, 0x000023AA, 0x00004072, 0x00050081,
0x0000000D, 0x0000409C, 0x0000304F, 0x00000018, 0x00050085, 0x0000000D,
0x00002496, 0x000024CB, 0x0000409C, 0x00050081, 0x0000000D, 0x0000499D,
0x00004D11, 0x0000187A, 0x00050081, 0x0000000D, 0x00005A67, 0x0000499D,
0x0000187C, 0x00050081, 0x0000000D, 0x00001987, 0x00005A67, 0x0000187B,
0x00050085, 0x0000000D, 0x00003181, 0x000051B7, 0x00001987, 0x00050081,
0x0000000D, 0x000046E9, 0x00003181, 0x000059A1, 0x00050085, 0x0000000D,
0x00002497, 0x000046E9, 0x00002496, 0x00050081, 0x0000000D, 0x0000499E,
0x00001B12, 0x0000189F, 0x00050081, 0x0000000D, 0x00005A68, 0x0000499E,
0x00005D1A, 0x00050081, 0x0000000D, 0x00001988, 0x00005A68, 0x00001B14,
0x00050085, 0x0000000D, 0x00003182, 0x000051B7, 0x00001988, 0x00050081,
0x0000000D, 0x000046EA, 0x00003182, 0x00001B13, 0x00050085, 0x0000000D,
0x00002498, 0x000046EA, 0x00002496, 0x00050081, 0x0000000D, 0x0000499F,
0x000049B2, 0x00005EF5, 0x00050081, 0x0000000D, 0x00005A69, 0x0000499F,
0x00001B21, 0x00050081, 0x0000000D, 0x00001989, 0x00005A69, 0x000049B4,
0x00050085, 0x0000000D, 0x00003183, 0x000051B7, 0x00001989, 0x00050081,
0x0000000D, 0x0000436C, 0x00003183, 0x000049B3, 0x00050085, 0x0000000D,
0x000040DC, 0x0000436C, 0x00002496, 0x00060052, 0x0000001D, 0x000029A7,
0x00002497, 0x00002818, 0x00000000, 0x00060052, 0x0000001D, 0x00005353,
0x00002498, 0x000029A7, 0x00000001, 0x00060052, 0x0000001D, 0x00003BE5,
0x000040DC, 0x00005353, 0x00000002, 0x00060052, 0x0000001D, 0x00005796,
0x0000008A, 0x00003BE5, 0x00000003, 0x0003003E, 0x00000CB5, 0x00005796,
0x0000161F, 0x00000007, 0x00030003, 0x00000002, 0x000001CC, 0x00090004,
0x455F4C47, 0x635F5458, 0x72746E6F, 0x665F6C6F, 0x5F776F6C, 0x72747461,
0x74756269, 0x00007365, 0x000B0004, 0x455F4C47, 0x735F5458, 0x6C706D61,
0x656C7265, 0x745F7373, 0x75747865, 0x665F6572, 0x74636E75, 0x736E6F69,
0x00000000, 0x000A0004, 0x475F4C47, 0x4C474F4F, 0x70635F45, 0x74735F70,
0x5F656C79, 0x656E696C, 0x7269645F, 0x69746365, 0x00006576, 0x00080004,
0x475F4C47, 0x4C474F4F, 0x6E695F45, 0x64756C63, 0x69645F65, 0x74636572,
0x00657669, 0x00040005, 0x0000161F, 0x6E69616D, 0x00000000, 0x00060005,
0x00000C93, 0x465F6C67, 0x43676172, 0x64726F6F, 0x00000000, 0x00070005,
0x000003F2, 0x68737570, 0x6E6F635F, 0x625F7473, 0x6B636F6C, 0x0065785F,
0x000A0006, 0x000003F2, 0x00000000, 0x665F6578, 0x725F7273, 0x5F736163,
0x7074756F, 0x6F5F7475, 0x65736666, 0x00000074, 0x000C0006, 0x000003F2,
0x00000001, 0x665F6578, 0x725F7273, 0x5F736163, 0x72616873, 0x73656E70,
0x6F705F73, 0x735F7473, 0x70757465, 0x00000000, 0x00060005, 0x00000CE9,
0x68737570, 0x6E6F635F, 0x5F737473, 0x00006578, 0x00070005, 0x00000CB5,
0x665F6578, 0x725F7273, 0x5F736163, 0x6F6C6F63, 0x00000072, 0x00070005,
0x00000DF7, 0x665F6578, 0x725F7273, 0x5F736163, 0x72756F73, 0x00006563,
0x00040047, 0x00000C93, 0x0000000B, 0x0000000F, 0x00030047, 0x000003F2,
0x00000002, 0x00050048, 0x000003F2, 0x00000000, 0x00000023, 0x00000010,
0x00050048, 0x000003F2, 0x00000001, 0x00000023, 0x00000018, 0x00040047,
0x00000CB5, 0x0000001E, 0x00000000, 0x00040047, 0x00000DF7, 0x00000021,
0x00000000, 0x00040047, 0x00000DF7, 0x00000022, 0x00000000, 0x00020013,
0x00000008, 0x00030021, 0x00000502, 0x00000008, 0x00030016, 0x0000000D,
0x00000020, 0x00040015, 0x0000000B, 0x00000020, 0x00000000, 0x00040015,
0x0000000C, 0x00000020, 0x00000001, 0x00040017, 0x00000012, 0x0000000C,
0x00000002, 0x00040017, 0x0000001D, 0x0000000D, 0x00000004, 0x00040017,
0x00000011, 0x0000000B, 0x00000002, 0x00040020, 0x0000029A, 0x00000001,
0x0000001D, 0x0004003B, 0x0000029A, 0x00000C93, 0x00000001, 0x00040017,
0x00000013, 0x0000000D, 0x00000002, 0x0004001E, 0x000003F2, 0x00000012,
0x0000000D, 0x00040020, 0x0000066F, 0x00000009, 0x000003F2, 0x0004003B,
0x0000066F, 0x00000CE9, 0x00000009, 0x0004002B, 0x0000000C, 0x00000A0B,
0x00000000, 0x00040020, 0x0000028F, 0x00000009, 0x00000012, 0x0004002B,
0x0000000C, 0x00000A0E, 0x00000001, 0x00040020, 0x0000028A, 0x00000009,
0x0000000D, 0x0004002B, 0x0000000D, 0x0000008A, 0x3F800000, 0x00040020,
0x0000029B, 0x00000003, 0x0000001D, 0x0004003B, 0x0000029B, 0x00000CB5,
0x00000003, 0x0004002B, 0x0000000D, 0x00000A0C, 0x00000000, 0x0004002B,
0x0000000B, 0x000000B2, 0x7EF19FFF, 0x0004002B, 0x0000000D, 0x00000018,
0x40000000, 0x00090019, 0x00000096, 0x0000000D, 0x00000001, 0x00000000,
0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00040020, 0x00000313,
0x00000000, 0x00000096, 0x0004003B, 0x00000313, 0x00000DF7, 0x00000000,
0x0004002B, 0x0000000C, 0x00000A08, 0xFFFFFFFF, 0x0005002C, 0x00000012,
0x0000070B, 0x00000A0B, 0x00000A08, 0x0005002C, 0x00000012, 0x0000070E,
0x00000A08, 0x00000A0B, 0x0005002C, 0x00000012, 0x00000720, 0x00000A0E,
0x00000A0B, 0x0005002C, 0x00000012, 0x00000723, 0x00000A0B, 0x00000A0E,
0x0004002B, 0x0000000D, 0x0000025D, 0xC0800000, 0x0004002B, 0x0000000D,
0x00000B69, 0x40800000, 0x0004002B, 0x0000000D, 0x0000045E, 0xBE400000,
0x0004002B, 0x0000000D, 0x0000016E, 0x3E800000, 0x00050036, 0x00000008,
0x0000161F, 0x00000000, 0x00000502, 0x000200F8, 0x00006175, 0x0004003D,
0x0000001D, 0x0000488B, 0x00000C93, 0x0007004F, 0x00000013, 0x000036B8,
0x0000488B, 0x0000488B, 0x00000000, 0x00000001, 0x0004006E, 0x00000012,
0x000044F8, 0x000036B8, 0x00050041, 0x0000028F, 0x00004B4F, 0x00000CE9,
0x00000A0B, 0x0004003D, 0x00000012, 0x00005926, 0x00004B4F, 0x00050082,
0x00000012, 0x00005B10, 0x000044F8, 0x00005926, 0x0004007C, 0x00000011,
0x000026D2, 0x00005B10, 0x00050041, 0x0000028A, 0x00005205, 0x00000CE9,
0x00000A0E, 0x0004003D, 0x0000000D, 0x000056DD, 0x00005205, 0x0004007C,
0x0000000B, 0x00004046, 0x000056DD, 0x0004007C, 0x00000012, 0x00001B4E,
0x000026D2, 0x00050080, 0x00000012, 0x0000381D, 0x00001B4E, 0x0000070B,
0x0004003D, 0x00000096, 0x00005694, 0x00000DF7, 0x0007005F, 0x0000001D,
0x000022C3, 0x00005694, 0x0000381D, 0x00000002, 0x00000A0B, 0x00050051,
0x0000000D, 0x00004D11, 0x000022C3, 0x00000000, 0x00050051, 0x0000000D,
0x00001B12, 0x000022C3, 0x00000001, 0x00050051, 0x0000000D, 0x0000472C,
0x000022C3, 0x00000002, 0x00050080, 0x00000012, 0x00004F7D, 0x00001B4E,
0x0000070E, 0x0004003D, 0x00000096, 0x0000409D, 0x00000DF7, 0x0007005F,
0x0000001D, 0x000022C4, 0x0000409D, 0x00004F7D, 0x00000002, 0x00000A0B,
0x00050051, 0x0000000D, 0x00004D12, 0x000022C4, 0x00000000, 0x00050051,
0x0000000D, 0x00006098, 0x000022C4, 0x00000001, 0x00050051, 0x0000000D,
0x00002C7A, 0x000022C4, 0x00000002, 0x0004003D, 0x00000096, 0x00004092,
0x00000DF7, 0x0007005F, 0x0000001D, 0x00004AB1, 0x00004092, 0x00001B4E,
0x00000002, 0x00000A0B, 0x00050051, 0x0000000D, 0x00004D13, 0x00004AB1,
0x00000000, 0x00050051, 0x0000000D, 0x00001B13, 0x00004AB1, 0x00000001,
0x00050051, 0x0000000D, 0x0000472D, 0x00004AB1, 0x00000002, 0x00050080,
0x00000012, 0x00004F7E, 0x00001B4E, 0x00000720, 0x0004003D, 0x00000096,
0x0000409E, 0x00000DF7, 0x0007005F, 0x0000001D, 0x000022C5, 0x0000409E,
0x00004F7E, 0x00000002, 0x00000A0B, 0x00050051, 0x0000000D, 0x00004D14,
0x000022C5, 0x00000000, 0x00050051, 0x0000000D, 0x00001B14, 0x000022C5,
0x00000001, 0x00050051, 0x0000000D, 0x0000472E, 0x000022C5, 0x00000002,
0x00050080, 0x00000012, 0x00004F7F, 0x00001B4E, 0x00000723, 0x0004003D,
0x00000096, 0x0000409F, 0x00000DF7, 0x0007005F, 0x0000001D, 0x000022C6,
0x0000409F, 0x00004F7F, 0x00000002, 0x00000A0B, 0x00050051, 0x0000000D,
0x00004D15, 0x000022C6, 0x00000000, 0x00050051, 0x0000000D, 0x00005D1A,
0x000022C6, 0x00000001, 0x00050051, 0x0000000D, 0x00001B21, 0x000022C6,
0x00000002, 0x0007000C, 0x0000000D, 0x00003C0C, 0x00000001, 0x00000025,
0x00004D12, 0x00004D14, 0x0007000C, 0x0000000D, 0x0000623F, 0x00000001,
0x00000025, 0x00004D11, 0x00003C0C, 0x0007000C, 0x0000000D, 0x00003E4C,
0x00000001, 0x00000025, 0x0000623F, 0x00004D15, 0x0007000C, 0x0000000D,
0x00003E4D, 0x00000001, 0x00000025, 0x00006098, 0x00001B14, 0x0007000C,
0x0000000D, 0x00003E4E, 0x00000001, 0x00000025, 0x00001B12, 0x00003E4D,
0x0007000C, 0x0000000D, 0x00003E4F, 0x00000001, 0x00000025, 0x00003E4E,
0x00005D1A, 0x0007000C, 0x0000000D, 0x00003E50, 0x00000001, 0x00000025,
0x00002C7A, 0x0000472E, 0x0007000C, 0x0000000D, 0x00003E51, 0x00000001,
0x00000025, 0x0000472C, 0x00003E50, 0x0007000C, 0x0000000D, 0x00002A99,
0x00000001, 0x00000025, 0x00003E51, 0x00001B21, 0x0007000C, 0x0000000D,
0x00005EE8, 0x00000001, 0x00000028, 0x00004D12, 0x00004D14, 0x0007000C,
0x0000000D, 0x00004473, 0x00000001, 0x00000028, 0x00004D11, 0x00005EE8,
0x0007000C, 0x0000000D, 0x0000555B, 0x00000001, 0x00000028, 0x00004473,
0x00004D15, 0x0007000C, 0x0000000D, 0x0000555C, 0x00000001, 0x00000028,
0x00006098, 0x00001B14, 0x0007000C, 0x0000000D, 0x0000555D, 0x00000001,
0x00000028, 0x00001B12, 0x0000555C, 0x0007000C, 0x0000000D, 0x0000555E,
0x00000001, 0x00000028, 0x0000555D, 0x00005D1A, 0x0007000C, 0x0000000D,
0x0000555F, 0x00000001, 0x00000028, 0x00002C7A, 0x0000472E, 0x0007000C,
0x0000000D, 0x00005558, 0x00000001, 0x00000028, 0x0000472C, 0x0000555F,
0x0007000C, 0x0000000D, 0x0000279E, 0x00000001, 0x00000028, 0x00005558,
0x00001B21, 0x0007000C, 0x0000000D, 0x000060BA, 0x00000001, 0x00000025,
0x00003E4C, 0x00004D13, 0x00050088, 0x0000000D, 0x000055ED, 0x0000016E,
0x0000555B, 0x00050085, 0x0000000D, 0x00002889, 0x000060BA, 0x000055ED,
0x0007000C, 0x0000000D, 0x0000534F, 0x00000001, 0x00000025, 0x00003E4F,
0x00001B13, 0x00050088, 0x0000000D, 0x0000442E, 0x0000016E, 0x0000555E,
0x00050085, 0x0000000D, 0x0000288A, 0x0000534F, 0x0000442E, 0x0007000C,
0x0000000D, 0x00005350, 0x00000001, 0x00000025, 0x00002A99, 0x0000472D,
0x00050088, 0x0000000D, 0x00004431, 0x0000016E, 0x0000279E, 0x00050085,
0x0000000D, 0x00005EF3, 0x00005350, 0x00004431, 0x0007000C, 0x0000000D,
0x00004080, 0x00000001, 0x00000028, 0x0000555B, 0x00004D13, 0x00050083,
0x0000000D, 0x00005683, 0x0000008A, 0x00004080, 0x00050085, 0x0000000D,
0x000034E8, 0x00000B69, 0x00003E4C, 0x00050081, 0x0000000D, 0x00004B7B,
0x000034E8, 0x0000025D, 0x00050088, 0x0000000D, 0x00004E56, 0x0000008A,
0x00004B7B, 0x00050085, 0x0000000D, 0x00005182, 0x00005683, 0x00004E56,
0x0007000C, 0x0000000D, 0x00004081, 0x00000001, 0x00000028, 0x0000555E,
0x00001B13, 0x00050083, 0x0000000D, 0x00005684, 0x0000008A, 0x00004081,
0x00050085, 0x0000000D, 0x000034E9, 0x00000B69, 0x00003E4F, 0x00050081,
0x0000000D, 0x00004B7C, 0x000034E9, 0x0000025D, 0x00050088, 0x0000000D,
0x00004E57, 0x0000008A, 0x00004B7C, 0x00050085, 0x0000000D, 0x00005183,
0x00005684, 0x00004E57, 0x0007000C, 0x0000000D, 0x00004082, 0x00000001,
0x00000028, 0x0000279E, 0x0000472D, 0x00050083, 0x0000000D, 0x00005685,
0x0000008A, 0x00004082, 0x00050085, 0x0000000D, 0x000034EA, 0x00000B69,
0x00002A99, 0x00050081, 0x0000000D, 0x00004B7D, 0x000034EA, 0x0000025D,
0x00050088, 0x0000000D, 0x000056B7, 0x0000008A, 0x00004B7D, 0x00050085,
0x0000000D, 0x00003B46, 0x00005685, 0x000056B7, 0x0004007F, 0x0000000D,
0x00005754, 0x00002889, 0x0007000C, 0x0000000D, 0x00005C99, 0x00000001,
0x00000028, 0x00005754, 0x00005182, 0x0004007F, 0x0000000D, 0x00004019,
0x0000288A, 0x0007000C, 0x0000000D, 0x000023D9, 0x00000001, 0x00000028,
0x00004019, 0x00005183, 0x0004007F, 0x0000000D, 0x000037B8, 0x00005EF3,
0x0007000C, 0x0000000D, 0x00003168, 0x00000001, 0x00000028, 0x000037B8,
0x00003B46, 0x0007000C, 0x0000000D, 0x000049EB, 0x00000001, 0x00000028,
0x000023D9, 0x00003168, 0x0007000C, 0x0000000D, 0x00001E92, 0x00000001,
0x00000028, 0x00005C99, 0x000049EB, 0x0007000C, 0x0000000D, 0x00002934,
0x00000001, 0x00000025, 0x00001E92, 0x00000A0C, 0x0007000C, 0x0000000D,
0x0000229C, 0x00000001, 0x00000028, 0x0000045E, 0x00002934, 0x0004007C,
0x0000000D, 0x00005830, 0x00004046, 0x00050085, 0x0000000D, 0x000051B7,
0x0000229C, 0x00005830, 0x00050085, 0x0000000D, 0x00005B14, 0x00000B69,
0x000051B7, 0x00050081, 0x0000000D, 0x00004072, 0x00005B14, 0x0000008A,
0x0004007C, 0x0000000B, 0x00001997, 0x00004072, 0x00050082, 0x0000000B,
0x00001D8B, 0x000000B2, 0x00001997, 0x0004007C, 0x0000000D, 0x000024CB,
0x00001D8B, 0x0004007F, 0x0000000D, 0x000023AA, 0x000024CB, 0x00050085,
0x0000000D, 0x0000304F, 0x000023AA, 0x00004072, 0x00050081, 0x0000000D,
0x0000409C, 0x0000304F, 0x00000018, 0x00050085, 0x0000000D, 0x00002496,
0x000024CB, 0x0000409C, 0x00050081, 0x0000000D, 0x0000499D, 0x00004D11,
0x00004D12, 0x00050081, 0x0000000D, 0x00005A67, 0x0000499D, 0x00004D15,
0x00050081, 0x0000000D, 0x00001987, 0x00005A67, 0x00004D14, 0x00050085,
0x0000000D, 0x00003181, 0x000051B7, 0x00001987, 0x00050081, 0x0000000D,
0x000046E9, 0x00003181, 0x00004D13, 0x00050085, 0x0000000D, 0x00002497,
0x000046E9, 0x00002496, 0x00050081, 0x0000000D, 0x0000499E, 0x00001B12,
0x00006098, 0x00050081, 0x0000000D, 0x00005A68, 0x0000499E, 0x00005D1A,
0x00050081, 0x0000000D, 0x00001988, 0x00005A68, 0x00001B14, 0x00050085,
0x0000000D, 0x00003182, 0x000051B7, 0x00001988, 0x00050081, 0x0000000D,
0x000046EA, 0x00003182, 0x00001B13, 0x00050085, 0x0000000D, 0x00002498,
0x000046EA, 0x00002496, 0x00050081, 0x0000000D, 0x0000499F, 0x0000472C,
0x00002C7A, 0x00050081, 0x0000000D, 0x00005A69, 0x0000499F, 0x00001B21,
0x00050081, 0x0000000D, 0x00001989, 0x00005A69, 0x0000472E, 0x00050085,
0x0000000D, 0x00003183, 0x000051B7, 0x00001989, 0x00050081, 0x0000000D,
0x00004346, 0x00003183, 0x0000472D, 0x00050085, 0x0000000D, 0x000040BA,
0x00004346, 0x00002496, 0x00070050, 0x0000001D, 0x0000395F, 0x00002497,
0x00002498, 0x000040BA, 0x0000008A, 0x0003003E, 0x00000CB5, 0x0000395F,
0x000100FD, 0x00010038,
};

View File

@@ -2,42 +2,59 @@
#if 0
; SPIR-V
; Version: 1.0
; Generator: Khronos Glslang Reference Front End; 10
; Generator: Khronos Glslang Reference Front End; 11
; Bound: 24012
; Schema: 0
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %5663 "main" %4930 %gl_VertexIndex
OpMemberDecorate %_struct_2935 0 BuiltIn Position
OpMemberDecorate %_struct_2935 1 BuiltIn PointSize
OpMemberDecorate %_struct_2935 2 BuiltIn ClipDistance
OpMemberDecorate %_struct_2935 3 BuiltIn CullDistance
OpDecorate %_struct_2935 Block
OpMemberDecorate %_struct_1030 0 Offset 0
OpMemberDecorate %_struct_1030 1 Offset 8
OpDecorate %_struct_1030 Block
OpEntryPoint Vertex %main "main" %_ %gl_VertexIndex
OpSource GLSL 460
OpSourceExtension "GL_EXT_control_flow_attributes"
OpSourceExtension "GL_EXT_samplerless_texture_functions"
OpSourceExtension "GL_GOOGLE_cpp_style_line_directive"
OpSourceExtension "GL_GOOGLE_include_directive"
OpName %main "main"
OpName %gl_PerVertex "gl_PerVertex"
OpMemberName %gl_PerVertex 0 "gl_Position"
OpMemberName %gl_PerVertex 1 "gl_PointSize"
OpMemberName %gl_PerVertex 2 "gl_ClipDistance"
OpMemberName %gl_PerVertex 3 "gl_CullDistance"
OpName %_ ""
OpName %push_const_block_xe "push_const_block_xe"
OpMemberName %push_const_block_xe 0 "xe_triangle_strip_rect_offset"
OpMemberName %push_const_block_xe 1 "xe_triangle_strip_rect_size"
OpName %push_consts_xe "push_consts_xe"
OpName %gl_VertexIndex "gl_VertexIndex"
OpDecorate %gl_PerVertex Block
OpMemberDecorate %gl_PerVertex 0 BuiltIn Position
OpMemberDecorate %gl_PerVertex 1 BuiltIn PointSize
OpMemberDecorate %gl_PerVertex 2 BuiltIn ClipDistance
OpMemberDecorate %gl_PerVertex 3 BuiltIn CullDistance
OpDecorate %push_const_block_xe Block
OpMemberDecorate %push_const_block_xe 0 Offset 0
OpMemberDecorate %push_const_block_xe 1 Offset 8
OpDecorate %gl_VertexIndex BuiltIn VertexIndex
%void = OpTypeVoid
%1282 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_arr_float_uint_1 = OpTypeArray %float %uint_1
%_struct_2935 = OpTypeStruct %v4float %float %_arr_float_uint_1 %_arr_float_uint_1
%_ptr_Output__struct_2935 = OpTypePointer Output %_struct_2935
%4930 = OpVariable %_ptr_Output__struct_2935 Output
%gl_PerVertex = OpTypeStruct %v4float %float %_arr_float_uint_1 %_arr_float_uint_1
%_ptr_Output_gl_PerVertex = OpTypePointer Output %gl_PerVertex
%_ = OpVariable %_ptr_Output_gl_PerVertex Output
%int = OpTypeInt 32 1
%int_0 = OpConstant %int 0
%v2float = OpTypeVector %float 2
%_struct_1030 = OpTypeStruct %v2float %v2float
%_ptr_PushConstant__struct_1030 = OpTypePointer PushConstant %_struct_1030
%4495 = OpVariable %_ptr_PushConstant__struct_1030 PushConstant
%push_const_block_xe = OpTypeStruct %v2float %v2float
%_ptr_PushConstant_push_const_block_xe = OpTypePointer PushConstant %push_const_block_xe
%push_consts_xe = OpVariable %_ptr_PushConstant_push_const_block_xe PushConstant
%_ptr_PushConstant_v2float = OpTypePointer PushConstant %v2float
%_ptr_Input_int = OpTypePointer Input %int
%gl_VertexIndex = OpVariable %_ptr_Input_int Input
%v2uint = OpTypeVector %uint 2
%uint_0 = OpConstant %uint 0
%1819 = OpConstantComposite %v2uint %uint_0 %uint_1
%int_1 = OpConstant %int 1
@@ -45,9 +62,9 @@
%float_1 = OpConstant %float 1
%_ptr_Output_v4float = OpTypePointer Output %v4float
%1828 = OpConstantComposite %v2uint %uint_1 %uint_1
%5663 = OpFunction %void None %1282
%main = OpFunction %void None %1282
%23915 = OpLabel
%7053 = OpAccessChain %_ptr_PushConstant_v2float %4495 %int_0
%7053 = OpAccessChain %_ptr_PushConstant_v2float %push_consts_xe %int_0
%17516 = OpLoad %v2float %7053
%23241 = OpLoad %int %gl_VertexIndex
%9480 = OpBitcast %uint %23241
@@ -55,62 +72,82 @@
%14991 = OpShiftRightLogical %v2uint %15408 %1819
%17567 = OpBitwiseAnd %v2uint %14991 %1828
%7856 = OpConvertUToF %v2float %17567
%12606 = OpAccessChain %_ptr_PushConstant_v2float %4495 %int_1
%12606 = OpAccessChain %_ptr_PushConstant_v2float %push_consts_xe %int_1
%24011 = OpLoad %v2float %12606
%17243 = OpFMul %v2float %7856 %24011
%16594 = OpFAdd %v2float %17516 %17243
%10599 = OpCompositeExtract %float %16594 0
%13956 = OpCompositeExtract %float %16594 1
%18260 = OpCompositeConstruct %v4float %10599 %13956 %float_0 %float_1
%12055 = OpAccessChain %_ptr_Output_v4float %4930 %int_0
%12055 = OpAccessChain %_ptr_Output_v4float %_ %int_0
OpStore %12055 %18260
OpReturn
OpFunctionEnd
#endif
const uint32_t guest_output_triangle_strip_rect_vs[] = {
0x07230203, 0x00010000, 0x0008000A, 0x00005DCC, 0x00000000, 0x00020011,
0x07230203, 0x00010000, 0x0008000B, 0x00005DCC, 0x00000000, 0x00020011,
0x00000001, 0x0006000B, 0x00000001, 0x4C534C47, 0x6474732E, 0x3035342E,
0x00000000, 0x0003000E, 0x00000000, 0x00000001, 0x0007000F, 0x00000000,
0x0000161F, 0x6E69616D, 0x00000000, 0x00001342, 0x00001029, 0x00050048,
0x00000B77, 0x00000000, 0x0000000B, 0x00000000, 0x00050048, 0x00000B77,
0x00000001, 0x0000000B, 0x00000001, 0x00050048, 0x00000B77, 0x00000002,
0x0000000B, 0x00000003, 0x00050048, 0x00000B77, 0x00000003, 0x0000000B,
0x00000004, 0x00030047, 0x00000B77, 0x00000002, 0x00050048, 0x00000406,
0x00000000, 0x00000023, 0x00000000, 0x00050048, 0x00000406, 0x00000001,
0x00000023, 0x00000008, 0x00030047, 0x00000406, 0x00000002, 0x00040047,
0x00001029, 0x0000000B, 0x0000002A, 0x00020013, 0x00000008, 0x00030021,
0x00000502, 0x00000008, 0x00030016, 0x0000000D, 0x00000020, 0x00040017,
0x0000001D, 0x0000000D, 0x00000004, 0x00040015, 0x0000000B, 0x00000020,
0x00000000, 0x0004002B, 0x0000000B, 0x00000A0D, 0x00000001, 0x0004001C,
0x0000022A, 0x0000000D, 0x00000A0D, 0x0006001E, 0x00000B77, 0x0000001D,
0x0000000D, 0x0000022A, 0x0000022A, 0x00040020, 0x00000231, 0x00000003,
0x00000B77, 0x0004003B, 0x00000231, 0x00001342, 0x00000003, 0x00040015,
0x0000000C, 0x00000020, 0x00000001, 0x0004002B, 0x0000000C, 0x00000A0B,
0x00000000, 0x00040017, 0x00000013, 0x0000000D, 0x00000002, 0x0004001E,
0x00000406, 0x00000013, 0x00000013, 0x00040020, 0x00000683, 0x00000009,
0x00000406, 0x0004003B, 0x00000683, 0x0000118F, 0x00000009, 0x00040020,
0x00000290, 0x00000009, 0x00000013, 0x00040020, 0x00000289, 0x00000001,
0x0000000C, 0x0004003B, 0x00000289, 0x00001029, 0x00000001, 0x00040017,
0x00000011, 0x0000000B, 0x00000002, 0x0004002B, 0x0000000B, 0x00000A0A,
0x00000000, 0x0005002C, 0x00000011, 0x0000071B, 0x00000A0A, 0x00000A0D,
0x0004002B, 0x0000000C, 0x00000A0E, 0x00000001, 0x0004002B, 0x0000000D,
0x00000A0C, 0x00000000, 0x0004002B, 0x0000000D, 0x0000008A, 0x3F800000,
0x00040020, 0x0000029A, 0x00000003, 0x0000001D, 0x0005002C, 0x00000011,
0x00000724, 0x00000A0D, 0x00000A0D, 0x00050036, 0x00000008, 0x0000161F,
0x00000000, 0x00000502, 0x000200F8, 0x00005D6B, 0x00050041, 0x00000290,
0x00001B8D, 0x0000118F, 0x00000A0B, 0x0004003D, 0x00000013, 0x0000446C,
0x00001B8D, 0x0004003D, 0x0000000C, 0x00005AC9, 0x00001029, 0x0004007C,
0x0000000B, 0x00002508, 0x00005AC9, 0x00050050, 0x00000011, 0x00003C30,
0x00002508, 0x00002508, 0x000500C2, 0x00000011, 0x00003A8F, 0x00003C30,
0x0000071B, 0x000500C7, 0x00000011, 0x0000449F, 0x00003A8F, 0x00000724,
0x00040070, 0x00000013, 0x00001EB0, 0x0000449F, 0x00050041, 0x00000290,
0x0000313E, 0x0000118F, 0x00000A0E, 0x0004003D, 0x00000013, 0x00005DCB,
0x0000313E, 0x00050085, 0x00000013, 0x0000435B, 0x00001EB0, 0x00005DCB,
0x00050081, 0x00000013, 0x000040D2, 0x0000446C, 0x0000435B, 0x00050051,
0x0000000D, 0x00002967, 0x000040D2, 0x00000000, 0x00050051, 0x0000000D,
0x00003684, 0x000040D2, 0x00000001, 0x00070050, 0x0000001D, 0x00004754,
0x00002967, 0x00003684, 0x00000A0C, 0x0000008A, 0x00050041, 0x0000029A,
0x00002F17, 0x00001342, 0x00000A0B, 0x0003003E, 0x00002F17, 0x00004754,
0x000100FD, 0x00010038,
0x0000161F, 0x6E69616D, 0x00000000, 0x00001342, 0x00001029, 0x00030003,
0x00000002, 0x000001CC, 0x00090004, 0x455F4C47, 0x635F5458, 0x72746E6F,
0x665F6C6F, 0x5F776F6C, 0x72747461, 0x74756269, 0x00007365, 0x000B0004,
0x455F4C47, 0x735F5458, 0x6C706D61, 0x656C7265, 0x745F7373, 0x75747865,
0x665F6572, 0x74636E75, 0x736E6F69, 0x00000000, 0x000A0004, 0x475F4C47,
0x4C474F4F, 0x70635F45, 0x74735F70, 0x5F656C79, 0x656E696C, 0x7269645F,
0x69746365, 0x00006576, 0x00080004, 0x475F4C47, 0x4C474F4F, 0x6E695F45,
0x64756C63, 0x69645F65, 0x74636572, 0x00657669, 0x00040005, 0x0000161F,
0x6E69616D, 0x00000000, 0x00060005, 0x00000176, 0x505F6C67, 0x65567265,
0x78657472, 0x00000000, 0x00060006, 0x00000176, 0x00000000, 0x505F6C67,
0x7469736F, 0x006E6F69, 0x00070006, 0x00000176, 0x00000001, 0x505F6C67,
0x746E696F, 0x657A6953, 0x00000000, 0x00070006, 0x00000176, 0x00000002,
0x435F6C67, 0x4470696C, 0x61747369, 0x0065636E, 0x00070006, 0x00000176,
0x00000003, 0x435F6C67, 0x446C6C75, 0x61747369, 0x0065636E, 0x00030005,
0x00001342, 0x00000000, 0x00070005, 0x00000406, 0x68737570, 0x6E6F635F,
0x625F7473, 0x6B636F6C, 0x0065785F, 0x000B0006, 0x00000406, 0x00000000,
0x745F6578, 0x6E616972, 0x5F656C67, 0x69727473, 0x65725F70, 0x6F5F7463,
0x65736666, 0x00000074, 0x000A0006, 0x00000406, 0x00000001, 0x745F6578,
0x6E616972, 0x5F656C67, 0x69727473, 0x65725F70, 0x735F7463, 0x00657A69,
0x00060005, 0x00000CE9, 0x68737570, 0x6E6F635F, 0x5F737473, 0x00006578,
0x00060005, 0x00001029, 0x565F6C67, 0x65747265, 0x646E4978, 0x00007865,
0x00030047, 0x00000176, 0x00000002, 0x00050048, 0x00000176, 0x00000000,
0x0000000B, 0x00000000, 0x00050048, 0x00000176, 0x00000001, 0x0000000B,
0x00000001, 0x00050048, 0x00000176, 0x00000002, 0x0000000B, 0x00000003,
0x00050048, 0x00000176, 0x00000003, 0x0000000B, 0x00000004, 0x00030047,
0x00000406, 0x00000002, 0x00050048, 0x00000406, 0x00000000, 0x00000023,
0x00000000, 0x00050048, 0x00000406, 0x00000001, 0x00000023, 0x00000008,
0x00040047, 0x00001029, 0x0000000B, 0x0000002A, 0x00020013, 0x00000008,
0x00030021, 0x00000502, 0x00000008, 0x00040015, 0x0000000B, 0x00000020,
0x00000000, 0x00040017, 0x00000011, 0x0000000B, 0x00000002, 0x00030016,
0x0000000D, 0x00000020, 0x00040017, 0x0000001D, 0x0000000D, 0x00000004,
0x0004002B, 0x0000000B, 0x00000A0D, 0x00000001, 0x0004001C, 0x0000025C,
0x0000000D, 0x00000A0D, 0x0006001E, 0x00000176, 0x0000001D, 0x0000000D,
0x0000025C, 0x0000025C, 0x00040020, 0x000003F3, 0x00000003, 0x00000176,
0x0004003B, 0x000003F3, 0x00001342, 0x00000003, 0x00040015, 0x0000000C,
0x00000020, 0x00000001, 0x0004002B, 0x0000000C, 0x00000A0B, 0x00000000,
0x00040017, 0x00000013, 0x0000000D, 0x00000002, 0x0004001E, 0x00000406,
0x00000013, 0x00000013, 0x00040020, 0x00000683, 0x00000009, 0x00000406,
0x0004003B, 0x00000683, 0x00000CE9, 0x00000009, 0x00040020, 0x00000290,
0x00000009, 0x00000013, 0x00040020, 0x00000289, 0x00000001, 0x0000000C,
0x0004003B, 0x00000289, 0x00001029, 0x00000001, 0x0004002B, 0x0000000B,
0x00000A0A, 0x00000000, 0x0005002C, 0x00000011, 0x0000071B, 0x00000A0A,
0x00000A0D, 0x0004002B, 0x0000000C, 0x00000A0E, 0x00000001, 0x0004002B,
0x0000000D, 0x00000A0C, 0x00000000, 0x0004002B, 0x0000000D, 0x0000008A,
0x3F800000, 0x00040020, 0x0000029A, 0x00000003, 0x0000001D, 0x0005002C,
0x00000011, 0x00000724, 0x00000A0D, 0x00000A0D, 0x00050036, 0x00000008,
0x0000161F, 0x00000000, 0x00000502, 0x000200F8, 0x00005D6B, 0x00050041,
0x00000290, 0x00001B8D, 0x00000CE9, 0x00000A0B, 0x0004003D, 0x00000013,
0x0000446C, 0x00001B8D, 0x0004003D, 0x0000000C, 0x00005AC9, 0x00001029,
0x0004007C, 0x0000000B, 0x00002508, 0x00005AC9, 0x00050050, 0x00000011,
0x00003C30, 0x00002508, 0x00002508, 0x000500C2, 0x00000011, 0x00003A8F,
0x00003C30, 0x0000071B, 0x000500C7, 0x00000011, 0x0000449F, 0x00003A8F,
0x00000724, 0x00040070, 0x00000013, 0x00001EB0, 0x0000449F, 0x00050041,
0x00000290, 0x0000313E, 0x00000CE9, 0x00000A0E, 0x0004003D, 0x00000013,
0x00005DCB, 0x0000313E, 0x00050085, 0x00000013, 0x0000435B, 0x00001EB0,
0x00005DCB, 0x00050081, 0x00000013, 0x000040D2, 0x0000446C, 0x0000435B,
0x00050051, 0x0000000D, 0x00002967, 0x000040D2, 0x00000000, 0x00050051,
0x0000000D, 0x00003684, 0x000040D2, 0x00000001, 0x00070050, 0x0000001D,
0x00004754, 0x00002967, 0x00003684, 0x00000A0C, 0x0000008A, 0x00050041,
0x0000029A, 0x00002F17, 0x00001342, 0x00000A0B, 0x0003003E, 0x00002F17,
0x00004754, 0x000100FD, 0x00010038,
};

View File

@@ -2,71 +2,93 @@
#if 0
; SPIR-V
; Version: 1.0
; Generator: Khronos Glslang Reference Front End; 10
; Generator: Khronos Glslang Reference Front End; 11
; Bound: 24608
; Schema: 0
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %5663 "main" %3080 %5914 %4693
OpExecutionMode %5663 OriginUpperLeft
OpDecorate %3080 Location 0
OpDecorate %5914 Location 1
OpDecorate %5818 DescriptorSet 0
OpDecorate %5818 Binding 0
OpDecorate %4693 Location 0
OpEntryPoint Fragment %main "main" %xe_out_color %xe_in_color %xe_in_texcoord
OpExecutionMode %main OriginUpperLeft
OpSource GLSL 460
OpSourceExtension "GL_EXT_control_flow_attributes"
OpSourceExtension "GL_EXT_samplerless_texture_functions"
OpSourceExtension "GL_GOOGLE_cpp_style_line_directive"
OpSourceExtension "GL_GOOGLE_include_directive"
OpName %main "main"
OpName %xe_out_color "xe_out_color"
OpName %xe_in_color "xe_in_color"
OpName %xe_immediate_texture "xe_immediate_texture"
OpName %xe_in_texcoord "xe_in_texcoord"
OpDecorate %xe_out_color Location 0
OpDecorate %xe_in_color Location 1
OpDecorate %xe_immediate_texture Binding 0
OpDecorate %xe_immediate_texture DescriptorSet 0
OpDecorate %xe_in_texcoord Location 0
%void = OpTypeVoid
%1282 = OpTypeFunction %void
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%3080 = OpVariable %_ptr_Output_v4float Output
%xe_out_color = OpVariable %_ptr_Output_v4float Output
%_ptr_Input_v4float = OpTypePointer Input %v4float
%5914 = OpVariable %_ptr_Input_v4float Input
%xe_in_color = OpVariable %_ptr_Input_v4float Input
%150 = OpTypeImage %float 2D 0 0 0 1 Unknown
%510 = OpTypeSampledImage %150
%_ptr_UniformConstant_510 = OpTypePointer UniformConstant %510
%5818 = OpVariable %_ptr_UniformConstant_510 UniformConstant
%xe_immediate_texture = OpVariable %_ptr_UniformConstant_510 UniformConstant
%v2float = OpTypeVector %float 2
%_ptr_Input_v2float = OpTypePointer Input %v2float
%4693 = OpVariable %_ptr_Input_v2float Input
%xe_in_texcoord = OpVariable %_ptr_Input_v2float Input
%float_0 = OpConstant %float 0
%5663 = OpFunction %void None %1282
%main = OpFunction %void None %1282
%24607 = OpLabel
%20754 = OpLoad %v4float %5914
%24285 = OpLoad %510 %5818
%8179 = OpLoad %v2float %4693
%20754 = OpLoad %v4float %xe_in_color
%24285 = OpLoad %510 %xe_immediate_texture
%8179 = OpLoad %v2float %xe_in_texcoord
%6686 = OpImageSampleExplicitLod %v4float %24285 %8179 Lod %float_0
%8939 = OpFMul %v4float %20754 %6686
OpStore %3080 %8939
OpStore %xe_out_color %8939
OpReturn
OpFunctionEnd
#endif
const uint32_t immediate_ps[] = {
0x07230203, 0x00010000, 0x0008000A, 0x00006020, 0x00000000, 0x00020011,
0x07230203, 0x00010000, 0x0008000B, 0x00006020, 0x00000000, 0x00020011,
0x00000001, 0x0006000B, 0x00000001, 0x4C534C47, 0x6474732E, 0x3035342E,
0x00000000, 0x0003000E, 0x00000000, 0x00000001, 0x0008000F, 0x00000004,
0x0000161F, 0x6E69616D, 0x00000000, 0x00000C08, 0x0000171A, 0x00001255,
0x00030010, 0x0000161F, 0x00000007, 0x00040047, 0x00000C08, 0x0000001E,
0x00000000, 0x00040047, 0x0000171A, 0x0000001E, 0x00000001, 0x00040047,
0x000016BA, 0x00000022, 0x00000000, 0x00040047, 0x000016BA, 0x00000021,
0x00000000, 0x00040047, 0x00001255, 0x0000001E, 0x00000000, 0x00020013,
0x00000008, 0x00030021, 0x00000502, 0x00000008, 0x00030016, 0x0000000D,
0x00000020, 0x00040017, 0x0000001D, 0x0000000D, 0x00000004, 0x00040020,
0x0000029A, 0x00000003, 0x0000001D, 0x0004003B, 0x0000029A, 0x00000C08,
0x00000003, 0x00040020, 0x0000029B, 0x00000001, 0x0000001D, 0x0004003B,
0x0000029B, 0x0000171A, 0x00000001, 0x00090019, 0x00000096, 0x0000000D,
0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000,
0x0003001B, 0x000001FE, 0x00000096, 0x00040020, 0x0000047B, 0x00000000,
0x000001FE, 0x0004003B, 0x0000047B, 0x000016BA, 0x00000000, 0x00040017,
0x00000013, 0x0000000D, 0x00000002, 0x00040020, 0x00000290, 0x00000001,
0x00000013, 0x0004003B, 0x00000290, 0x00001255, 0x00000001, 0x0004002B,
0x0000000D, 0x00000A0C, 0x00000000, 0x00050036, 0x00000008, 0x0000161F,
0x00000000, 0x00000502, 0x000200F8, 0x0000601F, 0x0004003D, 0x0000001D,
0x00005112, 0x0000171A, 0x0004003D, 0x000001FE, 0x00005EDD, 0x000016BA,
0x0004003D, 0x00000013, 0x00001FF3, 0x00001255, 0x00070058, 0x0000001D,
0x00001A1E, 0x00005EDD, 0x00001FF3, 0x00000002, 0x00000A0C, 0x00050085,
0x0000001D, 0x000022EB, 0x00005112, 0x00001A1E, 0x0003003E, 0x00000C08,
0x000022EB, 0x000100FD, 0x00010038,
0x00030010, 0x0000161F, 0x00000007, 0x00030003, 0x00000002, 0x000001CC,
0x00090004, 0x455F4C47, 0x635F5458, 0x72746E6F, 0x665F6C6F, 0x5F776F6C,
0x72747461, 0x74756269, 0x00007365, 0x000B0004, 0x455F4C47, 0x735F5458,
0x6C706D61, 0x656C7265, 0x745F7373, 0x75747865, 0x665F6572, 0x74636E75,
0x736E6F69, 0x00000000, 0x000A0004, 0x475F4C47, 0x4C474F4F, 0x70635F45,
0x74735F70, 0x5F656C79, 0x656E696C, 0x7269645F, 0x69746365, 0x00006576,
0x00080004, 0x475F4C47, 0x4C474F4F, 0x6E695F45, 0x64756C63, 0x69645F65,
0x74636572, 0x00657669, 0x00040005, 0x0000161F, 0x6E69616D, 0x00000000,
0x00060005, 0x00000C08, 0x6F5F6578, 0x635F7475, 0x726F6C6F, 0x00000000,
0x00050005, 0x0000171A, 0x695F6578, 0x6F635F6E, 0x00726F6C, 0x00080005,
0x000016BA, 0x695F6578, 0x64656D6D, 0x65746169, 0x7865745F, 0x65727574,
0x00000000, 0x00060005, 0x00001255, 0x695F6578, 0x65745F6E, 0x6F6F6378,
0x00006472, 0x00040047, 0x00000C08, 0x0000001E, 0x00000000, 0x00040047,
0x0000171A, 0x0000001E, 0x00000001, 0x00040047, 0x000016BA, 0x00000021,
0x00000000, 0x00040047, 0x000016BA, 0x00000022, 0x00000000, 0x00040047,
0x00001255, 0x0000001E, 0x00000000, 0x00020013, 0x00000008, 0x00030021,
0x00000502, 0x00000008, 0x00030016, 0x0000000D, 0x00000020, 0x00040017,
0x0000001D, 0x0000000D, 0x00000004, 0x00040020, 0x0000029A, 0x00000003,
0x0000001D, 0x0004003B, 0x0000029A, 0x00000C08, 0x00000003, 0x00040020,
0x0000029B, 0x00000001, 0x0000001D, 0x0004003B, 0x0000029B, 0x0000171A,
0x00000001, 0x00090019, 0x00000096, 0x0000000D, 0x00000001, 0x00000000,
0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x0003001B, 0x000001FE,
0x00000096, 0x00040020, 0x0000047B, 0x00000000, 0x000001FE, 0x0004003B,
0x0000047B, 0x000016BA, 0x00000000, 0x00040017, 0x00000013, 0x0000000D,
0x00000002, 0x00040020, 0x00000290, 0x00000001, 0x00000013, 0x0004003B,
0x00000290, 0x00001255, 0x00000001, 0x0004002B, 0x0000000D, 0x00000A0C,
0x00000000, 0x00050036, 0x00000008, 0x0000161F, 0x00000000, 0x00000502,
0x000200F8, 0x0000601F, 0x0004003D, 0x0000001D, 0x00005112, 0x0000171A,
0x0004003D, 0x000001FE, 0x00005EDD, 0x000016BA, 0x0004003D, 0x00000013,
0x00001FF3, 0x00001255, 0x00070058, 0x0000001D, 0x00001A1E, 0x00005EDD,
0x00001FF3, 0x00000002, 0x00000A0C, 0x00050085, 0x0000001D, 0x000022EB,
0x00005112, 0x00001A1E, 0x0003003E, 0x00000C08, 0x000022EB, 0x000100FD,
0x00010038,
};

View File

@@ -2,64 +2,84 @@
#if 0
; SPIR-V
; Version: 1.0
; Generator: Khronos Glslang Reference Front End; 10
; Generator: Khronos Glslang Reference Front End; 11
; Bound: 24627
; Schema: 0
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %5663 "main" %4159 %4693 %3080 %5914 %4930 %5474
OpDecorate %4159 Location 0
OpDecorate %4693 Location 1
OpDecorate %3080 Location 1
OpDecorate %5914 Location 2
OpMemberDecorate %_struct_419 0 BuiltIn Position
OpMemberDecorate %_struct_419 1 BuiltIn PointSize
OpMemberDecorate %_struct_419 2 BuiltIn ClipDistance
OpMemberDecorate %_struct_419 3 BuiltIn CullDistance
OpDecorate %_struct_419 Block
OpDecorate %5474 Location 0
OpMemberDecorate %_struct_997 0 Offset 0
OpDecorate %_struct_997 Block
OpEntryPoint Vertex %main "main" %xe_out_texcoord %xe_in_texcoord %xe_out_color %xe_in_color %_ %xe_in_position
OpSource GLSL 460
OpSourceExtension "GL_EXT_control_flow_attributes"
OpSourceExtension "GL_EXT_samplerless_texture_functions"
OpSourceExtension "GL_GOOGLE_cpp_style_line_directive"
OpSourceExtension "GL_GOOGLE_include_directive"
OpName %main "main"
OpName %xe_out_texcoord "xe_out_texcoord"
OpName %xe_in_texcoord "xe_in_texcoord"
OpName %xe_out_color "xe_out_color"
OpName %xe_in_color "xe_in_color"
OpName %gl_PerVertex "gl_PerVertex"
OpMemberName %gl_PerVertex 0 "gl_Position"
OpMemberName %gl_PerVertex 1 "gl_PointSize"
OpMemberName %gl_PerVertex 2 "gl_ClipDistance"
OpMemberName %gl_PerVertex 3 "gl_CullDistance"
OpName %_ ""
OpName %xe_in_position "xe_in_position"
OpName %push_const_block_xe "push_const_block_xe"
OpMemberName %push_const_block_xe 0 "xe_coordinate_space_size_inv"
OpName %push_consts_xe "push_consts_xe"
OpDecorate %xe_out_texcoord Location 0
OpDecorate %xe_in_texcoord Location 1
OpDecorate %xe_out_color Location 1
OpDecorate %xe_in_color Location 2
OpDecorate %gl_PerVertex Block
OpMemberDecorate %gl_PerVertex 0 BuiltIn Position
OpMemberDecorate %gl_PerVertex 1 BuiltIn PointSize
OpMemberDecorate %gl_PerVertex 2 BuiltIn ClipDistance
OpMemberDecorate %gl_PerVertex 3 BuiltIn CullDistance
OpDecorate %xe_in_position Location 0
OpDecorate %push_const_block_xe Block
OpMemberDecorate %push_const_block_xe 0 Offset 0
%void = OpTypeVoid
%1282 = OpTypeFunction %void
%float = OpTypeFloat 32
%v2float = OpTypeVector %float 2
%_ptr_Output_v2float = OpTypePointer Output %v2float
%4159 = OpVariable %_ptr_Output_v2float Output
%xe_out_texcoord = OpVariable %_ptr_Output_v2float Output
%_ptr_Input_v2float = OpTypePointer Input %v2float
%4693 = OpVariable %_ptr_Input_v2float Input
%xe_in_texcoord = OpVariable %_ptr_Input_v2float Input
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%3080 = OpVariable %_ptr_Output_v4float Output
%xe_out_color = OpVariable %_ptr_Output_v4float Output
%_ptr_Input_v4float = OpTypePointer Input %v4float
%5914 = OpVariable %_ptr_Input_v4float Input
%xe_in_color = OpVariable %_ptr_Input_v4float Input
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_arr_float_uint_1 = OpTypeArray %float %uint_1
%_struct_419 = OpTypeStruct %v4float %float %_arr_float_uint_1 %_arr_float_uint_1
%_ptr_Output__struct_419 = OpTypePointer Output %_struct_419
%4930 = OpVariable %_ptr_Output__struct_419 Output
%gl_PerVertex = OpTypeStruct %v4float %float %_arr_float_uint_1 %_arr_float_uint_1
%_ptr_Output_gl_PerVertex = OpTypePointer Output %gl_PerVertex
%_ = OpVariable %_ptr_Output_gl_PerVertex Output
%int = OpTypeInt 32 1
%int_0 = OpConstant %int 0
%5474 = OpVariable %_ptr_Input_v2float Input
%_struct_997 = OpTypeStruct %v2float
%_ptr_PushConstant__struct_997 = OpTypePointer PushConstant %_struct_997
%4495 = OpVariable %_ptr_PushConstant__struct_997 PushConstant
%xe_in_position = OpVariable %_ptr_Input_v2float Input
%push_const_block_xe = OpTypeStruct %v2float
%_ptr_PushConstant_push_const_block_xe = OpTypePointer PushConstant %push_const_block_xe
%push_consts_xe = OpVariable %_ptr_PushConstant_push_const_block_xe PushConstant
%_ptr_PushConstant_v2float = OpTypePointer PushConstant %v2float
%float_2 = OpConstant %float 2
%2981 = OpConstantComposite %v2float %float_2 %float_2
%float_1 = OpConstant %float 1
%768 = OpConstantComposite %v2float %float_1 %float_1
%float_0 = OpConstant %float 0
%5663 = OpFunction %void None %1282
%main = OpFunction %void None %1282
%24626 = OpLabel
%20581 = OpLoad %v2float %4693
OpStore %4159 %20581
%11060 = OpLoad %v4float %5914
OpStore %3080 %11060
%10541 = OpLoad %v2float %5474
%22255 = OpAccessChain %_ptr_PushConstant_v2float %4495 %int_0
%20581 = OpLoad %v2float %xe_in_texcoord
OpStore %xe_out_texcoord %20581
%11060 = OpLoad %v4float %xe_in_color
OpStore %xe_out_color %11060
%10541 = OpLoad %v2float %xe_in_position
%22255 = OpAccessChain %_ptr_PushConstant_v2float %push_consts_xe %int_0
%12012 = OpLoad %v2float %22255
%17501 = OpFMul %v2float %10541 %12012
%13314 = OpFMul %v2float %17501 %2981
@@ -67,58 +87,80 @@
%22715 = OpCompositeExtract %float %6620 0
%15569 = OpCompositeExtract %float %6620 1
%18260 = OpCompositeConstruct %v4float %22715 %15569 %float_0 %float_1
%12055 = OpAccessChain %_ptr_Output_v4float %4930 %int_0
%12055 = OpAccessChain %_ptr_Output_v4float %_ %int_0
OpStore %12055 %18260
OpReturn
OpFunctionEnd
#endif
const uint32_t immediate_vs[] = {
0x07230203, 0x00010000, 0x0008000A, 0x00006033, 0x00000000, 0x00020011,
0x07230203, 0x00010000, 0x0008000B, 0x00006033, 0x00000000, 0x00020011,
0x00000001, 0x0006000B, 0x00000001, 0x4C534C47, 0x6474732E, 0x3035342E,
0x00000000, 0x0003000E, 0x00000000, 0x00000001, 0x000B000F, 0x00000000,
0x0000161F, 0x6E69616D, 0x00000000, 0x0000103F, 0x00001255, 0x00000C08,
0x0000171A, 0x00001342, 0x00001562, 0x00040047, 0x0000103F, 0x0000001E,
0x00000000, 0x00040047, 0x00001255, 0x0000001E, 0x00000001, 0x00040047,
0x00000C08, 0x0000001E, 0x00000001, 0x00040047, 0x0000171A, 0x0000001E,
0x00000002, 0x00050048, 0x000001A3, 0x00000000, 0x0000000B, 0x00000000,
0x00050048, 0x000001A3, 0x00000001, 0x0000000B, 0x00000001, 0x00050048,
0x000001A3, 0x00000002, 0x0000000B, 0x00000003, 0x00050048, 0x000001A3,
0x00000003, 0x0000000B, 0x00000004, 0x00030047, 0x000001A3, 0x00000002,
0x00040047, 0x00001562, 0x0000001E, 0x00000000, 0x00050048, 0x000003E5,
0x00000000, 0x00000023, 0x00000000, 0x00030047, 0x000003E5, 0x00000002,
0x00020013, 0x00000008, 0x00030021, 0x00000502, 0x00000008, 0x00030016,
0x0000000D, 0x00000020, 0x00040017, 0x00000013, 0x0000000D, 0x00000002,
0x00040020, 0x00000290, 0x00000003, 0x00000013, 0x0004003B, 0x00000290,
0x0000103F, 0x00000003, 0x00040020, 0x00000291, 0x00000001, 0x00000013,
0x0004003B, 0x00000291, 0x00001255, 0x00000001, 0x00040017, 0x0000001D,
0x0000000D, 0x00000004, 0x00040020, 0x0000029A, 0x00000003, 0x0000001D,
0x0004003B, 0x0000029A, 0x00000C08, 0x00000003, 0x00040020, 0x0000029B,
0x00000001, 0x0000001D, 0x0004003B, 0x0000029B, 0x0000171A, 0x00000001,
0x00040015, 0x0000000B, 0x00000020, 0x00000000, 0x0004002B, 0x0000000B,
0x00000A0D, 0x00000001, 0x0004001C, 0x00000261, 0x0000000D, 0x00000A0D,
0x0006001E, 0x000001A3, 0x0000001D, 0x0000000D, 0x00000261, 0x00000261,
0x00040020, 0x00000420, 0x00000003, 0x000001A3, 0x0004003B, 0x00000420,
0x00001342, 0x00000003, 0x00040015, 0x0000000C, 0x00000020, 0x00000001,
0x0004002B, 0x0000000C, 0x00000A0B, 0x00000000, 0x0004003B, 0x00000291,
0x00001562, 0x00000001, 0x0003001E, 0x000003E5, 0x00000013, 0x00040020,
0x00000662, 0x00000009, 0x000003E5, 0x0004003B, 0x00000662, 0x0000118F,
0x00000009, 0x00040020, 0x00000292, 0x00000009, 0x00000013, 0x0004002B,
0x0000000D, 0x00000018, 0x40000000, 0x0005002C, 0x00000013, 0x00000BA5,
0x00000018, 0x00000018, 0x0004002B, 0x0000000D, 0x0000008A, 0x3F800000,
0x0005002C, 0x00000013, 0x00000300, 0x0000008A, 0x0000008A, 0x0004002B,
0x0000000D, 0x00000A0C, 0x00000000, 0x00050036, 0x00000008, 0x0000161F,
0x00000000, 0x00000502, 0x000200F8, 0x00006032, 0x0004003D, 0x00000013,
0x00005065, 0x00001255, 0x0003003E, 0x0000103F, 0x00005065, 0x0004003D,
0x0000001D, 0x00002B34, 0x0000171A, 0x0003003E, 0x00000C08, 0x00002B34,
0x0004003D, 0x00000013, 0x0000292D, 0x00001562, 0x00050041, 0x00000292,
0x000056EF, 0x0000118F, 0x00000A0B, 0x0004003D, 0x00000013, 0x00002EEC,
0x000056EF, 0x00050085, 0x00000013, 0x0000445D, 0x0000292D, 0x00002EEC,
0x00050085, 0x00000013, 0x00003402, 0x0000445D, 0x00000BA5, 0x00050083,
0x00000013, 0x000019DC, 0x00003402, 0x00000300, 0x00050051, 0x0000000D,
0x000058BB, 0x000019DC, 0x00000000, 0x00050051, 0x0000000D, 0x00003CD1,
0x000019DC, 0x00000001, 0x00070050, 0x0000001D, 0x00004754, 0x000058BB,
0x00003CD1, 0x00000A0C, 0x0000008A, 0x00050041, 0x0000029A, 0x00002F17,
0x00001342, 0x00000A0B, 0x0003003E, 0x00002F17, 0x00004754, 0x000100FD,
0x00010038,
0x0000171A, 0x00001342, 0x00001562, 0x00030003, 0x00000002, 0x000001CC,
0x00090004, 0x455F4C47, 0x635F5458, 0x72746E6F, 0x665F6C6F, 0x5F776F6C,
0x72747461, 0x74756269, 0x00007365, 0x000B0004, 0x455F4C47, 0x735F5458,
0x6C706D61, 0x656C7265, 0x745F7373, 0x75747865, 0x665F6572, 0x74636E75,
0x736E6F69, 0x00000000, 0x000A0004, 0x475F4C47, 0x4C474F4F, 0x70635F45,
0x74735F70, 0x5F656C79, 0x656E696C, 0x7269645F, 0x69746365, 0x00006576,
0x00080004, 0x475F4C47, 0x4C474F4F, 0x6E695F45, 0x64756C63, 0x69645F65,
0x74636572, 0x00657669, 0x00040005, 0x0000161F, 0x6E69616D, 0x00000000,
0x00060005, 0x0000103F, 0x6F5F6578, 0x745F7475, 0x6F637865, 0x0064726F,
0x00060005, 0x00001255, 0x695F6578, 0x65745F6E, 0x6F6F6378, 0x00006472,
0x00060005, 0x00000C08, 0x6F5F6578, 0x635F7475, 0x726F6C6F, 0x00000000,
0x00050005, 0x0000171A, 0x695F6578, 0x6F635F6E, 0x00726F6C, 0x00060005,
0x000001A3, 0x505F6C67, 0x65567265, 0x78657472, 0x00000000, 0x00060006,
0x000001A3, 0x00000000, 0x505F6C67, 0x7469736F, 0x006E6F69, 0x00070006,
0x000001A3, 0x00000001, 0x505F6C67, 0x746E696F, 0x657A6953, 0x00000000,
0x00070006, 0x000001A3, 0x00000002, 0x435F6C67, 0x4470696C, 0x61747369,
0x0065636E, 0x00070006, 0x000001A3, 0x00000003, 0x435F6C67, 0x446C6C75,
0x61747369, 0x0065636E, 0x00030005, 0x00001342, 0x00000000, 0x00060005,
0x00001562, 0x695F6578, 0x6F705F6E, 0x69746973, 0x00006E6F, 0x00070005,
0x000003E5, 0x68737570, 0x6E6F635F, 0x625F7473, 0x6B636F6C, 0x0065785F,
0x000B0006, 0x000003E5, 0x00000000, 0x635F6578, 0x64726F6F, 0x74616E69,
0x70735F65, 0x5F656361, 0x657A6973, 0x766E695F, 0x00000000, 0x00060005,
0x00000CE9, 0x68737570, 0x6E6F635F, 0x5F737473, 0x00006578, 0x00040047,
0x0000103F, 0x0000001E, 0x00000000, 0x00040047, 0x00001255, 0x0000001E,
0x00000001, 0x00040047, 0x00000C08, 0x0000001E, 0x00000001, 0x00040047,
0x0000171A, 0x0000001E, 0x00000002, 0x00030047, 0x000001A3, 0x00000002,
0x00050048, 0x000001A3, 0x00000000, 0x0000000B, 0x00000000, 0x00050048,
0x000001A3, 0x00000001, 0x0000000B, 0x00000001, 0x00050048, 0x000001A3,
0x00000002, 0x0000000B, 0x00000003, 0x00050048, 0x000001A3, 0x00000003,
0x0000000B, 0x00000004, 0x00040047, 0x00001562, 0x0000001E, 0x00000000,
0x00030047, 0x000003E5, 0x00000002, 0x00050048, 0x000003E5, 0x00000000,
0x00000023, 0x00000000, 0x00020013, 0x00000008, 0x00030021, 0x00000502,
0x00000008, 0x00030016, 0x0000000D, 0x00000020, 0x00040017, 0x00000013,
0x0000000D, 0x00000002, 0x00040020, 0x00000290, 0x00000003, 0x00000013,
0x0004003B, 0x00000290, 0x0000103F, 0x00000003, 0x00040020, 0x00000291,
0x00000001, 0x00000013, 0x0004003B, 0x00000291, 0x00001255, 0x00000001,
0x00040017, 0x0000001D, 0x0000000D, 0x00000004, 0x00040020, 0x0000029A,
0x00000003, 0x0000001D, 0x0004003B, 0x0000029A, 0x00000C08, 0x00000003,
0x00040020, 0x0000029B, 0x00000001, 0x0000001D, 0x0004003B, 0x0000029B,
0x0000171A, 0x00000001, 0x00040015, 0x0000000B, 0x00000020, 0x00000000,
0x0004002B, 0x0000000B, 0x00000A0D, 0x00000001, 0x0004001C, 0x00000261,
0x0000000D, 0x00000A0D, 0x0006001E, 0x000001A3, 0x0000001D, 0x0000000D,
0x00000261, 0x00000261, 0x00040020, 0x00000420, 0x00000003, 0x000001A3,
0x0004003B, 0x00000420, 0x00001342, 0x00000003, 0x00040015, 0x0000000C,
0x00000020, 0x00000001, 0x0004002B, 0x0000000C, 0x00000A0B, 0x00000000,
0x0004003B, 0x00000291, 0x00001562, 0x00000001, 0x0003001E, 0x000003E5,
0x00000013, 0x00040020, 0x00000662, 0x00000009, 0x000003E5, 0x0004003B,
0x00000662, 0x00000CE9, 0x00000009, 0x00040020, 0x00000292, 0x00000009,
0x00000013, 0x0004002B, 0x0000000D, 0x00000018, 0x40000000, 0x0005002C,
0x00000013, 0x00000BA5, 0x00000018, 0x00000018, 0x0004002B, 0x0000000D,
0x0000008A, 0x3F800000, 0x0005002C, 0x00000013, 0x00000300, 0x0000008A,
0x0000008A, 0x0004002B, 0x0000000D, 0x00000A0C, 0x00000000, 0x00050036,
0x00000008, 0x0000161F, 0x00000000, 0x00000502, 0x000200F8, 0x00006032,
0x0004003D, 0x00000013, 0x00005065, 0x00001255, 0x0003003E, 0x0000103F,
0x00005065, 0x0004003D, 0x0000001D, 0x00002B34, 0x0000171A, 0x0003003E,
0x00000C08, 0x00002B34, 0x0004003D, 0x00000013, 0x0000292D, 0x00001562,
0x00050041, 0x00000292, 0x000056EF, 0x00000CE9, 0x00000A0B, 0x0004003D,
0x00000013, 0x00002EEC, 0x000056EF, 0x00050085, 0x00000013, 0x0000445D,
0x0000292D, 0x00002EEC, 0x00050085, 0x00000013, 0x00003402, 0x0000445D,
0x00000BA5, 0x00050083, 0x00000013, 0x000019DC, 0x00003402, 0x00000300,
0x00050051, 0x0000000D, 0x000058BB, 0x000019DC, 0x00000000, 0x00050051,
0x0000000D, 0x00003CD1, 0x000019DC, 0x00000001, 0x00070050, 0x0000001D,
0x00004754, 0x000058BB, 0x00003CD1, 0x00000A0C, 0x0000008A, 0x00050041,
0x0000029A, 0x00002F17, 0x00001342, 0x00000A0B, 0x0003003E, 0x00002F17,
0x00004754, 0x000100FD, 0x00010038,
};

View File

@@ -14,7 +14,7 @@
#include "noise.xesli"
xesl_staticConst float xe_dither_8bpc_noise[] = {
static_const_xe float xe_dither_8bpc_noise[] = {
// The conversion to 8bpc in the fixed-function output-merger is done as
// floor(saturate(color) * 255.0 + 0.5). This dithering function effectively
// replaces that 0.5 offset, done for rounding to the nearest, with the noise.
@@ -31,11 +31,11 @@ xesl_staticConst float xe_dither_8bpc_noise[] = {
// the window system, for instance, provides a 10bpc render target (for which
// dithering is still done here for more consistency between displays, but
// some addition precision would still be desirable).
XeBlueNoise16x16Values0Until256(1.0 / 256.0 / 255.0,
(-0.5 + 0.5 / 256.0) / 255.0)
XeBlueNoise16x16Values0Until256(1.0f / 256.0f / 255.0f,
(-0.5f + 0.5f / 256.0f) / 255.0f)
};
float XeDitherOffset8bpc(xesl_uint2 pixel_coord) {
float XeDitherOffset8bpc(uint2_xe pixel_coord) {
pixel_coord &= 15u;
return xe_dither_8bpc_noise[pixel_coord.y * 16u + pixel_coord.x];
}

View File

@@ -13,31 +13,31 @@
#include "dither_8bpc.xesli"
#endif // XE_GUEST_OUTPUT_DITHER
xesl_pushConstants_begin(b0, space0)
push_const_begin_xe(b0, space0)
// 16 used by the vertex shader (GLSL push constant offsets are across
// stages).
xesl_block_offset_member(16, c0.x, xesl_int2, xe_bilinear_output_offset)
xesl_block_offset_member(24, c0.z, xesl_float2, xe_bilinear_output_size_inv)
xesl_pushConstants_end
block_offset_member_xe(16, c0.x, int2_xe, xe_bilinear_output_offset)
block_offset_member_xe(24, c0.z, float2_xe, xe_bilinear_output_size_inv)
push_const_end_xe
xesl_entry_outputs_begin
xesl_entry_output_target(xesl_float4, xe_bilinear_color, 0)
xesl_entry_outputs_end_stageInputs_begin
xesl_entry_stageInputs_end_bindings_begin_pixel
xesl_pushConstants_binding(buffer(0))
xesl_entry_binding_next
xesl_texture(xesl_texture2D, xe_bilinear_source, set=0, binding=0, t0, space0,
texture(0))
xesl_entry_binding_next
xesl_samplerState(xe_bilinear_sampler, set=0, binding=1, s0, space0,
sampler(0))
xesl_entry_bindings_end_inputs_begin
xesl_entry_input_fragCoord
xesl_entry_inputs_end_code_begin
xesl_uint2 pixel_coord =
xesl_uint2(xesl_int2(xesl_FragCoord.xy) -
xesl_pushConstant(xe_bilinear_output_offset));
xesl_float4 bilinear_color;
entry_outputs_begin_xe
entry_out_target_xe(float4_xe, xe_bilinear_color, 0)
entry_outputs_end_stage_inputs_begin_xe
entry_stage_inputs_end_bindings_begin_pixel_xe
push_const_binding_xe(buffer(0))
entry_binding_next_xe
texture_xe(texture_2d_xe, xe_bilinear_source, set=0, binding=0, t0, space0,
texture(0))
entry_binding_next_xe
sampler_state_xe(xe_bilinear_sampler, set=0, binding=1, s0, space0,
sampler(0))
entry_bindings_end_inputs_begin_xe
entry_in_pixel_coord_xe
entry_inputs_end_code_begin_xe
{
uint2_xe pixel_coord = uint2_xe(int2_xe(in_pixel_coord_xe.xy) -
push_const_xe(xe_bilinear_output_offset));
float4_xe bilinear_color;
// + 0.5 so the origin is at the pixel center, and at 1:1 the original pixel
// is taken.
// Interpolating the four colors in the perceptual space because doing it in
@@ -46,17 +46,18 @@ xesl_entry_inputs_end_code_begin
// too apparent (4D5307E6 HUD, for example, mainly the edges of the
// multiplayer score bars).
bilinear_color.rgb =
xesl_textureSampleLod2D_sep(
sample_sep_lod_2d_xe(
xe_bilinear_source, xe_bilinear_sampler,
(xesl_float2(pixel_coord) + 0.5) *
xesl_pushConstant(xe_bilinear_output_size_inv),
0.0).rgb;
(float2_xe(pixel_coord) + 0.5f) *
push_const_xe(xe_bilinear_output_size_inv),
0.0f).rgb;
#if XE_GUEST_OUTPUT_DITHER
// Clamping because on Vulkan, the surface may specify any format, including
// floating-point.
bilinear_color.rgb =
xesl_saturate(bilinear_color.rgb + XeDitherOffset8bpc(pixel_coord));
saturate_xe(bilinear_color.rgb + XeDitherOffset8bpc(pixel_coord));
#endif // XE_GUEST_OUTPUT_DITHER
bilinear_color.a = 1.0;
xesl_Output(xe_bilinear_color) = bilinear_color;
xesl_entry_code_end
bilinear_color.a = 1.0f;
out_xe(xe_bilinear_color) = bilinear_color;
}
entry_code_end_xe

View File

@@ -15,56 +15,52 @@
#include "dither_8bpc.xesli"
#endif // XE_GUEST_OUTPUT_DITHER
xesl_pushConstants_begin(b0, space0)
push_const_begin_xe(b0, space0)
// 16 used by the vertex shader (GLSL push constant offsets are across
// stages).
xesl_block_offset_member(16, c0.x, xesl_int2, xe_cas_output_offset)
block_offset_member_xe(16, c0.x, int2_xe, xe_cas_output_offset)
// CasSetup const0.xy.
xesl_block_offset_member(24, c0.z, xesl_float2,
xe_cas_input_output_size_ratio)
block_offset_member_xe(24, c0.z, float2_xe, xe_cas_input_output_size_ratio)
// CasSetup const1.x.
xesl_block_offset_member(32, c1.x, float, xe_cas_sharpness_post_setup)
xesl_pushConstants_end
block_offset_member_xe(32, c1.x, float, xe_cas_sharpness_post_setup)
push_const_end_xe
// FIXME(Triang3l): This approach doesn't work for MSL - the texture must be
// passed explicitly from the entry point's arguments to CasLoad.
// Forward declaration because CasLoad needs xe_cas_source from the entry point
// bindings.
void CasFilter(xesl_function_param_out(float, pixel_r),
xesl_function_param_out(float, pixel_g),
xesl_function_param_out(float, pixel_b),
xesl_uint2 pixel_position, xesl_uint4 const0, xesl_uint4 const1,
bool no_scaling);
void CasFilter(out_param_xe(float, pixel_r), out_param_xe(float, pixel_g),
out_param_xe(float, pixel_b), uint2_xe pixel_position,
uint4_xe const0, uint4_xe const1, bool no_scaling);
xesl_entry_outputs_begin
xesl_entry_output_target(xesl_float4, xe_cas_color, 0)
xesl_entry_outputs_end_stageInputs_begin
xesl_entry_stageInputs_end_bindings_begin_pixel
xesl_pushConstants_binding(buffer(0))
xesl_entry_binding_next
xesl_texture(xesl_texture2D, xe_cas_source, set=0, binding=0, t0, space0,
texture(0))
xesl_entry_bindings_end_inputs_begin
xesl_entry_input_fragCoord
xesl_entry_inputs_end_code_begin
xesl_uint2 pixel_coord =
xesl_uint2(xesl_int2(xesl_FragCoord.xy) -
xesl_pushConstant(xe_cas_output_offset));
entry_outputs_begin_xe
entry_out_target_xe(float4_xe, xe_cas_color, 0)
entry_outputs_end_stage_inputs_begin_xe
entry_stage_inputs_end_bindings_begin_pixel_xe
push_const_binding_xe(buffer(0))
entry_binding_next_xe
texture_xe(texture_2d_xe, xe_cas_source, set=0, binding=0, t0, space0,
texture(0))
entry_bindings_end_inputs_begin_xe
entry_in_pixel_coord_xe
entry_inputs_end_code_begin_xe
{
uint2_xe pixel_coord = uint2_xe(int2_xe(in_pixel_coord_xe.xy) -
push_const_xe(xe_cas_output_offset));
// CasSetup with smaller push constants usage.
xesl_uint4 cas_const_0 =
xesl_uint4(
xesl_floatBitsToUint(
xesl_pushConstant(xe_cas_input_output_size_ratio)),
xesl_floatBitsToUint(
0.5 * xesl_pushConstant(xe_cas_input_output_size_ratio) - 0.5));
xesl_uint4 cas_const_1 =
xesl_uint4(
xesl_floatBitsToUint(xesl_pushConstant(xe_cas_sharpness_post_setup)),
xesl_packHalf2x16(xesl_float2(
xesl_pushConstant(xe_cas_sharpness_post_setup), 0.0)),
xesl_floatBitsToUint(8.0), 0u);
xesl_float4 cas_color;
uint4_xe cas_const_0 =
uint4_xe(
float_bits_to_uint_xe(push_const_xe(xe_cas_input_output_size_ratio)),
float_bits_to_uint_xe(
0.5f * push_const_xe(xe_cas_input_output_size_ratio) - 0.5f));
uint4_xe cas_const_1 =
uint4_xe(
float_bits_to_uint_xe(push_const_xe(xe_cas_sharpness_post_setup)),
pack_half_2x16_xe(float2_xe(
push_const_xe(xe_cas_sharpness_post_setup), 0.0f)),
float_bits_to_uint_xe(8.0f), 0u);
float4_xe cas_color;
CasFilter(cas_color.r, cas_color.g, cas_color.b, pixel_coord, cas_const_0,
cas_const_1, false);
// Linear conversion approximation as recommended in the CAS presentation.
@@ -73,21 +69,21 @@ xesl_entry_inputs_end_code_begin
// Clamping because on Vulkan, the surface may specify any format, including
// floating-point.
cas_color.rgb =
xesl_saturate(cas_color.rgb + XeDitherOffset8bpc(pixel_coord));
saturate_xe(cas_color.rgb + XeDitherOffset8bpc(pixel_coord));
#endif // XE_GUEST_OUTPUT_DITHER
// Force alpha to 1 to make sure the surface won't be translucent.
cas_color.a = 1.0;
xesl_Output(xe_cas_color) = cas_color;
xesl_entry_code_end
cas_color.a = 1.0f;
out_xe(xe_cas_color) = cas_color;
}
entry_code_end_xe
#define A_GPU 1
#include "../../../../third_party/FidelityFX-CAS/ffx-cas/ffx_a.h"
xesl_float3 CasLoad(xesl_int2 p) {
return xesl_texelFetch2D(xe_cas_source, p, 0).rgb;
float3_xe CasLoad(int2_xe p) {
return texel_fetch_2d_xe(xe_cas_source, p, 0).rgb;
}
void CasInput(xesl_function_param_inout(float, r),
xesl_function_param_inout(float, g),
xesl_function_param_inout(float, b)) {
void CasInput(inout_param_xe(float, r), inout_param_xe(float, g),
inout_param_xe(float, b)) {
// Linear conversion approximation as recommended in the CAS presentation.
r *= r;
g *= g;

View File

@@ -15,49 +15,47 @@
#include "dither_8bpc.xesli"
#endif // XE_GUEST_OUTPUT_DITHER
xesl_pushConstants_begin(b0, space0)
push_const_begin_xe(b0, space0)
// 16 used by the vertex shader (GLSL push constant offsets are across
// stages).
xesl_block_offset_member(16, c0.x, xesl_int2, xe_cas_output_offset)
block_offset_member_xe(16, c0.x, int2_xe, xe_cas_output_offset)
// CasSetup const1.x.
xesl_block_offset_member(24, c0.z, float, xe_cas_sharpness_post_setup)
xesl_pushConstants_end
block_offset_member_xe(24, c0.z, float, xe_cas_sharpness_post_setup)
push_const_end_xe
// FIXME(Triang3l): This approach doesn't work for MSL - the texture must be
// passed explicitly from the entry point's arguments to CasLoad.
// Forward declaration because CasLoad needs xe_cas_source from the entry point
// bindings.
void CasFilter(xesl_function_param_out(float, pixel_r),
xesl_function_param_out(float, pixel_g),
xesl_function_param_out(float, pixel_b),
xesl_uint2 pixel_position, xesl_uint4 const0, xesl_uint4 const1,
bool no_scaling);
void CasFilter(out_param_xe(float, pixel_r), out_param_xe(float, pixel_g),
out_param_xe(float, pixel_b), uint2_xe pixel_position,
uint4_xe const0, uint4_xe const1, bool no_scaling);
xesl_entry_outputs_begin
xesl_entry_output_target(xesl_float4, xe_cas_color, 0)
xesl_entry_outputs_end_stageInputs_begin
xesl_entry_stageInputs_end_bindings_begin_pixel
xesl_pushConstants_binding(buffer(0))
xesl_entry_binding_next
xesl_texture(xesl_texture2D, xe_cas_source, set=0, binding=0, t0, space0,
texture(0))
xesl_entry_bindings_end_inputs_begin
xesl_entry_input_fragCoord
xesl_entry_inputs_end_code_begin
xesl_uint2 pixel_coord =
xesl_uint2(xesl_int2(xesl_FragCoord.xy) -
xesl_pushConstant(xe_cas_output_offset));
entry_outputs_begin_xe
entry_out_target_xe(float4_xe, xe_cas_color, 0)
entry_outputs_end_stage_inputs_begin_xe
entry_stage_inputs_end_bindings_begin_pixel_xe
push_const_binding_xe(buffer(0))
entry_binding_next_xe
texture_xe(texture_2d_xe, xe_cas_source, set=0, binding=0, t0, space0,
texture(0))
entry_bindings_end_inputs_begin_xe
entry_in_pixel_coord_xe
entry_inputs_end_code_begin_xe
{
uint2_xe pixel_coord = uint2_xe(int2_xe(in_pixel_coord_xe.xy) -
push_const_xe(xe_cas_output_offset));
// CasSetup with smaller push constants usage.
xesl_uint4 cas_const_0 =
xesl_floatBitsToUint(xesl_float4(1.0, 1.0, 0.0, 0.0));
xesl_uint4 cas_const_1 =
xesl_uint4(
xesl_floatBitsToUint(xesl_pushConstant(xe_cas_sharpness_post_setup)),
xesl_packHalf2x16(xesl_float2(
xesl_pushConstant(xe_cas_sharpness_post_setup), 0.0)),
xesl_floatBitsToUint(8.0), 0u);
xesl_float4 cas_color;
uint4_xe cas_const_0 =
float_bits_to_uint_xe(float4_xe(1.0f, 1.0f, 0.0f, 0.0f));
uint4_xe cas_const_1 =
uint4_xe(
float_bits_to_uint_xe(push_const_xe(xe_cas_sharpness_post_setup)),
pack_half_2x16_xe(float2_xe(
push_const_xe(xe_cas_sharpness_post_setup), 0.0f)),
float_bits_to_uint_xe(8.0f), 0u);
float4_xe cas_color;
CasFilter(cas_color.r, cas_color.g, cas_color.b, pixel_coord, cas_const_0,
cas_const_1, true);
// Linear conversion approximation as recommended in the CAS presentation.
@@ -66,21 +64,21 @@ xesl_entry_inputs_end_code_begin
// Clamping because on Vulkan, the surface may specify any format, including
// floating-point.
cas_color.rgb =
xesl_saturate(cas_color.rgb + XeDitherOffset8bpc(pixel_coord));
saturate_xe(cas_color.rgb + XeDitherOffset8bpc(pixel_coord));
#endif // XE_GUEST_OUTPUT_DITHER
// Force alpha to 1 to make sure the surface won't be translucent.
cas_color.a = 1.0;
xesl_Output(xe_cas_color) = cas_color;
xesl_entry_code_end
cas_color.a = 1.0f;
out_xe(xe_cas_color) = cas_color;
}
entry_code_end_xe
#define A_GPU 1
#include "../../../../third_party/FidelityFX-CAS/ffx-cas/ffx_a.h"
xesl_float3 CasLoad(xesl_int2 p) {
return xesl_texelFetch2D(xe_cas_source, p, 0).rgb;
float3_xe CasLoad(int2_xe p) {
return texel_fetch_2d_xe(xe_cas_source, p, 0).rgb;
}
void CasInput(xesl_function_param_inout(float, r),
xesl_function_param_inout(float, g),
xesl_function_param_inout(float, b)) {
void CasInput(inout_param_xe(float, r), inout_param_xe(float, g),
inout_param_xe(float, b)) {
// Linear conversion approximation as recommended in the CAS presentation.
r *= r;
g *= g;

View File

@@ -11,74 +11,72 @@
#include "amd_language.xesli"
xesl_pushConstants_begin(b0, space0)
push_const_begin_xe(b0, space0)
// 16 used by the vertex shader (GLSL push constant offsets are across
// stages).
xesl_block_offset_member(16, c0.x, xesl_float2,
xe_fsr_easu_input_output_size_ratio)
xesl_block_offset_member(24, c0.z, xesl_float2, xe_fsr_easu_input_size_inv)
xesl_pushConstants_end
block_offset_member_xe(16, c0.x, float2_xe,
xe_fsr_easu_input_output_size_ratio)
block_offset_member_xe(24, c0.z, float2_xe, xe_fsr_easu_input_size_inv)
push_const_end_xe
// FIXME(Triang3l): This approach doesn't work for MSL - the texture must be
// passed explicitly from the entry point's arguments to FsrEasu#F.
// Forward declaration because FsrEasu#F need xe_fsr_easu_source from the entry
// point bindings.
void FsrEasuF(xesl_function_param_out(xesl_float3, pixel),
xesl_uint2 pixel_position, xesl_uint4 const0, xesl_uint4 const1,
xesl_uint4 const2, xesl_uint4 const3);
void FsrEasuF(out_param_xe(float3_xe, pixel), uint2_xe pixel_position,
uint4_xe const0, uint4_xe const1, uint4_xe const2,
uint4_xe const3);
xesl_entry_outputs_begin
xesl_entry_output_target(xesl_float4, xe_fsr_easu_color, 0)
xesl_entry_outputs_end_stageInputs_begin
xesl_entry_stageInputs_end_bindings_begin_pixel
xesl_pushConstants_binding(buffer(0))
xesl_entry_binding_next
xesl_texture(xesl_texture2D, xe_fsr_easu_source, set=0, binding=0, t0, space0,
texture(0))
xesl_entry_binding_next
xesl_samplerState(xe_fsr_easu_sampler, set=0, binding=1, s0, space0,
sampler(0))
xesl_entry_bindings_end_inputs_begin
xesl_entry_input_fragCoord
xesl_entry_inputs_end_code_begin
entry_outputs_begin_xe
entry_out_target_xe(float4_xe, xe_fsr_easu_color, 0)
entry_outputs_end_stage_inputs_begin_xe
entry_stage_inputs_end_bindings_begin_pixel_xe
push_const_binding_xe(buffer(0))
entry_binding_next_xe
texture_xe(texture_2d_xe, xe_fsr_easu_source, set=0, binding=0, t0, space0,
texture(0))
entry_binding_next_xe
sampler_state_xe(xe_fsr_easu_sampler, set=0, binding=1, s0, space0,
sampler(0))
entry_bindings_end_inputs_begin_xe
entry_in_pixel_coord_xe
entry_inputs_end_code_begin_xe
{
// FsrEasuCon with smaller push constant usage.
xesl_uint4 easu_const_0 =
xesl_uint4(
xesl_floatBitsToUint(
xesl_pushConstant(xe_fsr_easu_input_output_size_ratio)),
xesl_floatBitsToUint(
0.5 * xesl_pushConstant(xe_fsr_easu_input_output_size_ratio) -
0.5));
xesl_uint4 easu_const_1 =
xesl_floatBitsToUint(xesl_float4(1.0, 1.0, 1.0, -1.0) *
xesl_pushConstant(xe_fsr_easu_input_size_inv).xyxy);
xesl_uint4 easu_const_2 =
xesl_floatBitsToUint(xesl_float4(-1.0, 2.0, 1.0, 2.0) *
xesl_pushConstant(xe_fsr_easu_input_size_inv).xyxy);
xesl_uint4 easu_const_3 =
xesl_uint4(xesl_floatBitsToUint(0.0),
xesl_floatBitsToUint(
4.0 * xesl_pushConstant(xe_fsr_easu_input_size_inv).y),
0u, 0u);
FsrEasuF(xesl_Output(xe_fsr_easu_color).rgb, xesl_uint2(xesl_FragCoord.xy),
uint4_xe easu_const_0 =
uint4_xe(
float_bits_to_uint_xe(
push_const_xe(xe_fsr_easu_input_output_size_ratio)),
float_bits_to_uint_xe(
0.5f * push_const_xe(xe_fsr_easu_input_output_size_ratio) -
0.5f));
uint4_xe easu_const_1 =
float_bits_to_uint_xe(float4_xe(1.0f, 1.0f, 1.0f, -1.0f) *
push_const_xe(xe_fsr_easu_input_size_inv).xyxy);
uint4_xe easu_const_2 =
float_bits_to_uint_xe(float4_xe(-1.0f, 2.0f, 1.0f, 2.0f) *
push_const_xe(xe_fsr_easu_input_size_inv).xyxy);
uint4_xe easu_const_3 = uint4_xe(
float_bits_to_uint_xe(0.0f),
float_bits_to_uint_xe(4.0f * push_const_xe(xe_fsr_easu_input_size_inv).y),
0u, 0u);
FsrEasuF(out_xe(xe_fsr_easu_color).rgb, uint2_xe(in_pixel_coord_xe.xy),
easu_const_0, easu_const_1, easu_const_2, easu_const_3);
xesl_Output(xe_fsr_easu_color).a = 1.0;
xesl_entry_code_end
out_xe(xe_fsr_easu_color).a = 1.0f;
}
entry_code_end_xe
#define A_GPU 1
#include "../../../../third_party/FidelityFX-FSR/ffx-fsr/ffx_a.h"
#define FSR_EASU_F 1
xesl_float4 FsrEasuRF(xesl_float2 p) {
return xesl_textureGatherRed2D_sep(xe_fsr_easu_source, xe_fsr_easu_sampler,
p);
float4_xe FsrEasuRF(float2_xe p) {
return gather_sep_2d_r_xe(xe_fsr_easu_source, xe_fsr_easu_sampler, p);
}
xesl_float4 FsrEasuGF(xesl_float2 p) {
return xesl_textureGatherGreen2D_sep(xe_fsr_easu_source, xe_fsr_easu_sampler,
p);
float4_xe FsrEasuGF(float2_xe p) {
return gather_sep_2d_g_xe(xe_fsr_easu_source, xe_fsr_easu_sampler, p);
}
xesl_float4 FsrEasuBF(xesl_float2 p) {
return xesl_textureGatherBlue2D_sep(xe_fsr_easu_source, xe_fsr_easu_sampler,
p);
float4_xe FsrEasuBF(float2_xe p) {
return gather_sep_2d_b_xe(xe_fsr_easu_source, xe_fsr_easu_sampler, p);
}
#include "../../../../third_party/FidelityFX-FSR/ffx-fsr/ffx_fsr1.h"

View File

@@ -15,63 +15,61 @@
#include "dither_8bpc.xesli"
#endif // XE_GUEST_OUTPUT_DITHER
xesl_pushConstants_begin(b0, space0)
push_const_begin_xe(b0, space0)
// 16 used by the vertex shader (GLSL push constant offsets are across
// stages).
xesl_block_offset_member(16, c0.x, xesl_int2,
xe_fsr_rcas_output_offset)
xesl_block_offset_member(24, c0.z, float, xe_fsr_rcas_sharpness_post_setup)
xesl_pushConstants_end
block_offset_member_xe(16, c0.x, int2_xe, xe_fsr_rcas_output_offset)
block_offset_member_xe(24, c0.z, float, xe_fsr_rcas_sharpness_post_setup)
push_const_end_xe
// FIXME(Triang3l): This approach doesn't work for MSL - the texture must be
// passed explicitly from the entry point's arguments to FsrRcasLoadF.
// Forward declaration because FsrRcasLoadF needs xe_fsr_rcas_source from the
// entry point bindings.
void FsrRcasF(xesl_function_param_out(float, pixel_r),
xesl_function_param_out(float, pixel_g),
xesl_function_param_out(float, pixel_b),
xesl_uint2 pixel_position, xesl_uint4 constants);
void FsrRcasF(out_param_xe(float, pixel_r), out_param_xe(float, pixel_g),
out_param_xe(float, pixel_b), uint2_xe pixel_position,
uint4_xe constants);
xesl_entry_outputs_begin
xesl_entry_output_target(xesl_float4, xe_fsr_rcas_color, 0)
xesl_entry_outputs_end_stageInputs_begin
xesl_entry_stageInputs_end_bindings_begin_pixel
xesl_pushConstants_binding(buffer(0))
xesl_entry_binding_next
xesl_texture(xesl_texture2D, xe_fsr_rcas_source, set=0, binding=0, t0, space0,
texture(0))
xesl_entry_bindings_end_inputs_begin
xesl_entry_input_fragCoord
xesl_entry_inputs_end_code_begin
xesl_uint2 pixel_coord =
xesl_uint2(xesl_int2(xesl_FragCoord.xy) -
xesl_pushConstant(xe_fsr_rcas_output_offset));
float sharpness = xesl_pushConstant(xe_fsr_rcas_sharpness_post_setup);
entry_outputs_begin_xe
entry_out_target_xe(float4_xe, xe_fsr_rcas_color, 0)
entry_outputs_end_stage_inputs_begin_xe
entry_stage_inputs_end_bindings_begin_pixel_xe
push_const_binding_xe(buffer(0))
entry_binding_next_xe
texture_xe(texture_2d_xe, xe_fsr_rcas_source, set=0, binding=0, t0, space0,
texture(0))
entry_bindings_end_inputs_begin_xe
entry_in_pixel_coord_xe
entry_inputs_end_code_begin_xe
{
uint2_xe pixel_coord = uint2_xe(int2_xe(in_pixel_coord_xe.xy) -
push_const_xe(xe_fsr_rcas_output_offset));
float sharpness = push_const_xe(xe_fsr_rcas_sharpness_post_setup);
// FsrRcasCon with smaller push constant usage.
xesl_uint4 rcas_const =
xesl_uint4(xesl_floatBitsToUint(sharpness),
xesl_packHalf2x16(xesl_float2(sharpness, sharpness)), 0u, 0u);
xesl_float4 rcas_color;
uint4_xe rcas_const =
uint4_xe(float_bits_to_uint_xe(sharpness),
pack_half_2x16_xe(float2_xe(sharpness, sharpness)), 0u, 0u);
float4_xe rcas_color;
FsrRcasF(rcas_color.r, rcas_color.g, rcas_color.b, pixel_coord, rcas_const);
#if XE_GUEST_OUTPUT_DITHER
// Clamping because on Vulkan, the surface may specify any format, including
// floating-point.
rcas_color.rgb =
xesl_saturate(rcas_color.rgb + XeDitherOffset8bpc(pixel_coord));
saturate_xe(rcas_color.rgb + XeDitherOffset8bpc(pixel_coord));
#endif // XE_GUEST_OUTPUT_DITHER
// Force alpha to 1 to make sure the surface won't be translucent.
rcas_color.a = 1.0;
xesl_Output(xe_fsr_rcas_color) = rcas_color;
xesl_entry_code_end
rcas_color.a = 1.0f;
out_xe(xe_fsr_rcas_color) = rcas_color;
}
entry_code_end_xe
#define A_GPU 1
#include "../../../../third_party/FidelityFX-FSR/ffx-fsr/ffx_a.h"
#define FSR_RCAS_F 1
xesl_float4 FsrRcasLoadF(xesl_int2 p) {
return xesl_float4(xesl_texelFetch2D(xe_fsr_rcas_source, p, 0).rgb, 1.0);
float4_xe FsrRcasLoadF(int2_xe p) {
return float4_xe(texel_fetch_2d_xe(xe_fsr_rcas_source, p, 0).rgb, 1.0f);
}
void FsrRcasInputF(xesl_function_param_inout(float, r),
xesl_function_param_inout(float, g),
xesl_function_param_inout(float, b)) {}
void FsrRcasInputF(inout_param_xe(float, r), inout_param_xe(float, g),
inout_param_xe(float, b)) {}
#include "../../../../third_party/FidelityFX-FSR/ffx-fsr/ffx_fsr1.h"

View File

@@ -9,27 +9,29 @@
#include "xesl.xesli"
xesl_pushConstants_begin(b0, space0)
push_const_begin_xe(b0, space0)
// If the layout is changed, update the base offset in all guest output pixel
// shaders!
xesl_float2 xe_triangle_strip_rect_offset;
float2_xe xe_triangle_strip_rect_offset;
// Can be negative.
xesl_float2 xe_triangle_strip_rect_size;
xesl_pushConstants_end
float2_xe xe_triangle_strip_rect_size;
push_const_end_xe
xesl_entry_outputs_begin
xesl_entry_output_position
xesl_entry_outputs_end_stageInputs_begin
xesl_entry_stageInputs_end_bindings_begin_vertex
xesl_pushConstants_binding(buffer(0))
xesl_entry_bindings_end_inputs_begin
xesl_entry_input_vertexID
xesl_entry_inputs_end_code_begin
xesl_Position =
xesl_float4(
xesl_pushConstant(xe_triangle_strip_rect_offset) +
xesl_float2((xesl_uint2(xesl_VertexID, xesl_VertexID) >>
xesl_uint2(0u, 1u)) & 1u) *
xesl_pushConstant(xe_triangle_strip_rect_size),
0.0, 1.0);
xesl_entry_code_end
entry_outputs_begin_xe
entry_out_position_xe
entry_outputs_end_stage_inputs_begin_xe
entry_stage_inputs_end_bindings_begin_vertex_xe
push_const_binding_xe(buffer(0))
entry_bindings_end_inputs_begin_xe
entry_in_vertex_id_xe
entry_inputs_end_code_begin_xe
{
out_position_xe =
float4_xe(
push_const_xe(xe_triangle_strip_rect_offset) +
float2_xe((uint_x2_xe(in_vertex_id_xe) >>
uint2_xe(0u, 1u)) & 1u) *
push_const_xe(xe_triangle_strip_rect_size),
0.0f, 1.0f);
}
entry_code_end_xe

View File

@@ -9,19 +9,20 @@
#include "xesl.xesli"
xesl_entry_outputs_begin
xesl_entry_output_target(xesl_float4, xe_out_color, 0)
xesl_entry_outputs_end_stageInputs_begin
xesl_entry_stageInput(xesl_float2, xe_in_texcoord, 0, TEXCOORD)
xesl_entry_stageInput(xesl_float4, xe_in_color, 1, COLOR)
xesl_entry_stageInputs_end_bindings_begin_pixel
xesl_sampler(xesl_sampler2D, xe_immediate_texture, set=0, binding=0, t0,
space0, s0, space0, texture(0), sampler(0))
xesl_entry_bindings_end_inputs_begin
xesl_entry_input_stageInputs
xesl_entry_inputs_end_code_begin
xesl_Output(xe_out_color) =
xesl_StageInput(xe_in_color) *
xesl_textureSampleLod2D_comb(xe_immediate_texture,
xesl_StageInput(xe_in_texcoord), 0.0);
xesl_entry_code_end
entry_outputs_begin_xe
entry_out_target_xe(float4_xe, xe_out_color, 0)
entry_outputs_end_stage_inputs_begin_xe
entry_in_stage_xe(float2_xe, xe_in_texcoord, 0, TEXCOORD)
entry_in_stage_xe(float4_xe, xe_in_color, 1, COLOR)
entry_stage_inputs_end_bindings_begin_pixel_xe
sampler_xe(sampler_2d_xe, xe_immediate_texture, set=0, binding=0, t0, space0,
s0, space0, texture(0), sampler(0))
entry_bindings_end_inputs_begin_xe
entry_in_stage_inputs_xe
entry_inputs_end_code_begin_xe
{
out_xe(xe_out_color) =
in_xe(xe_in_color) *
sample_comb_lod_2d_xe(xe_immediate_texture, in_xe(xe_in_texcoord), 0.0f);
}
entry_code_end_xe

View File

@@ -9,29 +9,31 @@
#include "xesl.xesli"
xesl_pushConstants_begin(b0, space0)
xesl_float2 xe_coordinate_space_size_inv;
xesl_pushConstants_end
push_const_begin_xe(b0, space0)
float2_xe xe_coordinate_space_size_inv;
push_const_end_xe
xesl_entry_outputs_begin
xesl_entry_output(xesl_float2, xe_out_texcoord, 0, TEXCOORD)
xesl_entry_output(xesl_float4, xe_out_color, 1, COLOR)
xesl_entry_output_position
xesl_entry_outputs_end_stageInputs_begin
xesl_entry_stageInput_vertex(xesl_float2, xe_in_position, 0, POSITION)
xesl_entry_stageInput_vertex(xesl_float2, xe_in_texcoord, 1, TEXCOORD)
xesl_entry_stageInput_vertex(xesl_float4, xe_in_color, 2, COLOR)
xesl_entry_stageInputs_end_bindings_begin_vertex
xesl_pushConstants_binding(buffer(0))
xesl_entry_bindings_end_inputs_begin
xesl_entry_input_stageInputs
xesl_entry_inputs_end_code_begin
xesl_Output(xe_out_texcoord) = xesl_StageInput(xe_in_texcoord);
xesl_Output(xe_out_color) = xesl_StageInput(xe_in_color);
xesl_Position =
xesl_float4(xesl_StageInput(xe_in_position) *
xesl_pushConstant(xe_coordinate_space_size_inv) *
xesl_float2(2.0, 2.0 * XESL_Y_SCREEN_DIRECTION) -
xesl_float2(1.0, XESL_Y_SCREEN_DIRECTION),
0.0, 1.0);
xesl_entry_code_end
entry_outputs_begin_xe
entry_out_xe(float2_xe, xe_out_texcoord, 0, TEXCOORD)
entry_out_xe(float4_xe, xe_out_color, 1, COLOR)
entry_out_position_xe
entry_outputs_end_stage_inputs_begin_xe
entry_in_stage_vertex_xe(float2_xe, xe_in_position, 0, POSITION)
entry_in_stage_vertex_xe(float2_xe, xe_in_texcoord, 1, TEXCOORD)
entry_in_stage_vertex_xe(float4_xe, xe_in_color, 2, COLOR)
entry_stage_inputs_end_bindings_begin_vertex_xe
push_const_binding_xe(buffer(0))
entry_bindings_end_inputs_begin_xe
entry_in_stage_inputs_xe
entry_inputs_end_code_begin_xe
{
out_xe(xe_out_texcoord) = in_xe(xe_in_texcoord);
out_xe(xe_out_color) = in_xe(xe_in_color);
out_position_xe =
float4_xe(in_xe(xe_in_position) *
push_const_xe(xe_coordinate_space_size_inv) *
float2_xe(2.0f, 2.0f * NDC_DIRECTION_Y_XE) -
float2_xe(1.0f, NDC_DIRECTION_Y_XE),
0.0f, 1.0f);
}
entry_code_end_xe

File diff suppressed because it is too large Load Diff

View File

@@ -51,22 +51,34 @@ std::unique_ptr<VulkanDevice> VulkanDevice::CreateIfSupported(
VkPhysicalDeviceProperties properties = {};
ifn.vkGetPhysicalDeviceProperties(physical_device, &properties);
// From the VkApplicationInfo specification:
//
// "The Khronos validation layers will treat apiVersion as the highest API
// version the application targets, and will validate API usage against the
// minimum of that version and the implementation version (instance or device,
// depending on context). If an application tries to use functionality from a
// greater version than this, a validation error will be triggered."
//
// "Vulkan 1.0 implementations were required to return
// VK_ERROR_INCOMPATIBLE_DRIVER if apiVersion was larger than 1.0."
//
// Make sure that all usages of the API version in Xenia receive the highest
// minor version that Xenia has been tested on.
// Libraries such as the Vulkan Memory Allocator also may expect a minor
// version that is known to them.
const uint32_t unclamped_api_version = properties.apiVersion;
if (vulkan_instance->api_version() < VK_MAKE_API_VERSION(0, 1, 1, 0)) {
// From the VkApplicationInfo specification:
//
// "The Khronos validation layers will treat apiVersion as the highest API
// version the application targets, and will validate API usage against the
// minimum of that version and the implementation version (instance or
// device, depending on context). If an application tries to use
// functionality from a greater version than this, a validation error will
// be triggered."
//
// "Vulkan 1.0 implementations were required to return
// VK_ERROR_INCOMPATIBLE_DRIVER if apiVersion was larger than 1.0."
properties.apiVersion = VK_MAKE_API_VERSION(
0, 1, 0, VK_API_VERSION_PATCH(properties.apiVersion));
}
const uint32_t clamped_api_minor_version = std::min(
VK_MAKE_API_VERSION(VK_API_VERSION_VARIANT(unclamped_api_version),
VK_API_VERSION_MAJOR(unclamped_api_version),
VK_API_VERSION_MINOR(unclamped_api_version), 0),
vulkan_instance->api_version() >= VK_MAKE_API_VERSION(0, 1, 1, 0)
? kHighestUsedApiMinorVersion
: VK_MAKE_API_VERSION(0, 1, 0, 0));
properties.apiVersion =
VK_MAKE_API_VERSION(VK_API_VERSION_VARIANT(clamped_api_minor_version),
VK_API_VERSION_MAJOR(clamped_api_minor_version),
VK_API_VERSION_MINOR(clamped_api_minor_version),
VK_API_VERSION_PATCH(unclamped_api_version));
VkPhysicalDeviceFeatures supported_features = {};
ifn.vkGetPhysicalDeviceFeatures(physical_device, &supported_features);
@@ -488,20 +500,14 @@ std::unique_ptr<VulkanDevice> VulkanDevice::CreateIfSupported(
std::strcpy(device->properties_.deviceName, properties.deviceName);
XELOGI(
"Vulkan device '{}': API {}.{}.{}, vendor 0x{:04X}, device 0x{:04X}, "
"driver version 0x{:X}",
properties.deviceName, VK_VERSION_MAJOR(properties.apiVersion),
VK_VERSION_MINOR(properties.apiVersion),
VK_VERSION_PATCH(properties.apiVersion), properties.vendorID,
"Vulkan device '{}': API {}.{}.{} ({}.{} used), vendor 0x{:04X}, device "
"0x{:04X}, driver version 0x{:X}",
properties.deviceName, VK_VERSION_MAJOR(unclamped_api_version),
VK_VERSION_MINOR(unclamped_api_version),
VK_VERSION_PATCH(properties.apiVersion),
VK_VERSION_MAJOR(properties.apiVersion),
VK_VERSION_MINOR(properties.apiVersion), properties.vendorID,
properties.deviceID, properties.driverVersion);
if (unclamped_api_version != properties.apiVersion) {
XELOGI(
"Device supports Vulkan API {}.{}.{}, but the used version is limited "
"by the instance",
VK_VERSION_MAJOR(unclamped_api_version),
VK_VERSION_MINOR(unclamped_api_version),
VK_VERSION_PATCH(unclamped_api_version));
}
XELOGI("Enabled Vulkan device extensions:");
for (uint32_t enabled_extension_index = 0;

View File

@@ -10,6 +10,7 @@
#ifndef XENIA_UI_VULKAN_VULKAN_DEVICE_H_
#define XENIA_UI_VULKAN_VULKAN_DEVICE_H_
#include <atomic>
#include <memory>
#include <mutex>
#include <vector>
@@ -269,6 +270,25 @@ class VulkanDevice {
const MemoryTypes& memory_types() const { return memory_types_; }
// Returns whether a device loss has been observed for the first time, so, for
// instance, logging of the device loss can be limited only to the location
// where it was first caught.
bool SetLost() noexcept {
return !lost_.exchange(true, std::memory_order_acq_rel);
}
bool IsLost() const noexcept { return lost_.load(std::memory_order_acquire); }
VkResult SubmitAndUpdateLost(const VkQueue queue, const uint32_t submit_count,
const VkSubmitInfo* const submits,
const VkFence fence) {
const VkResult submit_result =
functions().vkQueueSubmit(queue, submit_count, submits, fence);
if (submit_result == VK_ERROR_DEVICE_LOST) {
SetLost();
}
return submit_result;
}
private:
explicit VulkanDevice(const VulkanInstance* vulkan_instance,
VkPhysicalDevice physical_device);
@@ -288,6 +308,8 @@ class VulkanDevice {
uint32_t queue_family_sparse_binding_ = UINT32_MAX;
MemoryTypes memory_types_;
std::atomic<bool> lost_{false};
};
} // namespace vulkan

View File

@@ -0,0 +1,182 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2025 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#include "xenia/ui/vulkan/vulkan_gpu_completion_timeline.h"
#include <algorithm>
#include <iterator>
#include "xenia/base/assert.h"
#include "xenia/base/logging.h"
namespace xe {
namespace ui {
namespace vulkan {
VulkanGPUCompletionTimeline::~VulkanGPUCompletionTimeline() {
#ifndef NDEBUG
assert_zero(fences_acquired_);
#endif
if (!pending_submission_fences_.empty()) {
if (vulkan_device_->functions().vkWaitForFences(
vulkan_device_->device(), 1,
&pending_submission_fences_.back().second, VK_TRUE,
UINT64_MAX) == VK_ERROR_DEVICE_LOST) {
vulkan_device_->SetLost();
}
while (!pending_submission_fences_.empty()) {
vulkan_device_->functions().vkDestroyFence(
vulkan_device_->device(), pending_submission_fences_.back().second,
nullptr);
pending_submission_fences_.pop_back();
}
}
while (!free_fences_.empty()) {
vulkan_device_->functions().vkDestroyFence(vulkan_device_->device(),
free_fences_.back(), nullptr);
free_fences_.pop_back();
}
}
std::optional<VulkanGPUCompletionTimeline::FenceAcquisition>
VulkanGPUCompletionTimeline::AcquireFenceForSubmission(
VkResult* const result_out_opt) {
// Reuse fences if completion was not awaited or updated explicitly.
UpdateAndGetCompletedSubmission();
VkFence fence = VK_NULL_HANDLE;
if (!free_fences_.empty()) {
const VkResult fence_reset_result =
vulkan_device_->functions().vkResetFences(vulkan_device_->device(), 1,
&free_fences_.back());
if (fence_reset_result != VK_SUCCESS) {
XELOGE("Failed to reset a Vulkan fence: {}",
vk::to_string(vk::Result(fence_reset_result)));
} else {
fence = free_fences_.back();
free_fences_.pop_back();
}
}
if (fence == VK_NULL_HANDLE) {
const VkFenceCreateInfo fence_create_info = {
VK_STRUCTURE_TYPE_FENCE_CREATE_INFO};
const VkResult fence_create_result =
vulkan_device_->functions().vkCreateFence(
vulkan_device_->device(), &fence_create_info, nullptr, &fence);
if (fence_create_result != VK_SUCCESS) {
XELOGE("Failed to create a Vulkan fence: {}",
vk::to_string(vk::Result(fence_create_result)));
if (result_out_opt != nullptr) {
*result_out_opt = fence_create_result;
}
return std::nullopt;
}
}
#ifndef NDEBUG
++fences_acquired_;
#endif
if (result_out_opt != nullptr) {
*result_out_opt = VK_SUCCESS;
}
return FenceAcquisition(this, fence);
}
VkResult VulkanGPUCompletionTimeline::AcquireFenceAndSubmit(
const uint32_t queue_family_index, const uint32_t queue_index,
const uint32_t submit_count, const VkSubmitInfo* const submits) {
VkResult fence_acquire_result;
std::optional<FenceAcquisition> fence_acquisition =
AcquireFenceForSubmission(&fence_acquire_result);
if (!fence_acquisition.has_value()) {
return fence_acquire_result;
}
VkResult submit_result;
{
const VulkanDevice::Queue::Acquisition queue_acquisition =
vulkan_device_->AcquireQueue(queue_family_index, queue_index);
submit_result = vulkan_device_->SubmitAndUpdateLost(
queue_acquisition.queue(), submit_count, submits,
fence_acquisition->GetFenceForSubmitting());
}
if (submit_result != VK_SUCCESS) {
fence_acquisition->SetSubmissionFailedOrAborted();
}
return submit_result;
}
void VulkanGPUCompletionTimeline::UpdateCompletedSubmission() {
while (!pending_submission_fences_.empty()) {
const VkResult fence_status = vulkan_device_->functions().vkGetFenceStatus(
vulkan_device_->device(), pending_submission_fences_.front().second);
if (fence_status != VK_SUCCESS) {
// Not ready, or an error.
if (fence_status == VK_ERROR_DEVICE_LOST) {
vulkan_device_->SetLost();
}
break;
}
SetCompletedSubmission(pending_submission_fences_.front().first);
free_fences_.push_back(pending_submission_fences_.front().second);
pending_submission_fences_.pop_front();
}
}
void VulkanGPUCompletionTimeline::AwaitSubmissionImpl(
const uint64_t awaited_submission) {
// According to the Vulkan 1.4.335 specification:
// "The first synchronization scope includes every batch submitted in the same
// queue submission command. Fence signal operations that are defined by
// vkQueueSubmit or vkQueueSubmit2 additionally include in the first
// synchronization scope all commands that occur earlier in submission order.
// Fence signal operations that are defined by vkQueueSubmit or vkQueueSubmit2
// or vkQueueBindSparse additionally include in the first synchronization
// scope any semaphore and fence signal operations that occur earlier in
// signal operation order."
auto submission_end_iterator = pending_submission_fences_.cbegin();
while (submission_end_iterator != pending_submission_fences_.cend() &&
submission_end_iterator->first <= awaited_submission) {
submission_end_iterator = std::next(submission_end_iterator);
}
if (submission_end_iterator != pending_submission_fences_.cbegin()) {
const VkResult fence_wait_result =
vulkan_device_->functions().vkWaitForFences(
vulkan_device_->device(), 1,
&std::prev(submission_end_iterator)->second, VK_TRUE, UINT64_MAX);
if (fence_wait_result != VK_SUCCESS) {
XELOGE("Failed to wait for a Vulkan fence: {}",
vk::to_string(vk::Result(fence_wait_result)));
if (fence_wait_result == VK_ERROR_DEVICE_LOST) {
vulkan_device_->SetLost();
}
return;
}
for (auto free_fence_iterator = pending_submission_fences_.cbegin();
free_fence_iterator != submission_end_iterator;
free_fence_iterator = std::next(free_fence_iterator)) {
free_fences_.push_back(free_fence_iterator->second);
}
pending_submission_fences_.erase(pending_submission_fences_.cbegin(),
submission_end_iterator);
}
if (GetCompletedSubmissionFromLastUpdate() < awaited_submission) {
SetCompletedSubmission(awaited_submission);
}
}
} // namespace vulkan
} // namespace ui
} // namespace xe

View File

@@ -0,0 +1,155 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2025 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#ifndef XENIA_UI_VULKAN_VULKAN_GPU_COMPLETION_TIMELINE_H_
#define XENIA_UI_VULKAN_VULKAN_GPU_COMPLETION_TIMELINE_H_
#include <deque>
#include <optional>
#include <utility>
#include <vector>
#include "xenia/base/assert.h"
#include "xenia/ui/gpu_completion_timeline.h"
#include "xenia/ui/vulkan/vulkan_device.h"
namespace xe {
namespace ui {
namespace vulkan {
class VulkanGPUCompletionTimeline : public GPUCompletionTimeline {
public:
explicit VulkanGPUCompletionTimeline(VulkanDevice* const vulkan_device)
: vulkan_device_(vulkan_device) {}
VulkanGPUCompletionTimeline(const VulkanGPUCompletionTimeline&) = delete;
VulkanGPUCompletionTimeline& operator=(const VulkanGPUCompletionTimeline&) =
delete;
VulkanGPUCompletionTimeline(VulkanGPUCompletionTimeline&&) = delete;
VulkanGPUCompletionTimeline& operator=(VulkanGPUCompletionTimeline&&) =
delete;
~VulkanGPUCompletionTimeline();
class FenceAcquisition {
public:
explicit FenceAcquisition(
VulkanGPUCompletionTimeline* const completion_timeline,
const VkFence fence)
: completion_timeline_(completion_timeline), fence_(fence) {
assert_not_null(completion_timeline);
assert_true(fence != VK_NULL_HANDLE);
}
FenceAcquisition(const FenceAcquisition&) = delete;
FenceAcquisition& operator=(const FenceAcquisition&) = delete;
FenceAcquisition(FenceAcquisition&& other)
: completion_timeline_(other.completion_timeline_),
fence_(other.fence_),
submission_successful_(other.submission_successful_) {
other.completion_timeline_ = nullptr;
other.fence_ = VK_NULL_HANDLE;
other.submission_successful_.reset();
}
FenceAcquisition& operator==(FenceAcquisition&& other) {
if (this == &other) {
return *this;
}
completion_timeline_ = other.completion_timeline_;
other.completion_timeline_ = nullptr;
fence_ = other.fence_;
other.fence_ = VK_NULL_HANDLE;
submission_successful_ = other.submission_successful_;
other.submission_successful_.reset();
return *this;
}
~FenceAcquisition() {
if (completion_timeline_ && fence_) {
#ifndef NDEBUG
assert_not_zero(completion_timeline_->fences_acquired_);
--completion_timeline_->fences_acquired_;
#endif
if (submission_successful_.value_or(false)) {
assert_true(
completion_timeline_->pending_submission_fences_.empty() ||
completion_timeline_->pending_submission_fences_.front().first <
completion_timeline_->GetUpcomingSubmission());
completion_timeline_->pending_submission_fences_.emplace_back(
completion_timeline_->GetUpcomingSubmission(), fence_);
completion_timeline_->IncrementUpcomingSubmission();
} else {
completion_timeline_->free_fences_.push_back(fence_);
}
}
}
VkFence GetFenceForSubmitting() {
// Don't mark the fence as used in a submission if already tried to
// submit, but failed.
assert_true(!submission_successful_.has_value() ||
*submission_successful_);
submission_successful_ = true;
return fence_;
}
void SetSubmissionFailedOrAborted() { submission_successful_ = false; }
private:
VulkanGPUCompletionTimeline* completion_timeline_ = nullptr;
VkFence fence_ = VK_NULL_HANDLE;
std::optional<bool> submission_successful_;
};
// If the submission has succeeded (`GetFenceForSubmitting` was called, but
// `SetSubmissionFailedOrAborted` was not), will advance to the next
// submission once the acquisition is released.
//
// It's possible to acquire a fence not right before submitting, but also well
// in advance, such as before recording the command buffer, for instance, to
// skip recording it if fence acquisition has failed.
//
// Acquiring a fence also updates the completed submission in order to reuse
// fences if this completion timeline is used without regular checks or waits
// (for instance, if it's supplementary to another completion timeline, and
// awaited only before destroying something).
[[nodiscard]] std::optional<FenceAcquisition> AcquireFenceForSubmission(
VkResult* result_out_opt = nullptr);
VkResult AcquireFenceAndSubmit(uint32_t queue_family_index,
uint32_t queue_index, uint32_t submit_count,
const VkSubmitInfo* submits);
void UpdateCompletedSubmission() override;
protected:
void AwaitSubmissionImpl(uint64_t awaited_submission) override;
private:
VulkanDevice* const vulkan_device_;
std::vector<VkFence> free_fences_;
// <Submission index, fence>, in submission index order.
std::deque<std::pair<uint64_t, VkFence>> pending_submission_fences_;
#ifndef NDEBUG
size_t fences_acquired_ = 0;
#endif
};
} // namespace vulkan
} // namespace ui
} // namespace xe
#endif // XENIA_UI_VULKAN_VULKAN_GPU_COMPLETION_TIMELINE_H_

View File

@@ -153,8 +153,8 @@ VulkanPresenter::~VulkanPresenter() {
// (paint submission completion already awaited).
// From most likely the latest to most likely the earliest to be signaled, so
// just one sleep will likely be needed.
ui_submission_tracker_.Shutdown();
guest_output_image_refresher_submission_tracker_.Shutdown();
ui_completion_timeline_.AwaitAllSubmissions();
guest_output_image_refresher_completion_timeline_.AwaitAllSubmissions();
const VulkanDevice::Functions& dfn = vulkan_device_->functions();
const VkDevice device = vulkan_device_->device();
@@ -377,51 +377,24 @@ bool VulkanPresenter::CaptureGuestOutput(RawImage& image_out) {
return false;
}
VkSubmitInfo submit_info = {};
submit_info.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO;
submit_info.commandBufferCount = 1;
submit_info.pCommandBuffers = &command_buffer;
VulkanSubmissionTracker submission_tracker(vulkan_device_);
{
VulkanSubmissionTracker::FenceAcquisition fence_acqusition(
submission_tracker.AcquireFenceToAdvanceSubmission());
if (!fence_acqusition.fence()) {
XELOGE(
"VulkanPresenter: Failed to acquire a fence for guest output "
"capturing");
fence_acqusition.SubmissionFailedOrDropped();
dfn.vkDestroyCommandPool(device, command_pool, nullptr);
dfn.vkDestroyBuffer(device, buffer, nullptr);
dfn.vkFreeMemory(device, buffer_memory, nullptr);
return false;
}
VkResult submit_result;
{
const VulkanDevice::Queue::Acquisition queue_acquisition =
vulkan_device_->AcquireQueue(
vulkan_device_->queue_family_graphics_compute(), 0);
submit_result =
dfn.vkQueueSubmit(queue_acquisition.queue(), 1, &submit_info,
fence_acqusition.fence());
}
VulkanGPUCompletionTimeline completion_timeline(vulkan_device_);
VkSubmitInfo submit_info = {VK_STRUCTURE_TYPE_SUBMIT_INFO};
submit_info.commandBufferCount = 1;
submit_info.pCommandBuffers = &command_buffer;
const VkResult submit_result = completion_timeline.AcquireFenceAndSubmit(
vulkan_device_->queue_family_graphics_compute(), 0, 1, &submit_info);
if (submit_result != VK_SUCCESS) {
XELOGE(
"VulkanPresenter: Failed to submit the guest output capturing "
"command buffer");
fence_acqusition.SubmissionFailedOrDropped();
"command buffer: {}",
vk::to_string(vk::Result(submit_result)));
dfn.vkDestroyCommandPool(device, command_pool, nullptr);
dfn.vkDestroyBuffer(device, buffer, nullptr);
dfn.vkFreeMemory(device, buffer_memory, nullptr);
return false;
}
}
if (!submission_tracker.AwaitAllSubmissionsCompletion()) {
XELOGE(
"VulkanPresenter: Failed to await the guest output capturing fence");
dfn.vkDestroyCommandPool(device, command_pool, nullptr);
dfn.vkDestroyBuffer(device, buffer, nullptr);
dfn.vkFreeMemory(device, buffer_memory, nullptr);
return false;
// Destroying the completion timeline causes the submission to be awaited.
}
dfn.vkDestroyCommandPool(device, command_pool, nullptr);
@@ -474,8 +447,8 @@ VkCommandBuffer VulkanPresenter::AcquireUISetupCommandBufferFromUIThread() {
// Try to reuse an existing command buffer.
if (!paint_context_.ui_setup_command_buffers.empty()) {
uint64_t submission_index_completed =
ui_submission_tracker_.UpdateAndGetCompletedSubmission();
const uint64_t submission_index_completed =
ui_completion_timeline_.UpdateAndGetCompletedSubmission();
for (size_t i = 0; i < paint_context_.ui_setup_command_buffers.size();
++i) {
PaintContext::UISetupCommandBuffer& ui_setup_command_buffer =
@@ -498,7 +471,7 @@ VkCommandBuffer VulkanPresenter::AcquireUISetupCommandBufferFromUIThread() {
}
paint_context_.ui_setup_command_buffer_current_index = i;
ui_setup_command_buffer.last_usage_submission_index =
ui_submission_tracker_.GetCurrentSubmission();
ui_completion_timeline_.GetUpcomingSubmission();
return ui_setup_command_buffer.command_buffer;
}
}
@@ -541,7 +514,7 @@ VkCommandBuffer VulkanPresenter::AcquireUISetupCommandBufferFromUIThread() {
paint_context_.ui_setup_command_buffers.size();
paint_context_.ui_setup_command_buffers.emplace_back(
new_command_pool, new_command_buffer,
ui_submission_tracker_.GetCurrentSubmission());
ui_completion_timeline_.GetUpcomingSubmission());
return new_command_buffer;
}
@@ -872,8 +845,9 @@ bool VulkanPresenter::RefreshGuestOutputImpl(
if (image_instance.image &&
(image_instance.image->extent().width != frontbuffer_width ||
image_instance.image->extent().height != frontbuffer_height)) {
guest_output_image_refresher_submission_tracker_.AwaitSubmissionCompletion(
image_instance.last_refresher_submission);
guest_output_image_refresher_completion_timeline_
.AwaitSubmissionAndUpdateCompleted(
image_instance.last_refresher_submission);
image_instance.image.reset();
}
if (!image_instance.image) {
@@ -899,26 +873,21 @@ bool VulkanPresenter::RefreshGuestOutputImpl(
// signal and wait slightly longer, for nothing important, while shutting down
// than to destroy the image while it's still in use.
image_instance.last_refresher_submission =
guest_output_image_refresher_submission_tracker_.GetCurrentSubmission();
guest_output_image_refresher_completion_timeline_.GetUpcomingSubmission();
// No need to make the refresher signal the fence by itself - signal it here
// instead to have more control:
// "Fence signal operations that are defined by vkQueueSubmit additionally
// include in the first synchronization scope all commands that occur earlier
// in submission order."
const VulkanDevice::Functions& dfn = vulkan_device_->functions();
{
VulkanSubmissionTracker::FenceAcquisition fence_acqusition(
guest_output_image_refresher_submission_tracker_
.AcquireFenceToAdvanceSubmission());
const VulkanDevice::Queue::Acquisition queue_acquisition =
vulkan_device_->AcquireQueue(
vulkan_device_->queue_family_graphics_compute(), 0);
if (dfn.vkQueueSubmit(queue_acquisition.queue(), 0, nullptr,
fence_acqusition.fence()) != VK_SUCCESS) {
fence_acqusition.SubmissionSucceededSignalFailed();
}
const VkResult submit_result =
guest_output_image_refresher_completion_timeline_.AcquireFenceAndSubmit(
vulkan_device_->queue_family_graphics_compute(), 0, 0, nullptr);
if (submit_result != VK_SUCCESS) {
XELOGE(
"VulkanPresenter: Failed to submit the guest output image refresh "
"fence signal: {}",
vk::to_string(vk::Result(submit_result)));
}
return refresher_succeeded;
}
@@ -1272,7 +1241,7 @@ VkSwapchainKHR VulkanPresenter::PaintContext::CreateSwapchainForVulkanSurface(
VkSwapchainKHR VulkanPresenter::PaintContext::PrepareForSwapchainRetirement() {
if (swapchain != VK_NULL_HANDLE) {
submission_tracker.AwaitAllSubmissionsCompletion();
completion_timeline.AwaitAllSubmissions();
}
const VulkanDevice::Functions& dfn = vulkan_device->functions();
const VkDevice device = vulkan_device->device();
@@ -1380,13 +1349,11 @@ Presenter::PaintResult VulkanPresenter::PaintAndPresentImpl(
bool execute_ui_drawers) {
// Begin the submission in place of the one not currently potentially used on
// the GPU.
uint64_t current_paint_submission_index =
paint_context_.submission_tracker.GetCurrentSubmission();
const uint64_t current_paint_submission_index =
paint_context_.completion_timeline.GetUpcomingSubmission();
uint64_t paint_submission_count = uint64_t(paint_context_.submissions.size());
if (current_paint_submission_index >= paint_submission_count) {
paint_context_.submission_tracker.AwaitSubmissionCompletion(
current_paint_submission_index - paint_submission_count);
}
paint_context_.completion_timeline
.AwaitMaxSubmissionsPendingAndUpdateCompleted(paint_submission_count);
const PaintContext::Submission& paint_submission =
*paint_context_.submissions[current_paint_submission_index %
paint_submission_count];
@@ -1550,7 +1517,7 @@ Presenter::PaintResult VulkanPresenter::PaintAndPresentImpl(
}
// Await the completion of the usage of the old guest output image and
// its descriptors.
paint_context_.submission_tracker.AwaitSubmissionCompletion(
paint_context_.completion_timeline.AwaitSubmissionAndUpdateCompleted(
paint_context_
.guest_output_image_paint_refs
[guest_output_image_paint_ref_new_index]
@@ -1612,9 +1579,10 @@ Presenter::PaintResult VulkanPresenter::PaintAndPresentImpl(
// Need to replace immediately as a new image with the requested
// size is needed.
if (intermediate_image_ptr_ref) {
paint_context_.submission_tracker.AwaitSubmissionCompletion(
paint_context_
.guest_output_intermediate_image_last_submission);
paint_context_.completion_timeline
.AwaitSubmissionAndUpdateCompleted(
paint_context_
.guest_output_intermediate_image_last_submission);
intermediate_image_ptr_ref.reset();
util::DestroyAndNullHandle(
dfn.vkDestroyFramebuffer, device,
@@ -1691,7 +1659,7 @@ Presenter::PaintResult VulkanPresenter::PaintAndPresentImpl(
} else {
// Was previously needed, but not anymore - destroy when possible.
if (intermediate_image_ptr_ref &&
paint_context_.submission_tracker
paint_context_.completion_timeline
.UpdateAndGetCompletedSubmission() >=
paint_context_
.guest_output_intermediate_image_last_submission) {
@@ -1726,7 +1694,7 @@ Presenter::PaintResult VulkanPresenter::PaintAndPresentImpl(
if (swapchain_effect_pipeline.swapchain_pipeline != VK_NULL_HANDLE &&
swapchain_effect_pipeline.swapchain_format !=
paint_context_.swapchain_render_pass_format) {
paint_context_.submission_tracker.AwaitSubmissionCompletion(
paint_context_.completion_timeline.AwaitSubmissionAndUpdateCompleted(
paint_context_.guest_output_image_paint_last_submission);
util::DestroyAndNullHandle(
dfn.vkDestroyPipeline, device,
@@ -1954,10 +1922,10 @@ Presenter::PaintResult VulkanPresenter::PaintAndPresentImpl(
// Release main target guest output image references that aren't needed
// anymore (this is done after various potential guest-output-related main
// target submission tracker waits so the completed submission value is the
// target completion timeline waits so the completed submission index is the
// most actual).
uint64_t completed_paint_submission =
paint_context_.submission_tracker.UpdateAndGetCompletedSubmission();
paint_context_.completion_timeline.UpdateAndGetCompletedSubmission();
for (std::pair<uint64_t, std::shared_ptr<GuestOutputImage>>&
guest_output_image_paint_ref :
paint_context_.guest_output_image_paint_refs) {
@@ -1996,8 +1964,8 @@ Presenter::PaintResult VulkanPresenter::PaintAndPresentImpl(
VulkanUIDrawContext ui_draw_context(
*this, paint_context_.swapchain_extent.width,
paint_context_.swapchain_extent.height, draw_command_buffer,
ui_submission_tracker_.GetCurrentSubmission(),
ui_submission_tracker_.UpdateAndGetCompletedSubmission(),
ui_completion_timeline_.GetUpcomingSubmission(),
ui_completion_timeline_.UpdateAndGetCompletedSubmission(),
paint_context_.swapchain_render_pass,
paint_context_.swapchain_render_pass_format);
ExecuteUIDrawersFromUIThread(ui_draw_context);
@@ -2040,48 +2008,35 @@ Presenter::PaintResult VulkanPresenter::PaintAndPresentImpl(
submit_info.pCommandBuffers = command_buffers;
submit_info.signalSemaphoreCount = 1;
submit_info.pSignalSemaphores = &present_semaphore;
{
VulkanSubmissionTracker::FenceAcquisition fence_acqusition(
paint_context_.submission_tracker.AcquireFenceToAdvanceSubmission());
// Also update the submission tracker giving submission indices to UI draw
// callbacks if submission is successful.
VulkanSubmissionTracker::FenceAcquisition ui_fence_acquisition;
if (execute_ui_drawers) {
ui_fence_acquisition =
ui_submission_tracker_.AcquireFenceToAdvanceSubmission();
const VkResult submit_result =
paint_context_.completion_timeline.AcquireFenceAndSubmit(
vulkan_device_->queue_family_graphics_compute(), 0, 1, &submit_info);
if (submit_result != VK_SUCCESS) {
XELOGE(
"VulkanPresenter: Failed to submit the presentation command buffer: {}",
vk::to_string(vk::Result(submit_result)));
if (ui_setup_command_buffer_index != SIZE_MAX) {
// If failed to submit, make the UI setup command buffer available for
// immediate reuse, as the completed submission index won't be updated to
// the current index, and failing submissions with setup command buffer
// over and over will result in never reusing the setup command buffers.
paint_context_.ui_setup_command_buffers[ui_setup_command_buffer_index]
.last_usage_submission_index = 0;
}
VkResult submit_result;
{
const VulkanDevice::Queue::Acquisition queue_acquisition =
vulkan_device_->AcquireQueue(
vulkan_device_->queue_family_graphics_compute(), 0);
submit_result = dfn.vkQueueSubmit(queue_acquisition.queue(), 1,
&submit_info, fence_acqusition.fence());
if (ui_fence_acquisition.fence() != VK_NULL_HANDLE &&
submit_result == VK_SUCCESS) {
if (dfn.vkQueueSubmit(queue_acquisition.queue(), 0, nullptr,
ui_fence_acquisition.fence()) != VK_SUCCESS) {
ui_fence_acquisition.SubmissionSucceededSignalFailed();
}
}
}
if (submit_result != VK_SUCCESS) {
XELOGE("VulkanPresenter: Failed to submit command buffers");
fence_acqusition.SubmissionFailedOrDropped();
ui_fence_acquisition.SubmissionFailedOrDropped();
if (ui_setup_command_buffer_index != SIZE_MAX) {
// If failed to submit, make the UI setup command buffer available for
// immediate reuse, as the completed submission index won't be updated
// to the current index, and failing submissions with setup command
// buffer over and over will result in never reusing the setup command
// buffers.
paint_context_.ui_setup_command_buffers[ui_setup_command_buffer_index]
.last_usage_submission_index = 0;
}
// The image is in an acquired state - but now, it will be in it forever.
// To avoid that, recreate the swapchain - don't return just
// kNotPresented.
return PaintResult::kNotPresentedConnectionOutdated;
// The image is in an acquired state - but now, it will be in it forever.
// To avoid that, recreate the swapchain - don't return just kNotPresented.
return PaintResult::kNotPresentedConnectionOutdated;
}
if (execute_ui_drawers) {
// Also update the completion timeline providing submission indices to UI
// draw callbacks if submission is successful.
const VkResult ui_signal_submit_result =
ui_completion_timeline_.AcquireFenceAndSubmit(
vulkan_device_->queue_family_graphics_compute(), 0, 0, nullptr);
if (ui_signal_submit_result != VK_SUCCESS) {
XELOGE(
"VulkanPresenter: Failed to submit the UI drawing fence signal: {}",
vk::to_string(vk::Result(ui_signal_submit_result)));
}
}

View File

@@ -23,8 +23,8 @@
#include "xenia/ui/surface.h"
#include "xenia/ui/vulkan/ui_samplers.h"
#include "xenia/ui/vulkan/vulkan_device.h"
#include "xenia/ui/vulkan/vulkan_gpu_completion_timeline.h"
#include "xenia/ui/vulkan/vulkan_instance.h"
#include "xenia/ui/vulkan/vulkan_submission_tracker.h"
namespace xe {
namespace ui {
@@ -124,8 +124,8 @@ class VulkanPresenter final : public Presenter {
};
static std::unique_ptr<VulkanPresenter> Create(
HostGpuLossCallback host_gpu_loss_callback,
const VulkanDevice* vulkan_device, const UISamplers* ui_samplers) {
HostGpuLossCallback host_gpu_loss_callback, VulkanDevice* vulkan_device,
const UISamplers* ui_samplers) {
auto presenter = std::unique_ptr<VulkanPresenter>(new VulkanPresenter(
host_gpu_loss_callback, vulkan_device, ui_samplers));
if (!presenter->InitializeSurfaceIndependent()) {
@@ -136,7 +136,7 @@ class VulkanPresenter final : public Presenter {
~VulkanPresenter();
const VulkanDevice* vulkan_device() const { return vulkan_device_; }
VulkanDevice* vulkan_device() const { return vulkan_device_; }
static Surface::TypeFlags GetSurfaceTypesSupportedByInstance(
const VulkanInstance::Extensions& instance_extensions);
@@ -145,7 +145,7 @@ class VulkanPresenter final : public Presenter {
bool CaptureGuestOutput(RawImage& image_out) override;
void AwaitUISubmissionCompletionFromUIThread(uint64_t submission_index) {
ui_submission_tracker_.AwaitSubmissionCompletion(submission_index);
ui_completion_timeline_.AwaitSubmissionAndUpdateCompleted(submission_index);
}
VkCommandBuffer AcquireUISetupCommandBufferFromUIThread();
@@ -361,8 +361,8 @@ class VulkanPresenter final : public Presenter {
VkFramebuffer framebuffer;
};
explicit PaintContext(const VulkanDevice* const vulkan_device)
: vulkan_device(vulkan_device), submission_tracker(vulkan_device) {}
explicit PaintContext(VulkanDevice* const vulkan_device)
: vulkan_device(vulkan_device), completion_timeline(vulkan_device) {}
PaintContext(const PaintContext& paint_context) = delete;
PaintContext& operator=(const PaintContext& paint_context) = delete;
@@ -386,11 +386,11 @@ class VulkanPresenter final : public Presenter {
// Connection-indepedent.
const VulkanDevice* vulkan_device;
VulkanDevice* vulkan_device;
std::array<std::unique_ptr<PaintContext::Submission>, kSubmissionCount>
submissions;
VulkanSubmissionTracker submission_tracker;
VulkanGPUCompletionTimeline completion_timeline;
std::array<GuestOutputPaintPipeline, size_t(GuestOutputPaintEffect::kCount)>
guest_output_paint_pipelines;
@@ -445,13 +445,13 @@ class VulkanPresenter final : public Presenter {
};
explicit VulkanPresenter(HostGpuLossCallback host_gpu_loss_callback,
const VulkanDevice* vulkan_device,
VulkanDevice* vulkan_device,
const UISamplers* ui_samplers)
: Presenter(host_gpu_loss_callback),
vulkan_device_(vulkan_device),
ui_samplers_(ui_samplers),
guest_output_image_refresher_submission_tracker_(vulkan_device),
ui_submission_tracker_(vulkan_device),
guest_output_image_refresher_completion_timeline_(vulkan_device),
ui_completion_timeline_(vulkan_device),
paint_context_(vulkan_device) {
assert_not_null(vulkan_device);
assert_not_null(ui_samplers);
@@ -462,7 +462,7 @@ class VulkanPresenter final : public Presenter {
[[nodiscard]] VkPipeline CreateGuestOutputPaintPipeline(
GuestOutputPaintEffect effect, VkRenderPass render_pass);
const VulkanDevice* vulkan_device_;
VulkanDevice* vulkan_device_;
const UISamplers* ui_samplers_;
// Static objects for guest output presentation, used only when painting the
@@ -489,11 +489,11 @@ class VulkanPresenter final : public Presenter {
uint64_t guest_output_image_next_version_ = 0;
std::array<GuestOutputImageInstance, kGuestOutputMailboxSize>
guest_output_images_;
VulkanSubmissionTracker guest_output_image_refresher_submission_tracker_;
VulkanGPUCompletionTimeline guest_output_image_refresher_completion_timeline_;
// UI submission tracker with the submission index that can be given to UI
// drawers (accessible from the UI thread only, at any time).
VulkanSubmissionTracker ui_submission_tracker_;
// UI submission completion timeline with the submission index that can be
// given to UI drawers (accessible from the UI thread only, at any time).
VulkanGPUCompletionTimeline ui_completion_timeline_;
// Accessible only by painting and by surface connection lifetime management
// (ConnectOrReconnectPaintingToSurfaceFromUIThread,

View File

@@ -1,174 +0,0 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2021 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#include "xenia/ui/vulkan/vulkan_submission_tracker.h"
#include <cstdint>
#include "xenia/base/assert.h"
#include "xenia/ui/vulkan/vulkan_util.h"
namespace xe {
namespace ui {
namespace vulkan {
VulkanSubmissionTracker::FenceAcquisition::~FenceAcquisition() {
if (!submission_tracker_) {
// Dropped submission or left after std::move.
return;
}
assert_true(submission_tracker_->fence_acquired_ == fence_);
if (fence_ != VK_NULL_HANDLE) {
if (signal_failed_) {
// Left in the unsignaled state.
submission_tracker_->fences_reclaimed_.push_back(fence_);
} else {
// Left in the pending state.
submission_tracker_->fences_pending_.emplace_back(
submission_tracker_->submission_current_, fence_);
}
submission_tracker_->fence_acquired_ = VK_NULL_HANDLE;
}
++submission_tracker_->submission_current_;
}
void VulkanSubmissionTracker::Shutdown() {
AwaitAllSubmissionsCompletion();
const VulkanDevice::Functions& dfn = vulkan_device_->functions();
const VkDevice device = vulkan_device_->device();
for (VkFence fence : fences_reclaimed_) {
dfn.vkDestroyFence(device, fence, nullptr);
}
fences_reclaimed_.clear();
for (const std::pair<uint64_t, VkFence>& fence_pair : fences_pending_) {
dfn.vkDestroyFence(device, fence_pair.second, nullptr);
}
fences_pending_.clear();
assert_true(fence_acquired_ == VK_NULL_HANDLE);
util::DestroyAndNullHandle(dfn.vkDestroyFence, device, fence_acquired_);
}
void VulkanSubmissionTracker::FenceAcquisition::SubmissionFailedOrDropped() {
if (!submission_tracker_) {
return;
}
assert_true(submission_tracker_->fence_acquired_ == fence_);
if (fence_ != VK_NULL_HANDLE) {
submission_tracker_->fences_reclaimed_.push_back(fence_);
}
submission_tracker_->fence_acquired_ = VK_NULL_HANDLE;
fence_ = VK_NULL_HANDLE;
// No submission acquisition from now on, don't increment the current
// submission index as well.
submission_tracker_ = VK_NULL_HANDLE;
}
uint64_t VulkanSubmissionTracker::UpdateAndGetCompletedSubmission() {
if (!fences_pending_.empty()) {
const VulkanDevice::Functions& dfn = vulkan_device_->functions();
const VkDevice device = vulkan_device_->device();
while (!fences_pending_.empty()) {
const std::pair<uint64_t, VkFence>& pending_pair =
fences_pending_.front();
assert_true(pending_pair.first > submission_completed_on_gpu_);
if (dfn.vkGetFenceStatus(device, pending_pair.second) != VK_SUCCESS) {
break;
}
fences_reclaimed_.push_back(pending_pair.second);
submission_completed_on_gpu_ = pending_pair.first;
fences_pending_.pop_front();
}
}
return submission_completed_on_gpu_;
}
bool VulkanSubmissionTracker::AwaitSubmissionCompletion(
uint64_t submission_index) {
// The tracker itself can't give a submission index for a submission that
// hasn't even started being recorded yet, the client has provided a
// completely invalid value or has done overly optimistic math if such an
// index has been obtained somehow.
assert_true(submission_index <= submission_current_);
// Waiting for the current submission is fine if there was a failure or a
// refusal to submit, and the submission index wasn't incremented, but still
// need to release objects referenced in the dropped submission (while
// shutting down, for instance - in this case, waiting for the last successful
// submission, which could have also referenced the objects from the new
// submission - we can't know since the client has already overwritten its
// last usage index, would correctly ensure that GPU usage of the objects is
// not pending). Waiting for successful submissions, but failed signals, will
// result in a true race condition, however, but waiting for the closest
// successful signal is the best approximation - also retrying to signal in
// this case.
// Go from the most recent to wait only for one fence, which includes all the
// preceding ones.
// "Fence signal operations that are defined by vkQueueSubmit additionally
// include in the first synchronization scope all commands that occur earlier
// in submission order."
size_t reclaim_end = fences_pending_.size();
if (reclaim_end) {
const VulkanDevice::Functions& dfn = vulkan_device_->functions();
const VkDevice device = vulkan_device_->device();
while (reclaim_end) {
const std::pair<uint64_t, VkFence>& pending_pair =
fences_pending_[reclaim_end - 1];
assert_true(pending_pair.first > submission_completed_on_gpu_);
if (pending_pair.first <= submission_index) {
// Wait if requested.
if (dfn.vkWaitForFences(device, 1, &pending_pair.second, VK_TRUE,
UINT64_MAX) == VK_SUCCESS) {
break;
}
}
// Just refresh the completed submission.
if (dfn.vkGetFenceStatus(device, pending_pair.second) == VK_SUCCESS) {
break;
}
--reclaim_end;
}
if (reclaim_end) {
submission_completed_on_gpu_ = fences_pending_[reclaim_end - 1].first;
for (; reclaim_end; --reclaim_end) {
fences_reclaimed_.push_back(fences_pending_.front().second);
fences_pending_.pop_front();
}
}
}
return submission_completed_on_gpu_ == submission_index;
}
VulkanSubmissionTracker::FenceAcquisition
VulkanSubmissionTracker::AcquireFenceToAdvanceSubmission() {
assert_true(fence_acquired_ == VK_NULL_HANDLE);
// Reclaim fences if the client only gets the completed submission index or
// awaits in special cases such as shutdown.
UpdateAndGetCompletedSubmission();
const VulkanDevice::Functions& dfn = vulkan_device_->functions();
const VkDevice device = vulkan_device_->device();
if (!fences_reclaimed_.empty()) {
VkFence reclaimed_fence = fences_reclaimed_.back();
if (dfn.vkResetFences(device, 1, &reclaimed_fence) == VK_SUCCESS) {
fence_acquired_ = fences_reclaimed_.back();
fences_reclaimed_.pop_back();
}
}
if (fence_acquired_ == VK_NULL_HANDLE) {
VkFenceCreateInfo fence_create_info;
fence_create_info.sType = VK_STRUCTURE_TYPE_FENCE_CREATE_INFO;
fence_create_info.pNext = nullptr;
fence_create_info.flags = 0;
// May fail, a null fence is handled in FenceAcquisition.
dfn.vkCreateFence(device, &fence_create_info, nullptr, &fence_acquired_);
}
return FenceAcquisition(*this, fence_acquired_);
}
} // namespace vulkan
} // namespace ui
} // namespace xe

View File

@@ -1,141 +0,0 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2021 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#ifndef XENIA_UI_VULKAN_VULKAN_SUBMISSION_TRACKER_H_
#define XENIA_UI_VULKAN_VULKAN_SUBMISSION_TRACKER_H_
#include <cstdint>
#include <deque>
#include <utility>
#include <vector>
#include "xenia/base/assert.h"
#include "xenia/ui/vulkan/vulkan_device.h"
namespace xe {
namespace ui {
namespace vulkan {
// Fence wrapper, safely handling cases when the fence has not been initialized
// yet or has already been shut down, and failed or dropped submissions.
//
// The current submission index can be associated with the usage of objects to
// release them when the GPU isn't potentially referencing them anymore, and
// should be incremented only
//
// 0 can be used as a "never referenced" submission index.
//
// The submission index timeline survives Shutdown, so submission indices can be
// given to clients that are not aware of the lifetime of the tracker.
//
// To transfer the tracker to another queue (to make sure the first signal on
// the new queue does not happen before the last signal on the old one), call
// AwaitAllSubmissionsCompletion before doing the first submission on the new
// one.
class VulkanSubmissionTracker {
public:
class FenceAcquisition {
public:
FenceAcquisition() : submission_tracker_(nullptr), fence_(VK_NULL_HANDLE) {}
FenceAcquisition(VulkanSubmissionTracker& submission_tracker, VkFence fence)
: submission_tracker_(&submission_tracker), fence_(fence) {}
FenceAcquisition(const FenceAcquisition& fence_acquisition) = delete;
FenceAcquisition& operator=(const FenceAcquisition& fence_acquisition) =
delete;
FenceAcquisition(FenceAcquisition&& fence_acquisition) {
*this = std::move(fence_acquisition);
}
FenceAcquisition& operator=(FenceAcquisition&& fence_acquisition) {
if (this == &fence_acquisition) {
return *this;
}
submission_tracker_ = fence_acquisition.submission_tracker_;
fence_acquisition.submission_tracker_ = nullptr;
fence_ = fence_acquisition.fence_;
fence_acquisition.fence_ = VK_NULL_HANDLE;
return *this;
}
~FenceAcquisition();
// In unsignaled state. May be null if failed to create or to reset a fence.
VkFence fence() { return fence_; }
// Call if vkQueueSubmit has failed (or it was decided not to commit the
// submission), and the submission index shouldn't be incremented by
// releasing this submission (for instance, to retry commands with long-term
// effects like copying or image layout changes later if in the attempt the
// submission index stays the same).
void SubmissionFailedOrDropped();
// Call if for some reason (like signaling multiple fences) the fence
// signaling was done in a separate submission than the command buffer, and
// the command buffer vkQueueSubmit succeeded (so commands with long-term
// effects will be executed), but the fence-only vkQueueSubmit has failed,
// thus the tracker shouldn't attempt to wait for that fence (it will be in
// the unsignaled state).
void SubmissionSucceededSignalFailed() { signal_failed_ = true; }
private:
// If nullptr, has been moved to another FenceAcquisition - not holding a
// fence from now on.
VulkanSubmissionTracker* submission_tracker_;
VkFence fence_;
bool signal_failed_ = false;
};
VulkanSubmissionTracker(const VulkanDevice* vulkan_device)
: vulkan_device_(vulkan_device) {
assert_not_null(vulkan_device);
}
VulkanSubmissionTracker(const VulkanSubmissionTracker& submission_tracker) =
delete;
VulkanSubmissionTracker& operator=(
const VulkanSubmissionTracker& submission_tracker) = delete;
~VulkanSubmissionTracker() { Shutdown(); }
void Shutdown();
uint64_t GetCurrentSubmission() const { return submission_current_; }
uint64_t UpdateAndGetCompletedSubmission();
// Returns whether the expected GPU signal has actually been reached (rather
// than some fallback condition) for cases when stronger completeness
// guarantees as needed (when downloading, as opposed to just destroying).
// If false is returned, it's also not guaranteed that GetCompletedSubmission
// will return a value >= submission_index.
bool AwaitSubmissionCompletion(uint64_t submission_index);
bool AwaitAllSubmissionsCompletion() {
return AwaitSubmissionCompletion(submission_current_ - 1);
}
[[nodiscard]] FenceAcquisition AcquireFenceToAdvanceSubmission();
private:
const VulkanDevice* vulkan_device_;
uint64_t submission_current_ = 1;
// Last submission with a successful fence signal as well as a successful
// fence wait / query.
uint64_t submission_completed_on_gpu_ = 0;
// The flow is:
// Reclaimed (or create if empty) > acquired > pending > reclaimed.
// Or, if dropped the submission while acquired:
// Reclaimed (or create if empty) > acquired > reclaimed.
VkFence fence_acquired_ = VK_NULL_HANDLE;
// Ordered by the submission index (the first pair member).
std::deque<std::pair<uint64_t, VkFence>> fences_pending_;
// Fences are reclaimed when awaiting or when refreshing the completed value.
std::vector<VkFence> fences_reclaimed_;
};
} // namespace vulkan
} // namespace ui
} // namespace xe
#endif // XENIA_UI_VULKAN_VULKAN_SUBMISSION_TRACKER_H_

View File

@@ -19,8 +19,9 @@
// Must be included before Windows headers for things like NOMINMAX.
#include "xenia/base/platform_win.h"
#include "xenia/ui/dxgi_include_win.h"
#include <ShellScalingApi.h>
#include <dxgi.h>
namespace xe {
namespace ui {