[GPU] XeSL swap shaders

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

View File

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

View File

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