Merge branch 'master' into vulkan
This commit is contained in:
commit
53adafa156
|
@ -819,11 +819,23 @@ std::unique_ptr<xe::ui::RawImage> D3D12CommandProcessor::Capture() {
|
||||||
const uint8_t* readback_source_data =
|
const uint8_t* readback_source_data =
|
||||||
reinterpret_cast<const uint8_t*>(readback_mapping) +
|
reinterpret_cast<const uint8_t*>(readback_mapping) +
|
||||||
swap_texture_copy_footprint_.Offset;
|
swap_texture_copy_footprint_.Offset;
|
||||||
|
static_assert(
|
||||||
|
ui::d3d12::D3D12Context::kSwapChainFormat == DXGI_FORMAT_B8G8R8A8_UNORM,
|
||||||
|
"D3D12CommandProcessor::Capture assumes swap_texture_ to be in "
|
||||||
|
"DXGI_FORMAT_B8G8R8A8_UNORM because it swaps red and blue");
|
||||||
for (uint32_t i = 0; i < swap_texture_size.second; ++i) {
|
for (uint32_t i = 0; i < swap_texture_size.second; ++i) {
|
||||||
std::memcpy(raw_image->data.data() + i * raw_image->stride,
|
uint8_t* pixel_dest = raw_image->data.data() + i * raw_image->stride;
|
||||||
readback_source_data +
|
const uint8_t* pixel_source =
|
||||||
i * swap_texture_copy_footprint_.Footprint.RowPitch,
|
readback_source_data +
|
||||||
raw_image->stride);
|
i * swap_texture_copy_footprint_.Footprint.RowPitch;
|
||||||
|
for (uint32_t j = 0; j < swap_texture_size.first; ++j) {
|
||||||
|
pixel_dest[0] = pixel_source[2];
|
||||||
|
pixel_dest[1] = pixel_source[1];
|
||||||
|
pixel_dest[2] = pixel_source[0];
|
||||||
|
pixel_dest[3] = pixel_source[3];
|
||||||
|
pixel_dest += 4;
|
||||||
|
pixel_source += 4;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return raw_image;
|
return raw_image;
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,27 +28,9 @@ namespace d3d12 {
|
||||||
#include "xenia/ui/shaders/bytecode/d3d12_5_1/immediate_ps.h"
|
#include "xenia/ui/shaders/bytecode/d3d12_5_1/immediate_ps.h"
|
||||||
#include "xenia/ui/shaders/bytecode/d3d12_5_1/immediate_vs.h"
|
#include "xenia/ui/shaders/bytecode/d3d12_5_1/immediate_vs.h"
|
||||||
|
|
||||||
class D3D12ImmediateTexture : public ImmediateTexture {
|
D3D12ImmediateDrawer::D3D12ImmediateTexture::D3D12ImmediateTexture(
|
||||||
public:
|
uint32_t width, uint32_t height, ID3D12Resource* resource_if_exists,
|
||||||
static constexpr DXGI_FORMAT kFormat = DXGI_FORMAT_R8G8B8A8_UNORM;
|
ImmediateTextureFilter filter, bool is_repeated)
|
||||||
D3D12ImmediateTexture(uint32_t width, uint32_t height,
|
|
||||||
ID3D12Resource* resource_if_exists,
|
|
||||||
ImmediateTextureFilter filter, bool is_repeated);
|
|
||||||
~D3D12ImmediateTexture() override;
|
|
||||||
ID3D12Resource* resource() const { return resource_; }
|
|
||||||
ImmediateTextureFilter filter() const { return filter_; }
|
|
||||||
bool is_repeated() const { return is_repeated_; }
|
|
||||||
|
|
||||||
private:
|
|
||||||
ID3D12Resource* resource_;
|
|
||||||
ImmediateTextureFilter filter_;
|
|
||||||
bool is_repeated_;
|
|
||||||
};
|
|
||||||
|
|
||||||
D3D12ImmediateTexture::D3D12ImmediateTexture(uint32_t width, uint32_t height,
|
|
||||||
ID3D12Resource* resource_if_exists,
|
|
||||||
ImmediateTextureFilter filter,
|
|
||||||
bool is_repeated)
|
|
||||||
: ImmediateTexture(width, height),
|
: ImmediateTexture(width, height),
|
||||||
resource_(resource_if_exists),
|
resource_(resource_if_exists),
|
||||||
filter_(filter),
|
filter_(filter),
|
||||||
|
@ -59,9 +41,12 @@ D3D12ImmediateTexture::D3D12ImmediateTexture(uint32_t width, uint32_t height,
|
||||||
handle = reinterpret_cast<uintptr_t>(this);
|
handle = reinterpret_cast<uintptr_t>(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
D3D12ImmediateTexture::~D3D12ImmediateTexture() {
|
D3D12ImmediateDrawer::D3D12ImmediateTexture::~D3D12ImmediateTexture() {
|
||||||
if (resource_) {
|
if (resource_) {
|
||||||
resource_->Release();
|
resource_->Release();
|
||||||
|
// TODO(Triang3l): Track last usage submission because it turns out that
|
||||||
|
// deletion in the ImGui and the profiler actually happens before after
|
||||||
|
// awaiting submission completion.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,15 +62,6 @@ bool D3D12ImmediateDrawer::Initialize() {
|
||||||
// Create the root signature.
|
// Create the root signature.
|
||||||
D3D12_ROOT_PARAMETER root_parameters[size_t(RootParameter::kCount)];
|
D3D12_ROOT_PARAMETER root_parameters[size_t(RootParameter::kCount)];
|
||||||
D3D12_DESCRIPTOR_RANGE descriptor_range_texture, descriptor_range_sampler;
|
D3D12_DESCRIPTOR_RANGE descriptor_range_texture, descriptor_range_sampler;
|
||||||
{
|
|
||||||
auto& root_parameter =
|
|
||||||
root_parameters[size_t(RootParameter::kRestrictTextureSamples)];
|
|
||||||
root_parameter.ParameterType = D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS;
|
|
||||||
root_parameter.Constants.ShaderRegister = 0;
|
|
||||||
root_parameter.Constants.RegisterSpace = 0;
|
|
||||||
root_parameter.Constants.Num32BitValues = 1;
|
|
||||||
root_parameter.ShaderVisibility = D3D12_SHADER_VISIBILITY_PIXEL;
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
auto& root_parameter = root_parameters[size_t(RootParameter::kTexture)];
|
auto& root_parameter = root_parameters[size_t(RootParameter::kTexture)];
|
||||||
root_parameter.ParameterType = D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE;
|
root_parameter.ParameterType = D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE;
|
||||||
|
@ -216,20 +192,12 @@ bool D3D12ImmediateDrawer::Initialize() {
|
||||||
sampler_heap_gpu_start_ = sampler_heap_->GetGPUDescriptorHandleForHeapStart();
|
sampler_heap_gpu_start_ = sampler_heap_->GetGPUDescriptorHandleForHeapStart();
|
||||||
uint32_t sampler_size = provider.GetSamplerDescriptorSize();
|
uint32_t sampler_size = provider.GetSamplerDescriptorSize();
|
||||||
// Nearest neighbor, clamp.
|
// Nearest neighbor, clamp.
|
||||||
D3D12_SAMPLER_DESC sampler_desc;
|
D3D12_SAMPLER_DESC sampler_desc = {};
|
||||||
sampler_desc.Filter = D3D12_FILTER_MIN_MAG_MIP_POINT;
|
sampler_desc.Filter = D3D12_FILTER_MIN_MAG_MIP_POINT;
|
||||||
sampler_desc.AddressU = D3D12_TEXTURE_ADDRESS_MODE_CLAMP;
|
sampler_desc.AddressU = D3D12_TEXTURE_ADDRESS_MODE_CLAMP;
|
||||||
sampler_desc.AddressV = D3D12_TEXTURE_ADDRESS_MODE_CLAMP;
|
sampler_desc.AddressV = D3D12_TEXTURE_ADDRESS_MODE_CLAMP;
|
||||||
sampler_desc.AddressW = D3D12_TEXTURE_ADDRESS_MODE_CLAMP;
|
sampler_desc.AddressW = D3D12_TEXTURE_ADDRESS_MODE_CLAMP;
|
||||||
sampler_desc.MipLODBias = 0.0f;
|
|
||||||
sampler_desc.MaxAnisotropy = 1;
|
sampler_desc.MaxAnisotropy = 1;
|
||||||
sampler_desc.ComparisonFunc = D3D12_COMPARISON_FUNC_NEVER;
|
|
||||||
sampler_desc.BorderColor[0] = 0.0f;
|
|
||||||
sampler_desc.BorderColor[1] = 0.0f;
|
|
||||||
sampler_desc.BorderColor[2] = 0.0f;
|
|
||||||
sampler_desc.BorderColor[3] = 0.0f;
|
|
||||||
sampler_desc.MinLOD = 0.0f;
|
|
||||||
sampler_desc.MaxLOD = 0.0f;
|
|
||||||
D3D12_CPU_DESCRIPTOR_HANDLE sampler_handle;
|
D3D12_CPU_DESCRIPTOR_HANDLE sampler_handle;
|
||||||
sampler_handle.ptr = sampler_heap_cpu_start_.ptr +
|
sampler_handle.ptr = sampler_heap_cpu_start_.ptr +
|
||||||
uint32_t(SamplerIndex::kNearestClamp) * sampler_size;
|
uint32_t(SamplerIndex::kNearestClamp) * sampler_size;
|
||||||
|
@ -239,19 +207,18 @@ bool D3D12ImmediateDrawer::Initialize() {
|
||||||
sampler_handle.ptr = sampler_heap_cpu_start_.ptr +
|
sampler_handle.ptr = sampler_heap_cpu_start_.ptr +
|
||||||
uint32_t(SamplerIndex::kLinearClamp) * sampler_size;
|
uint32_t(SamplerIndex::kLinearClamp) * sampler_size;
|
||||||
device->CreateSampler(&sampler_desc, sampler_handle);
|
device->CreateSampler(&sampler_desc, sampler_handle);
|
||||||
// Nearest neighbor, repeat.
|
// Bilinear, repeat.
|
||||||
sampler_desc.Filter = D3D12_FILTER_MIN_MAG_MIP_POINT;
|
|
||||||
sampler_desc.AddressU = D3D12_TEXTURE_ADDRESS_MODE_WRAP;
|
sampler_desc.AddressU = D3D12_TEXTURE_ADDRESS_MODE_WRAP;
|
||||||
sampler_desc.AddressV = D3D12_TEXTURE_ADDRESS_MODE_WRAP;
|
sampler_desc.AddressV = D3D12_TEXTURE_ADDRESS_MODE_WRAP;
|
||||||
sampler_desc.AddressW = D3D12_TEXTURE_ADDRESS_MODE_WRAP;
|
sampler_desc.AddressW = D3D12_TEXTURE_ADDRESS_MODE_WRAP;
|
||||||
sampler_handle.ptr = sampler_heap_cpu_start_.ptr +
|
|
||||||
uint32_t(SamplerIndex::kNearestRepeat) * sampler_size;
|
|
||||||
device->CreateSampler(&sampler_desc, sampler_handle);
|
|
||||||
// Bilinear, repeat.
|
|
||||||
sampler_desc.Filter = D3D12_FILTER_MIN_MAG_MIP_LINEAR;
|
|
||||||
sampler_handle.ptr = sampler_heap_cpu_start_.ptr +
|
sampler_handle.ptr = sampler_heap_cpu_start_.ptr +
|
||||||
uint32_t(SamplerIndex::kLinearRepeat) * sampler_size;
|
uint32_t(SamplerIndex::kLinearRepeat) * sampler_size;
|
||||||
device->CreateSampler(&sampler_desc, sampler_handle);
|
device->CreateSampler(&sampler_desc, sampler_handle);
|
||||||
|
// Nearest neighbor, repeat.
|
||||||
|
sampler_desc.Filter = D3D12_FILTER_MIN_MAG_MIP_POINT;
|
||||||
|
sampler_handle.ptr = sampler_heap_cpu_start_.ptr +
|
||||||
|
uint32_t(SamplerIndex::kNearestRepeat) * sampler_size;
|
||||||
|
device->CreateSampler(&sampler_desc, sampler_handle);
|
||||||
|
|
||||||
// Create pools for draws.
|
// Create pools for draws.
|
||||||
vertex_buffer_pool_ = std::make_unique<D3D12UploadBufferPool>(provider);
|
vertex_buffer_pool_ = std::make_unique<D3D12UploadBufferPool>(provider);
|
||||||
|
@ -333,25 +300,30 @@ std::unique_ptr<ImmediateTexture> D3D12ImmediateDrawer::CreateTexture(
|
||||||
void* upload_buffer_mapping;
|
void* upload_buffer_mapping;
|
||||||
if (SUCCEEDED(upload_buffer->Map(0, &upload_buffer_read_range,
|
if (SUCCEEDED(upload_buffer->Map(0, &upload_buffer_read_range,
|
||||||
&upload_buffer_mapping))) {
|
&upload_buffer_mapping))) {
|
||||||
uint8_t* upload_buffer_row =
|
size_t data_row_length = sizeof(uint32_t) * width;
|
||||||
reinterpret_cast<uint8_t*>(upload_buffer_mapping) +
|
if (data_row_length == upload_footprint.Footprint.RowPitch) {
|
||||||
upload_footprint.Offset;
|
std::memcpy(upload_buffer_mapping, data, data_row_length * height);
|
||||||
const uint8_t* data_row = data;
|
} else {
|
||||||
for (uint32_t i = 0; i < height; ++i) {
|
uint8_t* upload_buffer_row =
|
||||||
std::memcpy(upload_buffer_row, data_row, width * 4);
|
reinterpret_cast<uint8_t*>(upload_buffer_mapping) +
|
||||||
data_row += width * 4;
|
upload_footprint.Offset;
|
||||||
upload_buffer_row += upload_footprint.Footprint.RowPitch;
|
const uint8_t* data_row = data;
|
||||||
|
for (uint32_t i = 0; i < height; ++i) {
|
||||||
|
std::memcpy(upload_buffer_row, data_row, data_row_length);
|
||||||
|
data_row += data_row_length;
|
||||||
|
upload_buffer_row += upload_footprint.Footprint.RowPitch;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
upload_buffer->Unmap(0, nullptr);
|
upload_buffer->Unmap(0, nullptr);
|
||||||
// Defer uploading and transition to the next draw.
|
// Defer uploading and transition to the next draw.
|
||||||
PendingTextureUpload pending_upload;
|
PendingTextureUpload& pending_upload =
|
||||||
|
texture_uploads_pending_.emplace_back();
|
||||||
// While the upload has not been yet completed, keep a reference to the
|
// While the upload has not been yet completed, keep a reference to the
|
||||||
// resource because its lifetime is not tied to that of the
|
// resource because its lifetime is not tied to that of the
|
||||||
// ImmediateTexture (and thus to context's submissions) now.
|
// ImmediateTexture (and thus to context's submissions) now.
|
||||||
resource->AddRef();
|
resource->AddRef();
|
||||||
pending_upload.texture = resource;
|
pending_upload.texture = resource;
|
||||||
pending_upload.buffer = upload_buffer;
|
pending_upload.buffer = upload_buffer;
|
||||||
texture_uploads_pending_.push_back(pending_upload);
|
|
||||||
} else {
|
} else {
|
||||||
XELOGE(
|
XELOGE(
|
||||||
"Failed to map a Direct3D 12 upload buffer for a {}x{} texture for "
|
"Failed to map a Direct3D 12 upload buffer for a {}x{} texture for "
|
||||||
|
@ -401,9 +373,7 @@ void D3D12ImmediateDrawer::Begin(int render_target_width,
|
||||||
// Release upload buffers for completed texture uploads.
|
// Release upload buffers for completed texture uploads.
|
||||||
auto erase_uploads_end = texture_uploads_submitted_.begin();
|
auto erase_uploads_end = texture_uploads_submitted_.begin();
|
||||||
while (erase_uploads_end != texture_uploads_submitted_.end()) {
|
while (erase_uploads_end != texture_uploads_submitted_.end()) {
|
||||||
uint64_t upload_fence_value = erase_uploads_end->fence_value;
|
if (erase_uploads_end->fence_value > completed_fence_value) {
|
||||||
if (upload_fence_value > completed_fence_value) {
|
|
||||||
++erase_uploads_end;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
erase_uploads_end->buffer->Release();
|
erase_uploads_end->buffer->Release();
|
||||||
|
@ -606,12 +576,6 @@ void D3D12ImmediateDrawer::Draw(const ImmediateDraw& draw) {
|
||||||
uint32_t(sampler_index)));
|
uint32_t(sampler_index)));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set whether texture coordinates need to be restricted.
|
|
||||||
uint32_t restrict_texture_samples = draw.restrict_texture_samples ? 1 : 0;
|
|
||||||
current_command_list_->SetGraphicsRoot32BitConstants(
|
|
||||||
UINT(RootParameter::kRestrictTextureSamples), 1,
|
|
||||||
&restrict_texture_samples, 0);
|
|
||||||
|
|
||||||
// Set the primitive type and the pipeline state for it.
|
// Set the primitive type and the pipeline state for it.
|
||||||
D3D_PRIMITIVE_TOPOLOGY primitive_topology;
|
D3D_PRIMITIVE_TOPOLOGY primitive_topology;
|
||||||
ID3D12PipelineState* pipeline_state;
|
ID3D12PipelineState* pipeline_state;
|
||||||
|
@ -668,9 +632,7 @@ void D3D12ImmediateDrawer::UploadTextures() {
|
||||||
// pipeline barriers).
|
// pipeline barriers).
|
||||||
std::vector<D3D12_RESOURCE_BARRIER> barriers;
|
std::vector<D3D12_RESOURCE_BARRIER> barriers;
|
||||||
barriers.reserve(texture_uploads_pending_.size());
|
barriers.reserve(texture_uploads_pending_.size());
|
||||||
while (!texture_uploads_pending_.empty()) {
|
for (const PendingTextureUpload& pending_upload : texture_uploads_pending_) {
|
||||||
const PendingTextureUpload& pending_upload =
|
|
||||||
texture_uploads_pending_.back();
|
|
||||||
ID3D12Resource* texture = pending_upload.texture;
|
ID3D12Resource* texture = pending_upload.texture;
|
||||||
|
|
||||||
D3D12_RESOURCE_DESC texture_desc = texture->GetDesc();
|
D3D12_RESOURCE_DESC texture_desc = texture->GetDesc();
|
||||||
|
@ -694,15 +656,15 @@ void D3D12ImmediateDrawer::UploadTextures() {
|
||||||
barrier.Transition.StateBefore = D3D12_RESOURCE_STATE_COPY_DEST;
|
barrier.Transition.StateBefore = D3D12_RESOURCE_STATE_COPY_DEST;
|
||||||
barrier.Transition.StateAfter = D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE;
|
barrier.Transition.StateAfter = D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE;
|
||||||
|
|
||||||
SubmittedTextureUpload submitted_upload;
|
SubmittedTextureUpload& submitted_upload =
|
||||||
|
texture_uploads_submitted_.emplace_back();
|
||||||
// Transfer the reference to the texture - need to keep it until the upload
|
// Transfer the reference to the texture - need to keep it until the upload
|
||||||
// is completed.
|
// is completed.
|
||||||
submitted_upload.texture = texture;
|
submitted_upload.texture = texture;
|
||||||
submitted_upload.buffer = pending_upload.buffer;
|
submitted_upload.buffer = pending_upload.buffer;
|
||||||
submitted_upload.fence_value = current_fence_value;
|
submitted_upload.fence_value = current_fence_value;
|
||||||
texture_uploads_submitted_.push_back(submitted_upload);
|
|
||||||
texture_uploads_pending_.pop_back();
|
|
||||||
}
|
}
|
||||||
|
texture_uploads_pending_.clear();
|
||||||
assert_false(barriers.empty());
|
assert_false(barriers.empty());
|
||||||
current_command_list_->ResourceBarrier(UINT(barriers.size()),
|
current_command_list_->ResourceBarrier(UINT(barriers.size()),
|
||||||
barriers.data());
|
barriers.data());
|
||||||
|
|
|
@ -36,7 +36,7 @@ class D3D12ImmediateDrawer : public ImmediateDrawer {
|
||||||
std::unique_ptr<ImmediateTexture> CreateTexture(uint32_t width,
|
std::unique_ptr<ImmediateTexture> CreateTexture(uint32_t width,
|
||||||
uint32_t height,
|
uint32_t height,
|
||||||
ImmediateTextureFilter filter,
|
ImmediateTextureFilter filter,
|
||||||
bool repeat,
|
bool is_repeated,
|
||||||
const uint8_t* data) override;
|
const uint8_t* data) override;
|
||||||
|
|
||||||
void Begin(int render_target_width, int render_target_height) override;
|
void Begin(int render_target_width, int render_target_height) override;
|
||||||
|
@ -46,13 +46,29 @@ class D3D12ImmediateDrawer : public ImmediateDrawer {
|
||||||
void End() override;
|
void End() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
class D3D12ImmediateTexture : public ImmediateTexture {
|
||||||
|
public:
|
||||||
|
static constexpr DXGI_FORMAT kFormat = DXGI_FORMAT_R8G8B8A8_UNORM;
|
||||||
|
D3D12ImmediateTexture(uint32_t width, uint32_t height,
|
||||||
|
ID3D12Resource* resource_if_exists,
|
||||||
|
ImmediateTextureFilter filter, bool is_repeated);
|
||||||
|
~D3D12ImmediateTexture() override;
|
||||||
|
ID3D12Resource* resource() const { return resource_; }
|
||||||
|
ImmediateTextureFilter filter() const { return filter_; }
|
||||||
|
bool is_repeated() const { return is_repeated_; }
|
||||||
|
|
||||||
|
private:
|
||||||
|
ID3D12Resource* resource_;
|
||||||
|
ImmediateTextureFilter filter_;
|
||||||
|
bool is_repeated_;
|
||||||
|
};
|
||||||
|
|
||||||
void UploadTextures();
|
void UploadTextures();
|
||||||
|
|
||||||
D3D12Context& context_;
|
D3D12Context& context_;
|
||||||
|
|
||||||
ID3D12RootSignature* root_signature_ = nullptr;
|
ID3D12RootSignature* root_signature_ = nullptr;
|
||||||
enum class RootParameter {
|
enum class RootParameter {
|
||||||
kRestrictTextureSamples,
|
|
||||||
kTexture,
|
kTexture,
|
||||||
kSampler,
|
kSampler,
|
||||||
kViewportSizeInv,
|
kViewportSizeInv,
|
||||||
|
|
|
@ -80,8 +80,6 @@ struct ImmediateDraw {
|
||||||
// Texture used when drawing, or nullptr if color only.
|
// Texture used when drawing, or nullptr if color only.
|
||||||
// This is most commonly the handle of an ImmediateTexture.
|
// This is most commonly the handle of an ImmediateTexture.
|
||||||
uintptr_t texture_handle = 0;
|
uintptr_t texture_handle = 0;
|
||||||
// Any samples outside of [0-1] on uv will be ignored.
|
|
||||||
bool restrict_texture_samples = false;
|
|
||||||
|
|
||||||
// True to enable scissoring using the region defined by scissor_rect.
|
// True to enable scissoring using the region defined by scissor_rect.
|
||||||
bool scissor = false;
|
bool scissor = false;
|
||||||
|
|
|
@ -24,6 +24,7 @@ const int kFontTextureHeight = 9;
|
||||||
const int kFontCharWidth = 5;
|
const int kFontCharWidth = 5;
|
||||||
const int kFontCharHeight = 8;
|
const int kFontCharHeight = 8;
|
||||||
|
|
||||||
|
// The last texel is for solid color.
|
||||||
const uint8_t kFontData[] = {
|
const uint8_t kFontData[] = {
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
@ -120,7 +121,7 @@ const uint8_t kFontData[] = {
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
|
||||||
};
|
};
|
||||||
|
|
||||||
MicroprofileDrawer::MicroprofileDrawer(xe::ui::Window* window)
|
MicroprofileDrawer::MicroprofileDrawer(xe::ui::Window* window)
|
||||||
|
@ -216,7 +217,6 @@ void MicroprofileDrawer::Flush() {
|
||||||
draw.primitive_type = current_primitive_type_;
|
draw.primitive_type = current_primitive_type_;
|
||||||
draw.count = vertex_count_;
|
draw.count = vertex_count_;
|
||||||
draw.texture_handle = font_texture_->handle;
|
draw.texture_handle = font_texture_->handle;
|
||||||
draw.restrict_texture_samples = true;
|
|
||||||
drawer->Draw(draw);
|
drawer->Draw(draw);
|
||||||
|
|
||||||
drawer->EndDrawBatch();
|
drawer->EndDrawBatch();
|
||||||
|
@ -242,23 +242,23 @@ void MicroprofileDrawer::DrawBox(int x0, int y0, int x1, int y1, uint32_t color,
|
||||||
Q0(v, x, static_cast<float>(x0));
|
Q0(v, x, static_cast<float>(x0));
|
||||||
Q0(v, y, static_cast<float>(y0));
|
Q0(v, y, static_cast<float>(y0));
|
||||||
Q0(v, color, color);
|
Q0(v, color, color);
|
||||||
Q0(v, u, 2.0f);
|
Q0(v, u, 1.0f);
|
||||||
Q0(v, v, 2.0f);
|
Q0(v, v, 1.0f);
|
||||||
Q1(v, x, static_cast<float>(x1));
|
Q1(v, x, static_cast<float>(x1));
|
||||||
Q1(v, y, static_cast<float>(y0));
|
Q1(v, y, static_cast<float>(y0));
|
||||||
Q1(v, color, color);
|
Q1(v, color, color);
|
||||||
Q1(v, u, 2.0f);
|
Q1(v, u, 1.0f);
|
||||||
Q1(v, v, 2.0f);
|
Q1(v, v, 1.0f);
|
||||||
Q2(v, x, static_cast<float>(x1));
|
Q2(v, x, static_cast<float>(x1));
|
||||||
Q2(v, y, static_cast<float>(y1));
|
Q2(v, y, static_cast<float>(y1));
|
||||||
Q2(v, color, color);
|
Q2(v, color, color);
|
||||||
Q2(v, u, 2.0f);
|
Q2(v, u, 1.0f);
|
||||||
Q2(v, v, 2.0f);
|
Q2(v, v, 1.0f);
|
||||||
Q3(v, x, static_cast<float>(x0));
|
Q3(v, x, static_cast<float>(x0));
|
||||||
Q3(v, y, static_cast<float>(y1));
|
Q3(v, y, static_cast<float>(y1));
|
||||||
Q3(v, color, color);
|
Q3(v, color, color);
|
||||||
Q3(v, u, 2.0f);
|
Q3(v, u, 1.0f);
|
||||||
Q3(v, v, 2.0f);
|
Q3(v, v, 1.0f);
|
||||||
} else {
|
} else {
|
||||||
uint32_t r = 0xff & (color >> 16);
|
uint32_t r = 0xff & (color >> 16);
|
||||||
uint32_t g = 0xff & (color >> 8);
|
uint32_t g = 0xff & (color >> 8);
|
||||||
|
@ -278,23 +278,23 @@ void MicroprofileDrawer::DrawBox(int x0, int y0, int x1, int y1, uint32_t color,
|
||||||
Q0(v, x, static_cast<float>(x0));
|
Q0(v, x, static_cast<float>(x0));
|
||||||
Q0(v, y, static_cast<float>(y0));
|
Q0(v, y, static_cast<float>(y0));
|
||||||
Q0(v, color, color0);
|
Q0(v, color, color0);
|
||||||
Q0(v, u, 2.0f);
|
Q0(v, u, 1.0f);
|
||||||
Q0(v, v, 2.0f);
|
Q0(v, v, 1.0f);
|
||||||
Q1(v, x, static_cast<float>(x1));
|
Q1(v, x, static_cast<float>(x1));
|
||||||
Q1(v, y, static_cast<float>(y0));
|
Q1(v, y, static_cast<float>(y0));
|
||||||
Q1(v, color, color0);
|
Q1(v, color, color0);
|
||||||
Q1(v, u, 3.0f);
|
Q1(v, u, 1.0f);
|
||||||
Q1(v, v, 2.0f);
|
Q1(v, v, 1.0f);
|
||||||
Q2(v, x, static_cast<float>(x1));
|
Q2(v, x, static_cast<float>(x1));
|
||||||
Q2(v, y, static_cast<float>(y1));
|
Q2(v, y, static_cast<float>(y1));
|
||||||
Q2(v, color, color1);
|
Q2(v, color, color1);
|
||||||
Q2(v, u, 3.0f);
|
Q2(v, u, 1.0f);
|
||||||
Q2(v, v, 3.0f);
|
Q2(v, v, 1.0f);
|
||||||
Q3(v, x, static_cast<float>(x0));
|
Q3(v, x, static_cast<float>(x0));
|
||||||
Q3(v, y, static_cast<float>(y1));
|
Q3(v, y, static_cast<float>(y1));
|
||||||
Q3(v, color, color1);
|
Q3(v, color, color1);
|
||||||
Q3(v, u, 2.0f);
|
Q3(v, u, 1.0f);
|
||||||
Q3(v, v, 3.0f);
|
Q3(v, v, 1.0f);
|
||||||
}
|
}
|
||||||
EndVertices();
|
EndVertices();
|
||||||
}
|
}
|
||||||
|
@ -311,13 +311,13 @@ void MicroprofileDrawer::DrawLine2D(uint32_t count, float* vertices,
|
||||||
v[0].x = vertices[i * 2];
|
v[0].x = vertices[i * 2];
|
||||||
v[0].y = vertices[i * 2 + 1];
|
v[0].y = vertices[i * 2 + 1];
|
||||||
v[0].color = color;
|
v[0].color = color;
|
||||||
v[0].u = 2.0f;
|
v[0].u = 1.0f;
|
||||||
v[0].v = 2.0f;
|
v[0].v = 1.0f;
|
||||||
v[1].x = vertices[(i + 1) * 2];
|
v[1].x = vertices[(i + 1) * 2];
|
||||||
v[1].y = vertices[(i + 1) * 2 + 1];
|
v[1].y = vertices[(i + 1) * 2 + 1];
|
||||||
v[1].color = color;
|
v[1].color = color;
|
||||||
v[1].u = 2.0f;
|
v[1].u = 1.0f;
|
||||||
v[1].v = 2.0f;
|
v[1].v = 1.0f;
|
||||||
v += 2;
|
v += 2;
|
||||||
}
|
}
|
||||||
EndVertices();
|
EndVertices();
|
||||||
|
|
Binary file not shown.
|
@ -1,97 +1,68 @@
|
||||||
// generated from `xb buildhlsl`
|
// generated from `xb buildhlsl`
|
||||||
// source: immediate.ps.hlsl
|
// source: immediate.ps.hlsl
|
||||||
const uint8_t immediate_ps[] = {
|
const uint8_t immediate_ps[] = {
|
||||||
0x44, 0x58, 0x42, 0x43, 0x1A, 0xE2, 0x18, 0xC6, 0xA0, 0xE7, 0x4D, 0xE1,
|
0x44, 0x58, 0x42, 0x43, 0xDA, 0xC8, 0x6C, 0xC4, 0x3A, 0x1C, 0x46, 0xE2,
|
||||||
0x7D, 0x18, 0x8F, 0xD8, 0x7B, 0xD4, 0xE7, 0xF9, 0x01, 0x00, 0x00, 0x00,
|
0x62, 0x89, 0x59, 0xC7, 0xDA, 0x3A, 0x9B, 0xAC, 0x01, 0x00, 0x00, 0x00,
|
||||||
0x58, 0x04, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00,
|
0x00, 0x03, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00,
|
||||||
0xD4, 0x01, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00, 0x54, 0x02, 0x00, 0x00,
|
0x1C, 0x01, 0x00, 0x00, 0x68, 0x01, 0x00, 0x00, 0x9C, 0x01, 0x00, 0x00,
|
||||||
0xBC, 0x03, 0x00, 0x00, 0x52, 0x44, 0x45, 0x46, 0x98, 0x01, 0x00, 0x00,
|
0x64, 0x02, 0x00, 0x00, 0x52, 0x44, 0x45, 0x46, 0xE0, 0x00, 0x00, 0x00,
|
||||||
0x01, 0x00, 0x00, 0x00, 0xE8, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||||
0x3C, 0x00, 0x00, 0x00, 0x01, 0x05, 0xFF, 0xFF, 0x00, 0x05, 0x00, 0x00,
|
0x3C, 0x00, 0x00, 0x00, 0x01, 0x05, 0xFF, 0xFF, 0x00, 0x05, 0x00, 0x00,
|
||||||
0x70, 0x01, 0x00, 0x00, 0x13, 0x13, 0x44, 0x25, 0x3C, 0x00, 0x00, 0x00,
|
0xB6, 0x00, 0x00, 0x00, 0x13, 0x13, 0x44, 0x25, 0x3C, 0x00, 0x00, 0x00,
|
||||||
0x18, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
|
0x18, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
|
||||||
0x24, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x24, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0xB4, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x8C, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0xC9, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0xA1, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||||
0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
|
0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xDE, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x65, 0x5F, 0x69,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x6D, 0x6D, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x5F, 0x73, 0x61, 0x6D,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
0x70, 0x6C, 0x65, 0x72, 0x00, 0x78, 0x65, 0x5F, 0x69, 0x6D, 0x6D, 0x65,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x64, 0x69, 0x61, 0x74, 0x65, 0x5F, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72,
|
||||||
0x78, 0x65, 0x5F, 0x69, 0x6D, 0x6D, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65,
|
0x65, 0x00, 0x4D, 0x69, 0x63, 0x72, 0x6F, 0x73, 0x6F, 0x66, 0x74, 0x20,
|
||||||
0x5F, 0x73, 0x61, 0x6D, 0x70, 0x6C, 0x65, 0x72, 0x00, 0x78, 0x65, 0x5F,
|
0x28, 0x52, 0x29, 0x20, 0x48, 0x4C, 0x53, 0x4C, 0x20, 0x53, 0x68, 0x61,
|
||||||
0x69, 0x6D, 0x6D, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x5F, 0x74, 0x65,
|
0x64, 0x65, 0x72, 0x20, 0x43, 0x6F, 0x6D, 0x70, 0x69, 0x6C, 0x65, 0x72,
|
||||||
0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x24, 0x47, 0x6C, 0x6F, 0x62, 0x61,
|
0x20, 0x31, 0x30, 0x2E, 0x31, 0x00, 0xAB, 0xAB, 0x49, 0x53, 0x47, 0x4E,
|
||||||
0x6C, 0x73, 0x00, 0xAB, 0xDE, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
0x44, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x28, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00,
|
||||||
0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x4C, 0x01, 0x00, 0x00,
|
0x38, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
|
0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00,
|
||||||
0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x78, 0x65, 0x5F, 0x72,
|
0x54, 0x45, 0x58, 0x43, 0x4F, 0x4F, 0x52, 0x44, 0x00, 0xAB, 0xAB, 0xAB,
|
||||||
0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x5F, 0x74, 0x65, 0x78, 0x74,
|
0x4F, 0x53, 0x47, 0x4E, 0x2C, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||||
0x75, 0x72, 0x65, 0x5F, 0x73, 0x61, 0x6D, 0x70, 0x6C, 0x65, 0x73, 0x00,
|
0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x62, 0x6F, 0x6F, 0x6C, 0x00, 0xAB, 0xAB, 0xAB, 0x00, 0x00, 0x01, 0x00,
|
|
||||||
0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x44, 0x01, 0x00, 0x00, 0x4D, 0x69, 0x63, 0x72,
|
|
||||||
0x6F, 0x73, 0x6F, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4C,
|
|
||||||
0x53, 0x4C, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6F,
|
|
||||||
0x6D, 0x70, 0x69, 0x6C, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2E, 0x31, 0x00,
|
|
||||||
0x49, 0x53, 0x47, 0x4E, 0x44, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
|
||||||
0x08, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x03, 0x03, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
0x0F, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5F, 0x54, 0x61, 0x72, 0x67, 0x65,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
0x74, 0x00, 0xAB, 0xAB, 0x53, 0x48, 0x45, 0x58, 0xC0, 0x00, 0x00, 0x00,
|
||||||
0x0F, 0x0F, 0x00, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4F, 0x4F, 0x52, 0x44,
|
0x51, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x6A, 0x08, 0x00, 0x01,
|
||||||
0x00, 0xAB, 0xAB, 0xAB, 0x4F, 0x53, 0x47, 0x4E, 0x2C, 0x00, 0x00, 0x00,
|
0x5A, 0x00, 0x00, 0x06, 0x46, 0x6E, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5F, 0x54,
|
|
||||||
0x61, 0x72, 0x67, 0x65, 0x74, 0x00, 0xAB, 0xAB, 0x53, 0x48, 0x45, 0x58,
|
|
||||||
0x60, 0x01, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00,
|
|
||||||
0x6A, 0x08, 0x00, 0x01, 0x59, 0x00, 0x00, 0x07, 0x46, 0x8E, 0x30, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5A, 0x00, 0x00, 0x06,
|
0x58, 0x18, 0x00, 0x07, 0x46, 0x7E, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x46, 0x6E, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x18, 0x00, 0x07,
|
0x00, 0x00, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00,
|
||||||
0x46, 0x7E, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0xF2, 0x10, 0x10, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xF2, 0x20, 0x10, 0x00,
|
||||||
0x62, 0x10, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00,
|
||||||
0x62, 0x10, 0x00, 0x03, 0xF2, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
|
0x48, 0x00, 0x00, 0x0D, 0xF2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x65, 0x00, 0x00, 0x03, 0xF2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x46, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x7E, 0x20, 0x00,
|
||||||
0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x09,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x20, 0x00,
|
||||||
0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x80, 0x30, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0xF2, 0x20, 0x10, 0x00,
|
||||||
0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x07,
|
0x00, 0x00, 0x00, 0x00, 0x46, 0x0E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00,
|
0x46, 0x1E, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x01,
|
||||||
0x00, 0x00, 0x80, 0x3F, 0x0A, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x53, 0x54, 0x41, 0x54, 0x94, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||||
0x3C, 0x00, 0x00, 0x07, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||||
0x1A, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x10, 0x00,
|
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x04, 0x03, 0x0A, 0x00, 0x10, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x0D, 0xF2, 0x00, 0x10, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x46, 0x7E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x60, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07,
|
|
||||||
0xF2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0E, 0x10, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x46, 0x1E, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
|
|
||||||
0x12, 0x00, 0x00, 0x01, 0x36, 0x00, 0x00, 0x05, 0xF2, 0x20, 0x10, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x46, 0x1E, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
|
|
||||||
0x15, 0x00, 0x00, 0x01, 0x3E, 0x00, 0x00, 0x01, 0x53, 0x54, 0x41, 0x54,
|
|
||||||
0x94, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
|
||||||
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
|
||||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,23 +2,12 @@
|
||||||
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
|
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Buffer Definitions:
|
|
||||||
//
|
|
||||||
// cbuffer $Globals
|
|
||||||
// {
|
|
||||||
//
|
|
||||||
// bool xe_restrict_texture_samples; // Offset: 0 Size: 4
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// Resource Bindings:
|
// Resource Bindings:
|
||||||
//
|
//
|
||||||
// Name Type Format Dim ID HLSL Bind Count
|
// Name Type Format Dim ID HLSL Bind Count
|
||||||
// ------------------------------ ---------- ------- ----------- ------- -------------- ------
|
// ------------------------------ ---------- ------- ----------- ------- -------------- ------
|
||||||
// xe_immediate_sampler sampler NA NA S0 s0 1
|
// xe_immediate_sampler sampler NA NA S0 s0 1
|
||||||
// xe_immediate_texture texture float4 2d T0 t0 1
|
// xe_immediate_texture texture float4 2d T0 t0 1
|
||||||
// $Globals cbuffer NA NA CB0 cb0 1
|
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
@ -38,21 +27,13 @@
|
||||||
//
|
//
|
||||||
ps_5_1
|
ps_5_1
|
||||||
dcl_globalFlags refactoringAllowed
|
dcl_globalFlags refactoringAllowed
|
||||||
dcl_constantbuffer CB0[0:0][1], immediateIndexed, space=0
|
|
||||||
dcl_sampler S0[0:0], mode_default, space=0
|
dcl_sampler S0[0:0], mode_default, space=0
|
||||||
dcl_resource_texture2d (float,float,float,float) T0[0:0], space=0
|
dcl_resource_texture2d (float,float,float,float) T0[0:0], space=0
|
||||||
dcl_input_ps linear v0.xy
|
dcl_input_ps linear v0.xy
|
||||||
dcl_input_ps linear v1.xyzw
|
dcl_input_ps linear v1.xyzw
|
||||||
dcl_output o0.xyzw
|
dcl_output o0.xyzw
|
||||||
dcl_temps 1
|
dcl_temps 1
|
||||||
ieq r0.x, CB0[0][0].x, l(0)
|
sample_l r0.xyzw, v0.xyxx, T0[0].xyzw, S0[0], l(0.000000)
|
||||||
ge r0.y, l(1.000000), v0.x
|
mul o0.xyzw, r0.xyzw, v1.xyzw
|
||||||
or r0.x, r0.y, r0.x
|
|
||||||
if_nz r0.x
|
|
||||||
sample_l r0.xyzw, v0.xyxx, T0[0].xyzw, S0[0], l(0.000000)
|
|
||||||
mul o0.xyzw, r0.xyzw, v1.xyzw
|
|
||||||
else
|
|
||||||
mov o0.xyzw, v1.xyzw
|
|
||||||
endif
|
|
||||||
ret
|
ret
|
||||||
// Approximately 10 instruction slots used
|
// Approximately 3 instruction slots used
|
||||||
|
|
Binary file not shown.
|
@ -1,90 +1,91 @@
|
||||||
// generated from `xb buildhlsl`
|
// generated from `xb buildhlsl`
|
||||||
// source: immediate.vs.hlsl
|
// source: immediate.vs.hlsl
|
||||||
const uint8_t immediate_vs[] = {
|
const uint8_t immediate_vs[] = {
|
||||||
0x44, 0x58, 0x42, 0x43, 0xC3, 0x3E, 0x79, 0xCB, 0x09, 0x65, 0x04, 0xF0,
|
0x44, 0x58, 0x42, 0x43, 0x72, 0x14, 0x64, 0xA2, 0xD5, 0x3D, 0x4B, 0x94,
|
||||||
0x71, 0x43, 0x47, 0x45, 0xAC, 0xE1, 0xA9, 0x03, 0x01, 0x00, 0x00, 0x00,
|
0xC5, 0xDD, 0x32, 0xBA, 0xB5, 0xC9, 0x90, 0x20, 0x01, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x04, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00,
|
0x10, 0x04, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00,
|
||||||
0x54, 0x01, 0x00, 0x00, 0xC4, 0x01, 0x00, 0x00, 0x34, 0x02, 0x00, 0x00,
|
0x64, 0x01, 0x00, 0x00, 0xD4, 0x01, 0x00, 0x00, 0x44, 0x02, 0x00, 0x00,
|
||||||
0x64, 0x03, 0x00, 0x00, 0x52, 0x44, 0x45, 0x46, 0x18, 0x01, 0x00, 0x00,
|
0x74, 0x03, 0x00, 0x00, 0x52, 0x44, 0x45, 0x46, 0x28, 0x01, 0x00, 0x00,
|
||||||
0x01, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
0x01, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||||
0x3C, 0x00, 0x00, 0x00, 0x01, 0x05, 0xFE, 0xFF, 0x00, 0x05, 0x00, 0x00,
|
0x3C, 0x00, 0x00, 0x00, 0x01, 0x05, 0xFE, 0xFF, 0x00, 0x05, 0x00, 0x00,
|
||||||
0xF0, 0x00, 0x00, 0x00, 0x13, 0x13, 0x44, 0x25, 0x3C, 0x00, 0x00, 0x00,
|
0x00, 0x01, 0x00, 0x00, 0x13, 0x13, 0x44, 0x25, 0x3C, 0x00, 0x00, 0x00,
|
||||||
0x18, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
|
0x18, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
|
||||||
0x24, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x24, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x24, 0x47, 0x6C, 0x6F, 0x62, 0x61, 0x6C, 0x73,
|
0x00, 0x00, 0x00, 0x00, 0x58, 0x65, 0x49, 0x6D, 0x6D, 0x65, 0x64, 0x69,
|
||||||
0x00, 0xAB, 0xAB, 0xAB, 0x64, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x43, 0x6F, 0x6E,
|
||||||
0x88, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x73, 0x74, 0x61, 0x6E, 0x74, 0x73, 0x00, 0xAB, 0x64, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x01, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
|
||||||
0x08, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xCC, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||||
|
0xDC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||||
0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
|
||||||
0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x78, 0x65, 0x5F, 0x76,
|
0x78, 0x65, 0x5F, 0x76, 0x69, 0x65, 0x77, 0x70, 0x6F, 0x72, 0x74, 0x5F,
|
||||||
0x69, 0x65, 0x77, 0x70, 0x6F, 0x72, 0x74, 0x5F, 0x73, 0x69, 0x7A, 0x65,
|
0x73, 0x69, 0x7A, 0x65, 0x5F, 0x69, 0x6E, 0x76, 0x00, 0x66, 0x6C, 0x6F,
|
||||||
0x5F, 0x69, 0x6E, 0x76, 0x00, 0x66, 0x6C, 0x6F, 0x61, 0x74, 0x32, 0x00,
|
0x61, 0x74, 0x32, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00,
|
||||||
0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC5, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x4D, 0x69, 0x63, 0x72, 0x6F, 0x73, 0x6F, 0x66, 0x74, 0x20, 0x28, 0x52,
|
0xD5, 0x00, 0x00, 0x00, 0x4D, 0x69, 0x63, 0x72, 0x6F, 0x73, 0x6F, 0x66,
|
||||||
0x29, 0x20, 0x48, 0x4C, 0x53, 0x4C, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65,
|
0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4C, 0x53, 0x4C, 0x20, 0x53,
|
||||||
0x72, 0x20, 0x43, 0x6F, 0x6D, 0x70, 0x69, 0x6C, 0x65, 0x72, 0x20, 0x31,
|
0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6F, 0x6D, 0x70, 0x69, 0x6C,
|
||||||
0x30, 0x2E, 0x31, 0x00, 0x49, 0x53, 0x47, 0x4E, 0x68, 0x00, 0x00, 0x00,
|
0x65, 0x72, 0x20, 0x31, 0x30, 0x2E, 0x31, 0x00, 0x49, 0x53, 0x47, 0x4E,
|
||||||
0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
|
||||||
0x01, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
|
||||||
0x02, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x50, 0x4F, 0x53, 0x49,
|
|
||||||
0x54, 0x49, 0x4F, 0x4E, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4F, 0x4F, 0x52,
|
|
||||||
0x44, 0x00, 0x43, 0x4F, 0x4C, 0x4F, 0x52, 0x00, 0x4F, 0x53, 0x47, 0x4E,
|
|
||||||
0x68, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
|
0x68, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
|
||||||
0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0C, 0x00, 0x00,
|
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00,
|
||||||
0x50, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x59, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00,
|
0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00,
|
||||||
0x59, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00,
|
0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00,
|
||||||
0x54, 0x45, 0x58, 0x43, 0x4F, 0x4F, 0x52, 0x44, 0x00, 0x53, 0x56, 0x5F,
|
0x50, 0x4F, 0x53, 0x49, 0x54, 0x49, 0x4F, 0x4E, 0x00, 0x54, 0x45, 0x58,
|
||||||
0x50, 0x6F, 0x73, 0x69, 0x74, 0x69, 0x6F, 0x6E, 0x00, 0xAB, 0xAB, 0xAB,
|
0x43, 0x4F, 0x4F, 0x52, 0x44, 0x00, 0x43, 0x4F, 0x4C, 0x4F, 0x52, 0x00,
|
||||||
0x53, 0x48, 0x45, 0x58, 0x28, 0x01, 0x00, 0x00, 0x51, 0x00, 0x01, 0x00,
|
0x4F, 0x53, 0x47, 0x4E, 0x68, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||||
0x4A, 0x00, 0x00, 0x00, 0x6A, 0x08, 0x00, 0x01, 0x59, 0x00, 0x00, 0x07,
|
0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x46, 0x8E, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x5F, 0x00, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x5F, 0x00, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
|
|
||||||
0x5F, 0x00, 0x00, 0x03, 0xF2, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
|
|
||||||
0x65, 0x00, 0x00, 0x03, 0x32, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x65, 0x00, 0x00, 0x03, 0xF2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
|
|
||||||
0x67, 0x00, 0x00, 0x04, 0xF2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
|
|
||||||
0x01, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00,
|
|
||||||
0x38, 0x00, 0x00, 0x09, 0x32, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x46, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x80, 0x30, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x32, 0x00, 0x00, 0x0F, 0x32, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
|
|
||||||
0x46, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0xBF,
|
|
||||||
0x00, 0x00, 0x80, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x36, 0x00, 0x00, 0x05, 0xF2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
|
|
||||||
0x46, 0x1E, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x08,
|
|
||||||
0xC2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x80, 0x3F, 0x36, 0x00, 0x00, 0x05, 0x32, 0x20, 0x10, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
|
|
||||||
0x3E, 0x00, 0x00, 0x01, 0x53, 0x54, 0x41, 0x54, 0x94, 0x00, 0x00, 0x00,
|
|
||||||
0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x06, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x03, 0x0C, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||||
|
0x0F, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||||
|
0x0F, 0x00, 0x00, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4F, 0x4F, 0x52, 0x44,
|
||||||
|
0x00, 0x53, 0x56, 0x5F, 0x50, 0x6F, 0x73, 0x69, 0x74, 0x69, 0x6F, 0x6E,
|
||||||
|
0x00, 0xAB, 0xAB, 0xAB, 0x53, 0x48, 0x45, 0x58, 0x28, 0x01, 0x00, 0x00,
|
||||||
|
0x51, 0x00, 0x01, 0x00, 0x4A, 0x00, 0x00, 0x00, 0x6A, 0x08, 0x00, 0x01,
|
||||||
|
0x59, 0x00, 0x00, 0x07, 0x46, 0x8E, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00,
|
||||||
|
0x01, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x03, 0xF2, 0x10, 0x10, 0x00,
|
||||||
|
0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0x32, 0x20, 0x10, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xF2, 0x20, 0x10, 0x00,
|
||||||
|
0x01, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xF2, 0x20, 0x10, 0x00,
|
||||||
|
0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02,
|
||||||
|
0x01, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x09, 0x32, 0x00, 0x10, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x46, 0x80, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0F, 0x32, 0x20, 0x10, 0x00,
|
||||||
|
0x02, 0x00, 0x00, 0x00, 0x46, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0xC0,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x80, 0xBF, 0x00, 0x00, 0x80, 0x3F, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0xF2, 0x20, 0x10, 0x00,
|
||||||
|
0x01, 0x00, 0x00, 0x00, 0x46, 0x1E, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||||
|
0x36, 0x00, 0x00, 0x08, 0xC2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||||
|
0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3F, 0x36, 0x00, 0x00, 0x05,
|
||||||
|
0x32, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00,
|
||||||
|
0x01, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x01, 0x53, 0x54, 0x41, 0x54,
|
||||||
|
0x94, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
};
|
};
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
//
|
//
|
||||||
// Buffer Definitions:
|
// Buffer Definitions:
|
||||||
//
|
//
|
||||||
// cbuffer $Globals
|
// cbuffer XeImmediateVertexConstants
|
||||||
// {
|
// {
|
||||||
//
|
//
|
||||||
// float2 xe_viewport_size_inv; // Offset: 0 Size: 8
|
// float2 xe_viewport_size_inv; // Offset: 0 Size: 8
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
//
|
//
|
||||||
// Name Type Format Dim ID HLSL Bind Count
|
// Name Type Format Dim ID HLSL Bind Count
|
||||||
// ------------------------------ ---------- ------- ----------- ------- -------------- ------
|
// ------------------------------ ---------- ------- ----------- ------- -------------- ------
|
||||||
// $Globals cbuffer NA NA CB0 cb0 1
|
// XeImmediateVertexConstants cbuffer NA NA CB0 cb0 1
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
Texture2D<float4> xe_immediate_texture : register(t0);
|
Texture2D<float4> xe_immediate_texture : register(t0);
|
||||||
SamplerState xe_immediate_sampler : register(s0);
|
SamplerState xe_immediate_sampler : register(s0);
|
||||||
bool xe_restrict_texture_samples : register(b0);
|
|
||||||
|
|
||||||
struct XePixelShaderInput {
|
struct XePixelShaderInput {
|
||||||
float2 texcoord : TEXCOORD0;
|
float2 texcoord : TEXCOORD0;
|
||||||
|
@ -8,10 +7,6 @@ struct XePixelShaderInput {
|
||||||
};
|
};
|
||||||
|
|
||||||
float4 main(XePixelShaderInput input) : SV_Target {
|
float4 main(XePixelShaderInput input) : SV_Target {
|
||||||
float4 output = input.color;
|
return input.color * xe_immediate_texture.SampleLevel(xe_immediate_sampler,
|
||||||
if (!xe_restrict_texture_samples || input.texcoord.x <= 1.0f) {
|
input.texcoord, 0.0f);
|
||||||
output *= xe_immediate_texture.SampleLevel(xe_immediate_sampler,
|
|
||||||
input.texcoord, 0.0f);
|
|
||||||
}
|
|
||||||
return output;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
float2 xe_viewport_size_inv : register(b0);
|
cbuffer XeImmediateVertexConstants : register(b0) {
|
||||||
|
float2 xe_viewport_size_inv;
|
||||||
|
};
|
||||||
|
|
||||||
struct XeVertexShaderInput {
|
struct XeVertexShaderInput {
|
||||||
float2 position : POSITION;
|
float2 position : POSITION;
|
||||||
|
|
Loading…
Reference in New Issue