[D3D12] Various refactoring mostly on the immediate drawer side, cache immdraw scissor, force stretch alpha to 1

This commit is contained in:
Triang3l
2020-09-20 15:15:08 +03:00
parent 6ba0620b10
commit 183c7eee2b
21 changed files with 145 additions and 117 deletions

View File

@@ -1,8 +1,8 @@
// generated from `xb buildhlsl`
// source: immediate.vs.hlsl
const uint8_t immediate_vs[] = {
0x44, 0x58, 0x42, 0x43, 0x6A, 0xC1, 0xC3, 0xE8, 0xA7, 0x09, 0x30, 0xF3,
0x48, 0x84, 0xA3, 0x3C, 0x7D, 0x90, 0xA1, 0x09, 0x01, 0x00, 0x00, 0x00,
0x44, 0x58, 0x42, 0x43, 0xC3, 0x3E, 0x79, 0xCB, 0x09, 0x65, 0x04, 0xF0,
0x71, 0x43, 0x47, 0x45, 0xAC, 0xE1, 0xA9, 0x03, 0x01, 0x00, 0x00, 0x00,
0x00, 0x04, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00,
0x54, 0x01, 0x00, 0x00, 0xC4, 0x01, 0x00, 0x00, 0x34, 0x02, 0x00, 0x00,
0x64, 0x03, 0x00, 0x00, 0x52, 0x44, 0x45, 0x46, 0x18, 0x01, 0x00, 0x00,
@@ -21,8 +21,8 @@ const uint8_t immediate_vs[] = {
0x08, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xCC, 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,
0x69, 0x65, 0x77, 0x70, 0x6F, 0x72, 0x74, 0x5F, 0x69, 0x6E, 0x76, 0x5F,
0x73, 0x69, 0x7A, 0x65, 0x00, 0x66, 0x6C, 0x6F, 0x61, 0x74, 0x32, 0x00,
0x69, 0x65, 0x77, 0x70, 0x6F, 0x72, 0x74, 0x5F, 0x73, 0x69, 0x7A, 0x65,
0x5F, 0x69, 0x6E, 0x76, 0x00, 0x66, 0x6C, 0x6F, 0x61, 0x74, 0x32, 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, 0xC5, 0x00, 0x00, 0x00,

View File

@@ -7,7 +7,7 @@
// cbuffer $Globals
// {
//
// float2 xe_viewport_inv_size; // Offset: 0 Size: 8
// float2 xe_viewport_size_inv; // Offset: 0 Size: 8
//
// }
//

View File

@@ -1,4 +1,4 @@
float2 xe_viewport_inv_size : register(b0);
float2 xe_viewport_size_inv : register(b0);
struct XeVertexShaderInput {
float2 position : POSITION;
@@ -15,7 +15,7 @@ struct XeVertexShaderOutput {
XeVertexShaderOutput main(XeVertexShaderInput input) {
XeVertexShaderOutput output;
output.position = float4(
input.position * xe_viewport_inv_size * float2(2.0, -2.0) +
input.position * xe_viewport_size_inv * float2(2.0, -2.0) +
float2(-1.0, 1.0), 0.0, 1.0);
output.texcoord = input.texcoord;
output.color = input.color;