From f98a4d11ea718756db87c0f183e50f4b69f75452 Mon Sep 17 00:00:00 2001 From: Triang3l Date: Sat, 13 Oct 2018 14:33:22 +0300 Subject: [PATCH] [D3D12] ROV: A bit of non-working blending code --- .../gpu/d3d12/d3d12_command_processor.cc | 51 +- .../shaders/dxbc/primitive_point_list_gs.cso | Bin 7004 -> 7012 bytes .../shaders/dxbc/primitive_point_list_gs.h | 565 ++++++++--------- .../shaders/dxbc/primitive_point_list_gs.txt | 4 +- src/xenia/gpu/d3d12/shaders/xenos_draw.hlsli | 4 +- src/xenia/gpu/dxbc_shader_translator.cc | 595 ++++++++++++++---- src/xenia/gpu/dxbc_shader_translator.h | 239 +++---- 7 files changed, 923 insertions(+), 535 deletions(-) diff --git a/src/xenia/gpu/d3d12/d3d12_command_processor.cc b/src/xenia/gpu/d3d12/d3d12_command_processor.cc index 268c50b83..1c071d461 100644 --- a/src/xenia/gpu/d3d12/d3d12_command_processor.cc +++ b/src/xenia/gpu/d3d12/d3d12_command_processor.cc @@ -1798,19 +1798,23 @@ void D3D12CommandProcessor::UpdateSystemConstantValues( // Color exponent bias and output index mapping or ROV writing. uint32_t rb_color_mask = regs[XE_GPU_REG_RB_COLOR_MASK].u32; for (uint32_t i = 0; i < 4; ++i) { - uint32_t color_info; + uint32_t color_info, blend_control; switch (i) { case 1: color_info = regs[XE_GPU_REG_RB_COLOR1_INFO].u32; + blend_control = regs[XE_GPU_REG_RB_BLENDCONTROL_1].u32; break; case 2: color_info = regs[XE_GPU_REG_RB_COLOR2_INFO].u32; + blend_control = regs[XE_GPU_REG_RB_BLENDCONTROL_2].u32; break; case 3: color_info = regs[XE_GPU_REG_RB_COLOR3_INFO].u32; + blend_control = regs[XE_GPU_REG_RB_BLENDCONTROL_3].u32; break; default: color_info = regs[XE_GPU_REG_RB_COLOR_INFO].u32; + blend_control = regs[XE_GPU_REG_RB_BLENDCONTROL_0].u32; } // Exponent bias is in bits 20:25 of RB_COLOR_INFO. int32_t color_exp_bias = int32_t(color_info << 6) >> 26; @@ -1834,6 +1838,8 @@ void D3D12CommandProcessor::UpdateSystemConstantValues( dirty |= system_constants_.color_exp_bias[i] != color_exp_bias_scale; system_constants_.color_exp_bias[i] = color_exp_bias_scale; if (render_target_cache_->IsROVUsedForEDRAM()) { + uint32_t rt_pair_index = i >> 1; + uint32_t rt_pair_comp = (i & 1) << 1; uint32_t edram_base_dwords = (color_info & 0xFFF) * 1280; dirty |= system_constants_.edram_base_dwords[i] != edram_base_dwords; system_constants_.edram_base_dwords[i] = edram_base_dwords; @@ -1892,6 +1898,27 @@ void D3D12CommandProcessor::UpdateSystemConstantValues( if (rt_mask != rt_mask_all) { rt_flags |= DxbcShaderTranslator::kRTFlag_Load; } + uint32_t blend_x, blend_y; + if (DxbcShaderTranslator::GetBlendConstants(blend_control, blend_x, + blend_y)) { + rt_flags |= DxbcShaderTranslator::kRTFlag_Load | + DxbcShaderTranslator::kRTFlag_Blend; + if (system_constants_ + .edram_blend_rt01_rt23[rt_pair_index][rt_pair_comp] != + blend_x) { + dirty = true; + system_constants_ + .edram_blend_rt01_rt23[rt_pair_index][rt_pair_comp] = blend_x; + } + if (system_constants_ + .edram_blend_rt01_rt23[rt_pair_index][rt_pair_comp + 1] != + blend_x) { + dirty = true; + system_constants_ + .edram_blend_rt01_rt23[rt_pair_index][rt_pair_comp + 1] = + blend_y; + } + } } dirty |= system_constants_.edram_rt_flags[i] != rt_flags; system_constants_.edram_rt_flags[i] = rt_flags; @@ -2001,8 +2028,6 @@ void D3D12CommandProcessor::UpdateSystemConstantValues( assert_always(); break; } - uint32_t rt_pair_index = i >> 1; - uint32_t rt_pair_comp = (i & 1) << 1; system_constants_ .edram_load_mask_rt01_rt23[rt_pair_index][rt_pair_comp] = color_mask; @@ -2035,6 +2060,26 @@ void D3D12CommandProcessor::UpdateSystemConstantValues( } } + // Blend constant for ROV blending. + if (render_target_cache_->IsROVUsedForEDRAM()) { + dirty |= system_constants_.edram_blend_constant[0] != + regs[XE_GPU_REG_RB_BLEND_RED].f32; + system_constants_.edram_blend_constant[0] = + regs[XE_GPU_REG_RB_BLEND_RED].f32; + dirty |= system_constants_.edram_blend_constant[1] != + regs[XE_GPU_REG_RB_BLEND_GREEN].f32; + system_constants_.edram_blend_constant[1] = + regs[XE_GPU_REG_RB_BLEND_GREEN].f32; + dirty |= system_constants_.edram_blend_constant[2] != + regs[XE_GPU_REG_RB_BLEND_BLUE].f32; + system_constants_.edram_blend_constant[2] = + regs[XE_GPU_REG_RB_BLEND_BLUE].f32; + dirty |= system_constants_.edram_blend_constant[3] != + regs[XE_GPU_REG_RB_BLEND_ALPHA].f32; + system_constants_.edram_blend_constant[3] = + regs[XE_GPU_REG_RB_BLEND_ALPHA].f32; + } + cbuffer_bindings_system_.up_to_date &= !dirty; } diff --git a/src/xenia/gpu/d3d12/shaders/dxbc/primitive_point_list_gs.cso b/src/xenia/gpu/d3d12/shaders/dxbc/primitive_point_list_gs.cso index e02813e1704aa9cf4fd83264710a370e70265346..a850aaef74cad21b1fedcb3f67bdc36a6ed8ae47 100644 GIT binary patch delta 176 zcmca(_QcG}CBn&h{p{QKJ|~6WxvFEBXHe7W&&a^QkRr{%zzU>IfY^bXfkA?ofx&{G zf#HM{14EFDs~ZdVL@O!A+Z#jwv#?5YF)##7p2(uis6V-uRh`ux$S;`O$g0d54`elf zS>-_11Td=~$XWnqEeEnTfLM$NH|MfFVU~<9Dlsr*s7Q@ZO({yujZex+%}W7_85wU* I;`${3060o8SO5S3 delta 168 zcmaE2cE`-hCBn&>W#LVYB5Cdw3fwt2Z7;j;V`N}ph>>PsUH|MfFVHPxGs7Q@ZO({yujZex+%}X)boW=D^005fI BE3yCp diff --git a/src/xenia/gpu/d3d12/shaders/dxbc/primitive_point_list_gs.h b/src/xenia/gpu/d3d12/shaders/dxbc/primitive_point_list_gs.h index 168416cf7..a1c30ddef 100644 --- a/src/xenia/gpu/d3d12/shaders/dxbc/primitive_point_list_gs.h +++ b/src/xenia/gpu/d3d12/shaders/dxbc/primitive_point_list_gs.h @@ -1,14 +1,14 @@ // generated from `xb buildhlsl` // source: primitive_point_list.gs.hlsl const uint8_t primitive_point_list_gs[] = { - 0x44, 0x58, 0x42, 0x43, 0x04, 0xA1, 0xD9, 0x28, 0x72, 0x1B, 0x0B, 0xA8, - 0x20, 0x0B, 0x6C, 0xD9, 0x3D, 0xD3, 0x47, 0xBE, 0x01, 0x00, 0x00, 0x00, - 0x5C, 0x1B, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, - 0x38, 0x0B, 0x00, 0x00, 0x10, 0x0D, 0x00, 0x00, 0x30, 0x0F, 0x00, 0x00, - 0xC0, 0x1A, 0x00, 0x00, 0x52, 0x44, 0x45, 0x46, 0xFC, 0x0A, 0x00, 0x00, + 0x44, 0x58, 0x42, 0x43, 0xAF, 0x9B, 0xDB, 0xDE, 0xF3, 0x62, 0x57, 0xDC, + 0xD5, 0x2C, 0x31, 0x6E, 0x30, 0x7C, 0x89, 0x4F, 0x01, 0x00, 0x00, 0x00, + 0x64, 0x1B, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, + 0x40, 0x0B, 0x00, 0x00, 0x18, 0x0D, 0x00, 0x00, 0x38, 0x0F, 0x00, 0x00, + 0xC8, 0x1A, 0x00, 0x00, 0x52, 0x44, 0x45, 0x46, 0x04, 0x0B, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x01, 0x05, 0x53, 0x47, 0x00, 0x05, 0x00, 0x00, - 0xD3, 0x0A, 0x00, 0x00, 0x13, 0x13, 0x44, 0x25, 0x3C, 0x00, 0x00, 0x00, + 0xDB, 0x0A, 0x00, 0x00, 0x13, 0x13, 0x44, 0x25, 0x3C, 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, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -114,31 +114,31 @@ const uint8_t primitive_point_list_gs[] = { 0x00, 0x00, 0x00, 0x00, 0x07, 0x0A, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, - 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x17, 0x0A, 0x00, 0x00, + 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x1B, 0x0A, 0x00, 0x00, 0x50, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, - 0x27, 0x0A, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x2F, 0x0A, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, - 0x00, 0x00, 0x00, 0x00, 0x3F, 0x0A, 0x00, 0x00, 0x70, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x47, 0x0A, 0x00, 0x00, 0x70, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, - 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x57, 0x0A, 0x00, 0x00, + 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0A, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, - 0x6F, 0x0A, 0x00, 0x00, 0x90, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x77, 0x0A, 0x00, 0x00, 0x90, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, - 0x00, 0x00, 0x00, 0x00, 0x87, 0x0A, 0x00, 0x00, 0xA0, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x8F, 0x0A, 0x00, 0x00, 0xA0, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, - 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x9F, 0x0A, 0x00, 0x00, + 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xA7, 0x0A, 0x00, 0x00, 0xB0, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, - 0xB9, 0x0A, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0xC1, 0x0A, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x08, 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, 0x66, 0x6C, 0x61, 0x67, 0x73, @@ -221,182 +221,273 @@ const uint8_t primitive_point_list_gs[] = { 0x65, 0x5F, 0x65, 0x64, 0x72, 0x61, 0x6D, 0x5F, 0x6C, 0x6F, 0x61, 0x64, 0x5F, 0x6D, 0x61, 0x73, 0x6B, 0x5F, 0x72, 0x74, 0x32, 0x33, 0x00, 0x78, 0x65, 0x5F, 0x65, 0x64, 0x72, 0x61, 0x6D, 0x5F, 0x62, 0x6C, 0x65, 0x6E, - 0x64, 0x31, 0x00, 0x78, 0x65, 0x5F, 0x65, 0x64, 0x72, 0x61, 0x6D, 0x5F, - 0x62, 0x6C, 0x65, 0x6E, 0x64, 0x32, 0x00, 0x78, 0x65, 0x5F, 0x65, 0x64, - 0x72, 0x61, 0x6D, 0x5F, 0x62, 0x6C, 0x65, 0x6E, 0x64, 0x5F, 0x63, 0x6F, - 0x6E, 0x73, 0x74, 0x61, 0x6E, 0x74, 0x00, 0x78, 0x65, 0x5F, 0x65, 0x64, - 0x72, 0x61, 0x6D, 0x5F, 0x73, 0x74, 0x6F, 0x72, 0x65, 0x5F, 0x6D, 0x69, - 0x6E, 0x5F, 0x72, 0x74, 0x30, 0x31, 0x00, 0x78, 0x65, 0x5F, 0x65, 0x64, - 0x72, 0x61, 0x6D, 0x5F, 0x73, 0x74, 0x6F, 0x72, 0x65, 0x5F, 0x6D, 0x69, - 0x6E, 0x5F, 0x72, 0x74, 0x32, 0x33, 0x00, 0x78, 0x65, 0x5F, 0x65, 0x64, - 0x72, 0x61, 0x6D, 0x5F, 0x73, 0x74, 0x6F, 0x72, 0x65, 0x5F, 0x6D, 0x61, - 0x78, 0x5F, 0x72, 0x74, 0x30, 0x31, 0x00, 0x78, 0x65, 0x5F, 0x65, 0x64, - 0x72, 0x61, 0x6D, 0x5F, 0x73, 0x74, 0x6F, 0x72, 0x65, 0x5F, 0x6D, 0x61, - 0x78, 0x5F, 0x72, 0x74, 0x32, 0x33, 0x00, 0x78, 0x65, 0x5F, 0x65, 0x64, - 0x72, 0x61, 0x6D, 0x5F, 0x73, 0x74, 0x6F, 0x72, 0x65, 0x5F, 0x73, 0x63, - 0x61, 0x6C, 0x65, 0x5F, 0x72, 0x74, 0x30, 0x31, 0x00, 0x78, 0x65, 0x5F, - 0x65, 0x64, 0x72, 0x61, 0x6D, 0x5F, 0x73, 0x74, 0x6F, 0x72, 0x65, 0x5F, - 0x73, 0x63, 0x61, 0x6C, 0x65, 0x5F, 0x72, 0x74, 0x32, 0x33, 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, 0xAB, 0x49, 0x53, 0x47, 0x4E, 0xD0, 0x01, 0x00, 0x00, - 0x12, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xB8, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0xB8, 0x01, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0xB8, 0x01, 0x00, 0x00, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x02, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0xB8, 0x01, 0x00, 0x00, - 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x03, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0xB8, 0x01, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0xB8, 0x01, 0x00, 0x00, - 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x05, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0xB8, 0x01, 0x00, 0x00, - 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x06, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0xB8, 0x01, 0x00, 0x00, - 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x07, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0xB8, 0x01, 0x00, 0x00, - 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x08, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0xB8, 0x01, 0x00, 0x00, - 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x09, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0xB8, 0x01, 0x00, 0x00, - 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x0A, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0xB8, 0x01, 0x00, 0x00, - 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x0B, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0xB8, 0x01, 0x00, 0x00, - 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x0C, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0xB8, 0x01, 0x00, 0x00, - 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x0D, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0xB8, 0x01, 0x00, 0x00, - 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x0E, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0xB8, 0x01, 0x00, 0x00, - 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0xB8, 0x01, 0x00, 0x00, - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x10, 0x00, 0x00, 0x00, 0x07, 0x04, 0x00, 0x00, 0xC1, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x11, 0x00, 0x00, 0x00, 0x0F, 0x0F, 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, 0x4F, 0x53, 0x47, 0x35, - 0x18, 0x02, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x64, 0x5F, 0x72, 0x74, 0x30, 0x31, 0x00, 0x78, 0x65, 0x5F, 0x65, 0x64, + 0x72, 0x61, 0x6D, 0x5F, 0x62, 0x6C, 0x65, 0x6E, 0x64, 0x5F, 0x72, 0x74, + 0x32, 0x33, 0x00, 0x78, 0x65, 0x5F, 0x65, 0x64, 0x72, 0x61, 0x6D, 0x5F, + 0x62, 0x6C, 0x65, 0x6E, 0x64, 0x5F, 0x63, 0x6F, 0x6E, 0x73, 0x74, 0x61, + 0x6E, 0x74, 0x00, 0x78, 0x65, 0x5F, 0x65, 0x64, 0x72, 0x61, 0x6D, 0x5F, + 0x73, 0x74, 0x6F, 0x72, 0x65, 0x5F, 0x6D, 0x69, 0x6E, 0x5F, 0x72, 0x74, + 0x30, 0x31, 0x00, 0x78, 0x65, 0x5F, 0x65, 0x64, 0x72, 0x61, 0x6D, 0x5F, + 0x73, 0x74, 0x6F, 0x72, 0x65, 0x5F, 0x6D, 0x69, 0x6E, 0x5F, 0x72, 0x74, + 0x32, 0x33, 0x00, 0x78, 0x65, 0x5F, 0x65, 0x64, 0x72, 0x61, 0x6D, 0x5F, + 0x73, 0x74, 0x6F, 0x72, 0x65, 0x5F, 0x6D, 0x61, 0x78, 0x5F, 0x72, 0x74, + 0x30, 0x31, 0x00, 0x78, 0x65, 0x5F, 0x65, 0x64, 0x72, 0x61, 0x6D, 0x5F, + 0x73, 0x74, 0x6F, 0x72, 0x65, 0x5F, 0x6D, 0x61, 0x78, 0x5F, 0x72, 0x74, + 0x32, 0x33, 0x00, 0x78, 0x65, 0x5F, 0x65, 0x64, 0x72, 0x61, 0x6D, 0x5F, + 0x73, 0x74, 0x6F, 0x72, 0x65, 0x5F, 0x73, 0x63, 0x61, 0x6C, 0x65, 0x5F, + 0x72, 0x74, 0x30, 0x31, 0x00, 0x78, 0x65, 0x5F, 0x65, 0x64, 0x72, 0x61, + 0x6D, 0x5F, 0x73, 0x74, 0x6F, 0x72, 0x65, 0x5F, 0x73, 0x63, 0x61, 0x6C, + 0x65, 0x5F, 0x72, 0x74, 0x32, 0x33, 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, 0xAB, + 0x49, 0x53, 0x47, 0x4E, 0xD0, 0x01, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0xB8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x0F, 0x0F, 0x00, 0x00, 0xB8, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x0F, 0x0F, 0x00, 0x00, 0xB8, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x0F, 0x0F, 0x00, 0x00, 0xB8, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x03, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x0F, 0x0F, 0x00, 0x00, 0xB8, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x0F, 0x0F, 0x00, 0x00, 0xB8, 0x01, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, + 0x0F, 0x0F, 0x00, 0x00, 0xB8, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, - 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, - 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x07, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, + 0x0F, 0x0F, 0x00, 0x00, 0xB8, 0x01, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x0F, 0x0F, 0x00, 0x00, 0xB8, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x0F, 0x0F, 0x00, 0x00, 0xB8, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, - 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, - 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x0A, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x02, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x03, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, + 0x0F, 0x0F, 0x00, 0x00, 0xB8, 0x01, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, + 0x0F, 0x0F, 0x00, 0x00, 0xB8, 0x01, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, + 0x0F, 0x0F, 0x00, 0x00, 0xB8, 0x01, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, - 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, - 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x0D, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x02, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x03, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, + 0x0F, 0x0F, 0x00, 0x00, 0xB8, 0x01, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, + 0x0F, 0x0F, 0x00, 0x00, 0xB8, 0x01, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, + 0x0F, 0x0F, 0x00, 0x00, 0xB8, 0x01, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, + 0x0F, 0x0F, 0x00, 0x00, 0xB8, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x07, 0x04, 0x00, 0x00, 0xC1, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, + 0x0F, 0x0F, 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, 0x4F, 0x53, 0x47, 0x35, 0x18, 0x02, 0x00, 0x00, + 0x12, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x10, 0x00, 0x00, 0x00, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x09, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, - 0x03, 0x00, 0x00, 0x00, 0x11, 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, 0x88, 0x0B, 0x00, 0x00, 0x51, 0x00, 0x02, 0x00, - 0xE2, 0x02, 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, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, + 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, + 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x0B, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, + 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, + 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x0E, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x02, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x11, 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, + 0x88, 0x0B, 0x00, 0x00, 0x51, 0x00, 0x02, 0x00, 0xE2, 0x02, 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, + 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x04, + 0xF2, 0x10, 0x20, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x04, 0xF2, 0x10, 0x20, 0x00, 0x01, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x04, 0xF2, 0x10, 0x20, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x04, - 0xF2, 0x10, 0x20, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x04, 0xF2, 0x10, 0x20, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x04, + 0xF2, 0x10, 0x20, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x04, 0xF2, 0x10, 0x20, 0x00, 0x01, 0x00, 0x00, 0x00, - 0x03, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x04, 0xF2, 0x10, 0x20, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x04, - 0xF2, 0x10, 0x20, 0x00, 0x01, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x04, 0xF2, 0x10, 0x20, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x04, + 0xF2, 0x10, 0x20, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x04, 0xF2, 0x10, 0x20, 0x00, 0x01, 0x00, 0x00, 0x00, - 0x06, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x04, 0xF2, 0x10, 0x20, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x04, - 0xF2, 0x10, 0x20, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x04, 0xF2, 0x10, 0x20, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x04, + 0xF2, 0x10, 0x20, 0x00, 0x01, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x04, 0xF2, 0x10, 0x20, 0x00, 0x01, 0x00, 0x00, 0x00, - 0x09, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x04, 0xF2, 0x10, 0x20, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x04, - 0xF2, 0x10, 0x20, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, + 0x0A, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x04, 0xF2, 0x10, 0x20, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x04, + 0xF2, 0x10, 0x20, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x04, 0xF2, 0x10, 0x20, 0x00, 0x01, 0x00, 0x00, 0x00, - 0x0C, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x04, 0xF2, 0x10, 0x20, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x04, - 0xF2, 0x10, 0x20, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, - 0x5F, 0x00, 0x00, 0x04, 0xF2, 0x10, 0x20, 0x00, 0x01, 0x00, 0x00, 0x00, - 0x0F, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x04, 0x72, 0x10, 0x20, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x61, 0x00, 0x00, 0x05, - 0xF2, 0x10, 0x20, 0x00, 0x01, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, - 0x5D, 0x08, 0x00, 0x01, 0x8F, 0x00, 0x00, 0x03, 0x00, 0x00, 0x11, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x5C, 0x28, 0x00, 0x01, 0x65, 0x00, 0x00, 0x03, - 0xF2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, - 0xF2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, - 0xF2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, - 0xF2, 0x20, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, - 0xF2, 0x20, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, - 0xF2, 0x20, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, - 0xF2, 0x20, 0x10, 0x00, 0x06, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, - 0xF2, 0x20, 0x10, 0x00, 0x07, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, - 0xF2, 0x20, 0x10, 0x00, 0x08, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, - 0xF2, 0x20, 0x10, 0x00, 0x09, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, - 0xF2, 0x20, 0x10, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, - 0xF2, 0x20, 0x10, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, - 0xF2, 0x20, 0x10, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, - 0xF2, 0x20, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, - 0xF2, 0x20, 0x10, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, - 0xF2, 0x20, 0x10, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, - 0x72, 0x20, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, - 0xF2, 0x20, 0x10, 0x00, 0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, - 0x5E, 0x00, 0x00, 0x02, 0x04, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x08, - 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x2A, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x10, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00, 0x0C, 0x32, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xA6, 0x1A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, - 0x46, 0x80, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x03, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x09, 0x32, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x46, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xA6, 0x8A, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x03, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x09, 0x32, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x46, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xF6, 0x8F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x03, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x09, 0x32, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x46, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x46, 0x80, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0xC2, 0x00, 0x10, 0x00, + 0x0D, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x04, 0xF2, 0x10, 0x20, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x04, + 0xF2, 0x10, 0x20, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, + 0x5F, 0x00, 0x00, 0x04, 0x72, 0x10, 0x20, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x61, 0x00, 0x00, 0x05, 0xF2, 0x10, 0x20, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x68, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x5D, 0x08, 0x00, 0x01, + 0x8F, 0x00, 0x00, 0x03, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x5C, 0x28, 0x00, 0x01, 0x65, 0x00, 0x00, 0x03, 0xF2, 0x20, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xF2, 0x20, 0x10, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xF2, 0x20, 0x10, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xF2, 0x20, 0x10, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xF2, 0x20, 0x10, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xF2, 0x20, 0x10, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xF2, 0x20, 0x10, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xF2, 0x20, 0x10, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xF2, 0x20, 0x10, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xF2, 0x20, 0x10, 0x00, + 0x09, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xF2, 0x20, 0x10, 0x00, + 0x0A, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xF2, 0x20, 0x10, 0x00, + 0x0B, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xF2, 0x20, 0x10, 0x00, + 0x0C, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xF2, 0x20, 0x10, 0x00, + 0x0D, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xF2, 0x20, 0x10, 0x00, + 0x0E, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xF2, 0x20, 0x10, 0x00, + 0x0F, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0x72, 0x20, 0x10, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xF2, 0x20, 0x10, 0x00, + 0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5E, 0x00, 0x00, 0x02, + 0x04, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x08, 0x12, 0x00, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x2A, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x37, 0x00, 0x00, 0x0C, 0x32, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA6, 0x1A, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x46, 0x80, 0x30, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x34, 0x00, 0x00, 0x09, 0x32, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x46, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA6, 0x8A, 0x30, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x33, 0x00, 0x00, 0x09, 0x32, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x46, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF6, 0x8F, 0x30, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x38, 0x00, 0x00, 0x09, 0x32, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x46, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x80, 0x30, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x38, 0x00, 0x00, 0x08, 0xC2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x06, 0x04, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF6, 0x1F, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0D, + 0xF2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0xE6, 0x0E, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0xBF, + 0x00, 0x00, 0x80, 0x3F, 0x00, 0x00, 0x80, 0x3F, 0x00, 0x00, 0x80, 0xBF, + 0x46, 0x14, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00, + 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x09, 0x00, 0x00, 0x00, + 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x0A, 0x00, 0x00, 0x00, + 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x0B, 0x00, 0x00, 0x00, + 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x0C, 0x00, 0x00, 0x00, + 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x00, + 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x0E, 0x00, 0x00, 0x00, + 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x0F, 0x00, 0x00, 0x00, + 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x00, 0x08, 0x32, 0x20, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3F, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, + 0x42, 0x20, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x2A, 0x10, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, + 0x32, 0x20, 0x10, 0x00, 0x11, 0x00, 0x00, 0x00, 0x46, 0x00, 0x10, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xC2, 0x20, 0x10, 0x00, + 0x11, 0x00, 0x00, 0x00, 0xA6, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x11, 0x00, 0x00, 0x00, 0x75, 0x00, 0x00, 0x03, 0x00, 0x00, 0x11, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0B, 0xC2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x04, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF6, 0x1F, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, - 0x32, 0x00, 0x00, 0x0D, 0xF2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, - 0xE6, 0x0E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, - 0x00, 0x00, 0x80, 0xBF, 0x00, 0x00, 0x80, 0x3F, 0x00, 0x00, 0x80, 0x3F, - 0x00, 0x00, 0x80, 0xBF, 0x46, 0x14, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x06, 0x14, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00, + 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x09, 0x00, 0x00, 0x00, + 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x0A, 0x00, 0x00, 0x00, + 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x0B, 0x00, 0x00, 0x00, + 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x0C, 0x00, 0x00, 0x00, + 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x00, + 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x0E, 0x00, 0x00, 0x00, + 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x0F, 0x00, 0x00, 0x00, + 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x00, 0x08, 0x32, 0x20, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3F, 0x00, 0x00, 0x80, 0x3F, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, + 0x42, 0x20, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x2A, 0x10, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, + 0x32, 0x20, 0x10, 0x00, 0x11, 0x00, 0x00, 0x00, 0xE6, 0x0A, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xC2, 0x20, 0x10, 0x00, + 0x11, 0x00, 0x00, 0x00, 0xA6, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x11, 0x00, 0x00, 0x00, 0x75, 0x00, 0x00, 0x03, 0x00, 0x00, 0x11, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0C, 0x32, 0x00, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x46, 0x00, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xF6, 0x1F, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x11, 0x00, 0x00, 0x00, 0x46, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, @@ -431,63 +522,14 @@ const uint8_t primitive_point_list_gs[] = { 0x0F, 0x00, 0x00, 0x00, 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x08, 0x32, 0x20, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0x42, 0x20, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x2A, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x32, 0x20, 0x10, 0x00, 0x11, 0x00, 0x00, 0x00, - 0x46, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, + 0x46, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xC2, 0x20, 0x10, 0x00, 0x11, 0x00, 0x00, 0x00, 0xA6, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x75, 0x00, 0x00, 0x03, - 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0B, - 0xC2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x04, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xF6, 0x1F, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x11, 0x00, 0x00, 0x00, 0x06, 0x14, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x11, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, - 0x02, 0x00, 0x00, 0x00, 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x02, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, - 0x03, 0x00, 0x00, 0x00, 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, - 0x04, 0x00, 0x00, 0x00, 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, - 0x05, 0x00, 0x00, 0x00, 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x05, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, - 0x06, 0x00, 0x00, 0x00, 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x06, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, - 0x07, 0x00, 0x00, 0x00, 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x07, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, - 0x08, 0x00, 0x00, 0x00, 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x08, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, - 0x09, 0x00, 0x00, 0x00, 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x09, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, - 0x0A, 0x00, 0x00, 0x00, 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x0A, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, - 0x0B, 0x00, 0x00, 0x00, 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x0B, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, - 0x0C, 0x00, 0x00, 0x00, 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x0C, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, - 0x0D, 0x00, 0x00, 0x00, 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x0D, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, - 0x0E, 0x00, 0x00, 0x00, 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x0E, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, - 0x0F, 0x00, 0x00, 0x00, 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x0F, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x08, 0x32, 0x20, 0x10, 0x00, - 0x10, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3F, - 0x00, 0x00, 0x80, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x36, 0x00, 0x00, 0x06, 0x42, 0x20, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, - 0x2A, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, - 0x36, 0x00, 0x00, 0x05, 0x32, 0x20, 0x10, 0x00, 0x11, 0x00, 0x00, 0x00, - 0xE6, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, - 0xC2, 0x20, 0x10, 0x00, 0x11, 0x00, 0x00, 0x00, 0xA6, 0x1E, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x75, 0x00, 0x00, 0x03, - 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0C, - 0x32, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x00, 0x10, 0x80, - 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF6, 0x1F, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x46, 0x10, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, + 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x1E, 0x20, 0x00, @@ -521,68 +563,27 @@ const uint8_t primitive_point_list_gs[] = { 0xF2, 0x20, 0x10, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x08, 0x32, 0x20, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0x42, 0x20, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x2A, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x32, 0x20, 0x10, 0x00, - 0x11, 0x00, 0x00, 0x00, 0x46, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x11, 0x00, 0x00, 0x00, 0xE6, 0x0A, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xC2, 0x20, 0x10, 0x00, 0x11, 0x00, 0x00, 0x00, 0xA6, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x75, 0x00, 0x00, 0x03, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, - 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, - 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, - 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, - 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, - 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, - 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00, - 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, - 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x06, 0x00, 0x00, 0x00, - 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, - 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x07, 0x00, 0x00, 0x00, - 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, - 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x08, 0x00, 0x00, 0x00, - 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, - 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x09, 0x00, 0x00, 0x00, - 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, - 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x0A, 0x00, 0x00, 0x00, - 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, - 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x0B, 0x00, 0x00, 0x00, - 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, - 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x0C, 0x00, 0x00, 0x00, - 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, - 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x00, - 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, - 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x0E, 0x00, 0x00, 0x00, - 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, - 0x36, 0x00, 0x00, 0x06, 0xF2, 0x20, 0x10, 0x00, 0x0F, 0x00, 0x00, 0x00, - 0x46, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, - 0x36, 0x00, 0x00, 0x08, 0x32, 0x20, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, - 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3F, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, - 0x42, 0x20, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x2A, 0x10, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, - 0x32, 0x20, 0x10, 0x00, 0x11, 0x00, 0x00, 0x00, 0xE6, 0x0A, 0x10, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xC2, 0x20, 0x10, 0x00, - 0x11, 0x00, 0x00, 0x00, 0xA6, 0x1E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x11, 0x00, 0x00, 0x00, 0x75, 0x00, 0x00, 0x03, 0x00, 0x00, 0x11, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x76, 0x00, 0x00, 0x03, 0x00, 0x00, 0x11, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x01, 0x53, 0x54, 0x41, 0x54, - 0x94, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x76, 0x00, 0x00, 0x03, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x3E, 0x00, 0x00, 0x01, 0x53, 0x54, 0x41, 0x54, 0x94, 0x00, 0x00, 0x00, + 0x5F, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x24, 0x00, 0x00, 0x00, 0x08, 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, + 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 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, - 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, - 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, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, }; diff --git a/src/xenia/gpu/d3d12/shaders/dxbc/primitive_point_list_gs.txt b/src/xenia/gpu/d3d12/shaders/dxbc/primitive_point_list_gs.txt index 21cc3a1f2..a0817d5b3 100644 --- a/src/xenia/gpu/d3d12/shaders/dxbc/primitive_point_list_gs.txt +++ b/src/xenia/gpu/d3d12/shaders/dxbc/primitive_point_list_gs.txt @@ -35,8 +35,8 @@ // uint4 xe_edram_rt_pack_offset_low_rt3;// Offset: 272 Size: 16 [unused] // uint4 xe_edram_load_mask_rt01; // Offset: 288 Size: 16 [unused] // uint4 xe_edram_load_mask_rt23; // Offset: 304 Size: 16 [unused] -// uint4 xe_edram_blend1; // Offset: 320 Size: 16 [unused] -// uint4 xe_edram_blend2; // Offset: 336 Size: 16 [unused] +// uint4 xe_edram_blend_rt01; // Offset: 320 Size: 16 [unused] +// uint4 xe_edram_blend_rt23; // Offset: 336 Size: 16 [unused] // float4 xe_edram_blend_constant; // Offset: 352 Size: 16 [unused] // float4 xe_edram_store_min_rt01; // Offset: 368 Size: 16 [unused] // float4 xe_edram_store_min_rt23; // Offset: 384 Size: 16 [unused] diff --git a/src/xenia/gpu/d3d12/shaders/xenos_draw.hlsli b/src/xenia/gpu/d3d12/shaders/xenos_draw.hlsli index ae1c3ae13..8fbfed8d9 100644 --- a/src/xenia/gpu/d3d12/shaders/xenos_draw.hlsli +++ b/src/xenia/gpu/d3d12/shaders/xenos_draw.hlsli @@ -51,9 +51,9 @@ cbuffer xe_system_cbuffer : register(b0) { // vec4 19 uint4 xe_edram_load_mask_rt23; // vec4 20 - uint4 xe_edram_blend1; + uint4 xe_edram_blend_rt01; // vec4 21 - uint4 xe_edram_blend2; + uint4 xe_edram_blend_rt23; // vec4 22 float4 xe_edram_blend_constant; // vec4 23 diff --git a/src/xenia/gpu/dxbc_shader_translator.cc b/src/xenia/gpu/dxbc_shader_translator.cc index f4b19af8c..b1bc4eb6e 100644 --- a/src/xenia/gpu/dxbc_shader_translator.cc +++ b/src/xenia/gpu/dxbc_shader_translator.cc @@ -72,27 +72,27 @@ DxbcShaderTranslator::DxbcShaderTranslator(bool edram_rov_used) DxbcShaderTranslator::~DxbcShaderTranslator() = default; bool DxbcShaderTranslator::GetBlendConstants(uint32_t blend_control, - uint32_t& blend1_out, - uint32_t& blend2_out) { - static const uint32_t kBlend1SrcFactorMap[32] = { + uint32_t& blend_x_out, + uint32_t& blend_y_out) { + static const uint32_t kBlendXSrcFactorMap[32] = { 0, - kBlend1_Src_One, + kBlendX_Src_One, 0, 0, - kBlend1_Src_SrcColor_Pos, - kBlend1_Src_One | kBlend1_Src_SrcColor_Neg, - kBlend1_Src_SrcAlpha_Pos, - kBlend1_Src_One | kBlend1_Src_SrcAlpha_Neg, - kBlend1_Src_DestColor_Pos, - kBlend1_Src_One | kBlend1_Src_DestColor_Neg, - kBlend1_Src_DestAlpha_Pos, - kBlend1_Src_One | kBlend1_Src_DestAlpha_Neg, + kBlendX_Src_SrcColor_Pos, + kBlendX_Src_One | kBlendX_Src_SrcColor_Neg, + kBlendX_Src_SrcAlpha_Pos, + kBlendX_Src_One | kBlendX_Src_SrcAlpha_Neg, + kBlendX_Src_DestColor_Pos, + kBlendX_Src_One | kBlendX_Src_DestColor_Neg, + kBlendX_Src_DestAlpha_Pos, + kBlendX_Src_One | kBlendX_Src_DestAlpha_Neg, 0, - kBlend1_Src_One, + kBlendX_Src_One, 0, - kBlend1_Src_One, + kBlendX_Src_One | kBlendX_Src_DestAlpha_Neg, }; - static const uint32_t kBlend2SrcFactorMap[32] = { + static const uint32_t kBlendYSrcFactorMap[32] = { 0, 0, 0, @@ -105,31 +105,31 @@ bool DxbcShaderTranslator::GetBlendConstants(uint32_t blend_control, 0, 0, 0, - kBlend2_Src_ConstantColor_Pos, - kBlend2_Src_ConstantColor_Neg, - kBlend2_Src_ConstantAlpha_Pos, - kBlend2_Src_ConstantAlpha_Neg, - kBlend2_Src_AlphaSaturate, + kBlendY_Src_ConstantColor_Pos, + kBlendY_Src_ConstantColor_Neg, + kBlendY_Src_ConstantAlpha_Pos, + kBlendY_Src_ConstantAlpha_Neg, + kBlendY_Src_AlphaSaturate, }; - static const uint32_t kBlend1SrcAlphaFactorMap[32] = { + static const uint32_t kBlendXSrcAlphaFactorMap[32] = { 0, - kBlend1_SrcAlpha_One, + kBlendX_SrcAlpha_One, 0, 0, - kBlend1_SrcAlpha_SrcAlpha_Pos, - kBlend1_SrcAlpha_One | kBlend1_SrcAlpha_SrcAlpha_Neg, - kBlend1_SrcAlpha_SrcAlpha_Pos, - kBlend1_SrcAlpha_One | kBlend1_SrcAlpha_SrcAlpha_Neg, - kBlend1_SrcAlpha_DestAlpha_Pos, - kBlend1_SrcAlpha_One | kBlend1_SrcAlpha_DestAlpha_Neg, - kBlend1_SrcAlpha_DestAlpha_Pos, - kBlend1_SrcAlpha_One | kBlend1_SrcAlpha_DestAlpha_Neg, + kBlendX_SrcAlpha_SrcAlpha_Pos, + kBlendX_SrcAlpha_One | kBlendX_SrcAlpha_SrcAlpha_Neg, + kBlendX_SrcAlpha_SrcAlpha_Pos, + kBlendX_SrcAlpha_One | kBlendX_SrcAlpha_SrcAlpha_Neg, + kBlendX_SrcAlpha_DestAlpha_Pos, + kBlendX_SrcAlpha_One | kBlendX_SrcAlpha_DestAlpha_Neg, + kBlendX_SrcAlpha_DestAlpha_Pos, + kBlendX_SrcAlpha_One | kBlendX_SrcAlpha_DestAlpha_Neg, 0, - kBlend1_SrcAlpha_One, + kBlendX_SrcAlpha_One, 0, - kBlend1_SrcAlpha_One, + kBlendX_SrcAlpha_One, }; - static const uint32_t kBlend2SrcAlphaFactorMap[32] = { + static const uint32_t kBlendYSrcAlphaFactorMap[32] = { 0, 0, 0, @@ -142,31 +142,31 @@ bool DxbcShaderTranslator::GetBlendConstants(uint32_t blend_control, 0, 0, 0, - kBlend2_SrcAlpha_ConstantAlpha_Pos, - kBlend2_SrcAlpha_ConstantAlpha_Neg, - kBlend2_SrcAlpha_ConstantAlpha_Pos, - kBlend2_SrcAlpha_ConstantAlpha_Neg, - kBlend2_SrcAlpha_AlphaSaturate, + kBlendY_SrcAlpha_ConstantAlpha_Pos, + kBlendY_SrcAlpha_ConstantAlpha_Neg, + kBlendY_SrcAlpha_ConstantAlpha_Pos, + kBlendY_SrcAlpha_ConstantAlpha_Neg, + kBlendY_SrcAlpha_AlphaSaturate, }; - static const uint32_t kBlend1DestFactorMap[32] = { + static const uint32_t kBlendXDestFactorMap[32] = { 0, - kBlend1_Dest_One, + kBlendX_Dest_One, 0, 0, - kBlend1_Dest_SrcColor_Pos, - kBlend1_Dest_One | kBlend1_Dest_SrcColor_Neg, - kBlend1_Dest_SrcAlpha_Pos, - kBlend1_Dest_One | kBlend1_Dest_SrcAlpha_Neg, - kBlend1_Dest_DestColor_Pos, - kBlend1_Dest_One | kBlend1_Dest_DestColor_Neg, - kBlend1_Dest_DestAlpha_Pos, - kBlend1_Dest_One | kBlend1_Dest_DestAlpha_Neg, + kBlendX_Dest_SrcColor_Pos, + kBlendX_Dest_One | kBlendX_Dest_SrcColor_Neg, + kBlendX_Dest_SrcAlpha_Pos, + kBlendX_Dest_One | kBlendX_Dest_SrcAlpha_Neg, + kBlendX_Dest_DestColor_Pos, + kBlendX_Dest_One | kBlendX_Dest_DestColor_Neg, + kBlendX_Dest_DestAlpha_Pos, + kBlendX_Dest_One | kBlendX_Dest_DestAlpha_Neg, 0, - kBlend1_Dest_One, + kBlendX_Dest_One, 0, - kBlend1_Dest_One, + kBlendX_Dest_One | kBlendX_Src_DestAlpha_Neg, }; - static const uint32_t kBlend2DestFactorMap[32] = { + static const uint32_t kBlendYDestFactorMap[32] = { 0, 0, 0, @@ -179,31 +179,31 @@ bool DxbcShaderTranslator::GetBlendConstants(uint32_t blend_control, 0, 0, 0, - kBlend2_Dest_ConstantColor_Pos, - kBlend2_Dest_ConstantColor_Neg, - kBlend2_Dest_ConstantAlpha_Pos, - kBlend2_Dest_ConstantAlpha_Neg, - kBlend2_Dest_AlphaSaturate, + kBlendY_Dest_ConstantColor_Pos, + kBlendY_Dest_ConstantColor_Neg, + kBlendY_Dest_ConstantAlpha_Pos, + kBlendY_Dest_ConstantAlpha_Neg, + kBlendY_Dest_AlphaSaturate, }; - static const uint32_t kBlend1DestAlphaFactorMap[32] = { + static const uint32_t kBlendXDestAlphaFactorMap[32] = { 0, - kBlend1_DestAlpha_One, + kBlendX_DestAlpha_One, 0, 0, - kBlend1_DestAlpha_SrcAlpha_Pos, - kBlend1_DestAlpha_One | kBlend1_DestAlpha_SrcAlpha_Neg, - kBlend1_DestAlpha_SrcAlpha_Pos, - kBlend1_DestAlpha_One | kBlend1_DestAlpha_SrcAlpha_Neg, - kBlend1_DestAlpha_DestAlpha_Pos, - kBlend1_DestAlpha_One | kBlend1_DestAlpha_DestAlpha_Neg, - kBlend1_DestAlpha_DestAlpha_Pos, - kBlend1_DestAlpha_One | kBlend1_DestAlpha_DestAlpha_Neg, + kBlendX_DestAlpha_SrcAlpha_Pos, + kBlendX_DestAlpha_One | kBlendX_DestAlpha_SrcAlpha_Neg, + kBlendX_DestAlpha_SrcAlpha_Pos, + kBlendX_DestAlpha_One | kBlendX_DestAlpha_SrcAlpha_Neg, + kBlendX_DestAlpha_DestAlpha_Pos, + kBlendX_DestAlpha_One | kBlendX_DestAlpha_DestAlpha_Neg, + kBlendX_DestAlpha_DestAlpha_Pos, + kBlendX_DestAlpha_One | kBlendX_DestAlpha_DestAlpha_Neg, 0, - kBlend1_DestAlpha_One, + kBlendX_DestAlpha_One, 0, - kBlend1_DestAlpha_One, + kBlendX_DestAlpha_One, }; - static const uint32_t kBlend2DestAlphaFactorMap[32] = { + static const uint32_t kBlendYDestAlphaFactorMap[32] = { 0, 0, 0, @@ -216,65 +216,80 @@ bool DxbcShaderTranslator::GetBlendConstants(uint32_t blend_control, 0, 0, 0, - kBlend2_DestAlpha_ConstantAlpha_Pos, - kBlend2_DestAlpha_ConstantAlpha_Neg, - kBlend2_DestAlpha_ConstantAlpha_Pos, - kBlend2_DestAlpha_ConstantAlpha_Neg, - kBlend2_DestAlpha_AlphaSaturate, + kBlendY_DestAlpha_ConstantAlpha_Pos, + kBlendY_DestAlpha_ConstantAlpha_Neg, + kBlendY_DestAlpha_ConstantAlpha_Pos, + kBlendY_DestAlpha_ConstantAlpha_Neg, + kBlendY_DestAlpha_AlphaSaturate, }; - BlendFactor src_factor = BlendFactor(blend_control & 0x1F); - BlendFactor src_alpha_factor = BlendFactor((blend_control >> 16) & 0x1F); - BlendFactor dest_factor = BlendFactor((blend_control >> 8) & 0x1F); - BlendFactor dest_alpha_factor = BlendFactor((blend_control >> 24) & 0x1F); + uint32_t blend_x = 0, blend_y = 0; - blend1_out = kBlend1SrcFactorMap[uint32_t(src_factor)] | - kBlend1SrcAlphaFactorMap[uint32_t(src_alpha_factor)] | - kBlend1DestFactorMap[uint32_t(dest_factor)] | - kBlend1DestAlphaFactorMap[uint32_t(dest_alpha_factor)]; - uint32_t blend2 = kBlend2SrcFactorMap[uint32_t(src_factor)] | - kBlend2SrcAlphaFactorMap[uint32_t(src_alpha_factor)] | - kBlend2DestFactorMap[uint32_t(dest_factor)] | - kBlend2DestAlphaFactorMap[uint32_t(dest_alpha_factor)]; - switch (BlendOp((blend_control >> 5) & 0x7)) { - case BlendOp::kAdd: - blend2 |= kBlend2_Src_OpSign_Pos | kBlend2_Dest_OpSign_Pos; - break; - case BlendOp::kSubtract: - blend2 |= kBlend2_Src_OpSign_Pos | kBlend2_Dest_OpSign_Neg; - break; - case BlendOp::kMin: - blend2 |= kBlend2_Color_OpMin; - break; - case BlendOp::kMax: - blend2 |= kBlend2_Color_OpMax; - break; - case BlendOp::kRevSubtract: - blend2 |= kBlend2_Src_OpSign_Neg | kBlend2_Dest_OpSign_Pos; - break; - default: - assert_always(); + // Min and max don't use the factors, so set them to one. + + BlendOp op_color = BlendOp((blend_control >> 5) & 0x7); + if (op_color == BlendOp::kMin) { + blend_x |= kBlendX_Src_One | kBlendX_Dest_One; + blend_y |= + kBlendY_Src_OpSign_Pos | kBlendY_Dest_OpSign_Pos | kBlendY_Color_OpMin; + } else if (op_color == BlendOp::kMax) { + blend_x |= kBlendX_Src_One | kBlendX_Dest_One; + kBlendY_Src_OpSign_Pos | kBlendY_Dest_OpSign_Pos | kBlendY_Color_OpMax; + } else { + uint32_t src_factor = blend_control & 0x1F; + uint32_t dest_factor = (blend_control >> 8) & 0x1F; + blend_x |= + kBlendXSrcFactorMap[src_factor] | kBlendXDestFactorMap[dest_factor]; + blend_y |= + kBlendYSrcFactorMap[src_factor] | kBlendYDestFactorMap[dest_factor]; + switch (op_color) { + case BlendOp::kAdd: + blend_y |= kBlendY_Src_OpSign_Pos | kBlendY_Dest_OpSign_Pos; + break; + case BlendOp::kSubtract: + blend_y |= kBlendY_Src_OpSign_Pos | kBlendY_Dest_OpSign_Neg; + break; + case BlendOp::kRevSubtract: + blend_y |= kBlendY_Src_OpSign_Neg | kBlendY_Dest_OpSign_Pos; + break; + default: + assert_always(); + } } - switch (BlendOp((blend_control >> 21) & 0x7)) { - case BlendOp::kAdd: - blend2 |= kBlend2_SrcAlpha_OpSign_Pos | kBlend2_DestAlpha_OpSign_Pos; - break; - case BlendOp::kSubtract: - blend2 |= kBlend2_SrcAlpha_OpSign_Pos | kBlend2_DestAlpha_OpSign_Neg; - break; - case BlendOp::kMin: - blend2 |= kBlend2_Alpha_OpMin; - break; - case BlendOp::kMax: - blend2 |= kBlend2_Alpha_OpMax; - break; - case BlendOp::kRevSubtract: - blend2 |= kBlend2_SrcAlpha_OpSign_Neg | kBlend2_DestAlpha_OpSign_Pos; - break; - default: - assert_always(); + + BlendOp op_alpha = BlendOp((blend_control >> 21) & 0x7); + if (op_alpha == BlendOp::kMin) { + blend_x |= kBlendX_SrcAlpha_One | kBlendX_DestAlpha_One; + blend_y |= kBlendY_SrcAlpha_OpSign_Pos | kBlendY_DestAlpha_OpSign_Pos | + kBlendY_Alpha_OpMin; + } else if (op_alpha == BlendOp::kMax) { + blend_x |= kBlendX_SrcAlpha_One | kBlendX_DestAlpha_One; + blend_y |= kBlendY_SrcAlpha_OpSign_Pos | kBlendY_DestAlpha_OpSign_Pos | + kBlendY_Alpha_OpMax; + } else { + uint32_t src_alpha_factor = (blend_control >> 16) & 0x1F; + uint32_t dest_alpha_factor = (blend_control >> 24) & 0x1F; + blend_x |= kBlendXSrcAlphaFactorMap[src_alpha_factor] | + kBlendYDestAlphaFactorMap[dest_alpha_factor]; + blend_y |= kBlendXSrcAlphaFactorMap[src_alpha_factor] | + kBlendYDestAlphaFactorMap[dest_alpha_factor]; + switch (op_alpha) { + case BlendOp::kAdd: + blend_y |= kBlendY_SrcAlpha_OpSign_Pos | kBlendY_DestAlpha_OpSign_Pos; + break; + case BlendOp::kSubtract: + blend_y |= kBlendY_SrcAlpha_OpSign_Pos | kBlendY_DestAlpha_OpSign_Neg; + break; + case BlendOp::kRevSubtract: + blend_y |= kBlendY_SrcAlpha_OpSign_Neg | kBlendY_DestAlpha_OpSign_Pos; + break; + default: + assert_always(); + } } - blend2_out = blend2; + + blend_x_out = blend_x; + blend_y_out = blend_y; // 1 * src + 0 * dest is nop, don't waste GPU time. return (blend_control & 0x1FFF1FFF) != 0x00010001; @@ -1326,6 +1341,277 @@ void DxbcShaderTranslator::CompletePixelShader_WriteToROV_LoadColor( PopSystemTemp(); } +void DxbcShaderTranslator::CompletePixelShader_WriteToROV_ExtractBlendScales( + uint32_t rt_index, uint32_t constant_swizzle, bool is_signed, + uint32_t shift_x, uint32_t shift_y, uint32_t shift_z, uint32_t shift_w, + uint32_t target_temp, uint32_t write_mask) { + uint32_t rt_pair_index = rt_index >> 1; + if (rt_index & 1) { + constant_swizzle |= 0b10101010; + } + + // Sign-extend 2 bits for signed, extract 1 bit for unsigned. + system_constants_used_ |= (1ull << kSysConst_EDRAMBlendRT01_Index) + << rt_pair_index; + shader_code_.push_back( + ENCODE_D3D10_SB_OPCODE_TYPE(is_signed ? D3D11_SB_OPCODE_UBFE + : D3D11_SB_OPCODE_IBFE) | + ENCODE_D3D10_SB_TOKENIZED_INSTRUCTION_LENGTH(17)); + shader_code_.push_back( + EncodeVectorMaskedOperand(D3D10_SB_OPERAND_TYPE_TEMP, write_mask, 1)); + shader_code_.push_back(target_temp); + shader_code_.push_back(EncodeVectorSwizzledOperand( + D3D10_SB_OPERAND_TYPE_IMMEDIATE32, kSwizzleXYZW, 0)); + uint32_t width = is_signed ? 2 : 1; + shader_code_.push_back(width); + shader_code_.push_back(width); + shader_code_.push_back(width); + shader_code_.push_back(width); + shader_code_.push_back(EncodeVectorSwizzledOperand( + D3D10_SB_OPERAND_TYPE_IMMEDIATE32, kSwizzleXYZW, 0)); + shader_code_.push_back(shift_x); + shader_code_.push_back(shift_y); + shader_code_.push_back(shift_z); + shader_code_.push_back(shift_w); + shader_code_.push_back(EncodeVectorSwizzledOperand( + D3D10_SB_OPERAND_TYPE_CONSTANT_BUFFER, constant_swizzle, 3)); + shader_code_.push_back(cbuffer_index_system_constants_); + shader_code_.push_back(uint32_t(CbufferRegister::kSystemConstants)); + shader_code_.push_back(kSysConst_EDRAMBlendRT01_Vec + rt_pair_index); + ++stat_.instruction_count; + if (is_signed) { + ++stat_.int_instruction_count; + } else { + ++stat_.uint_instruction_count; + } + + // Convert -1, 0 or 1 integer to float. + shader_code_.push_back( + ENCODE_D3D10_SB_OPCODE_TYPE(is_signed ? D3D10_SB_OPCODE_UTOF + : D3D10_SB_OPCODE_ITOF) | + ENCODE_D3D10_SB_TOKENIZED_INSTRUCTION_LENGTH(5)); + shader_code_.push_back( + EncodeVectorMaskedOperand(D3D10_SB_OPERAND_TYPE_TEMP, write_mask, 1)); + shader_code_.push_back(target_temp); + shader_code_.push_back( + EncodeVectorSwizzledOperand(D3D10_SB_OPERAND_TYPE_TEMP, kSwizzleXYZW, 1)); + shader_code_.push_back(target_temp); + ++stat_.instruction_count; + ++stat_.conversion_instruction_count; +} + +void DxbcShaderTranslator::CompletePixelShader_WriteToROV_Blend( + uint32_t rt_index, uint32_t src_color_and_output_temp, + uint32_t dest_color_temp) { + // Temporary register for scales of things that contribute to the blending, + // usually -1.0, 0.0 or 1.0. + uint32_t scale_temp = PushSystemTemp(); + + // First, calculate the factors. Min/max is handled in constant setting, since + // they don't use the factors, their factors are set to one there. + // Interleaving source and destination writes when possible to reduce + // write-read dependencies. + + uint32_t src_factor_temp = PushSystemTemp(); + uint32_t dest_factor_temp = PushSystemTemp(); + + // Constant one for factors, reusing dest_factor_temp (since it's the last to + // be modified). + CompletePixelShader_WriteToROV_ExtractBlendScales( + rt_index, 0b00000000, false, kBlendX_Src_One_Shift, + kBlendX_SrcAlpha_One_Shift, kBlendX_Dest_One_Shift, + kBlendX_DestAlpha_One_Shift, dest_factor_temp); + + // Source color for color factors, source alpha for alpha factors, plus ones. + // This will initialize src_factor_temp and dest_factor_temp. + CompletePixelShader_WriteToROV_ExtractBlendScales( + rt_index, 0b00000000, true, kBlendX_Src_SrcColor_Shift, + kBlendX_SrcAlpha_SrcAlpha_Shift, kBlendX_Dest_DestColor_Shift, + kBlendX_DestAlpha_DestAlpha_Shift, scale_temp); + for (uint32_t i = 0; i < 2; ++i) { + shader_code_.push_back(ENCODE_D3D10_SB_OPCODE_TYPE(D3D10_SB_OPCODE_MAD) | + ENCODE_D3D10_SB_TOKENIZED_INSTRUCTION_LENGTH(9)); + shader_code_.push_back( + EncodeVectorMaskedOperand(D3D10_SB_OPERAND_TYPE_TEMP, 0b1111, 1)); + shader_code_.push_back(i ? dest_factor_temp : src_factor_temp); + shader_code_.push_back(EncodeVectorSwizzledOperand( + D3D10_SB_OPERAND_TYPE_TEMP, kSwizzleXYZW, 1)); + shader_code_.push_back(src_color_and_output_temp); + uint32_t swizzle = i ? 0b11101010 : 0b01000000; + shader_code_.push_back( + EncodeVectorSwizzledOperand(D3D10_SB_OPERAND_TYPE_TEMP, swizzle, 1)); + shader_code_.push_back(scale_temp); + // dest_factor_temp is the last one to be modified, so it stores the ones + // (not to allocate an additional temporary register). + shader_code_.push_back( + EncodeVectorSwizzledOperand(D3D10_SB_OPERAND_TYPE_TEMP, swizzle, 1)); + shader_code_.push_back(dest_factor_temp); + ++stat_.instruction_count; + ++stat_.float_instruction_count; + } + + // Destination color for color factors, destination alpha for alpha factors. + CompletePixelShader_WriteToROV_ExtractBlendScales( + rt_index, 0b00000000, true, kBlendX_Src_DestColor_Shift, + kBlendX_SrcAlpha_DestAlpha_Shift, kBlendX_Dest_DestColor_Shift, + kBlendX_DestAlpha_DestAlpha_Shift, scale_temp); + for (uint32_t i = 0; i < 2; ++i) { + shader_code_.push_back(ENCODE_D3D10_SB_OPCODE_TYPE(D3D10_SB_OPCODE_MAD) | + ENCODE_D3D10_SB_TOKENIZED_INSTRUCTION_LENGTH(9)); + shader_code_.push_back( + EncodeVectorMaskedOperand(D3D10_SB_OPERAND_TYPE_TEMP, 0b1111, 1)); + shader_code_.push_back(i ? dest_factor_temp : src_factor_temp); + shader_code_.push_back(EncodeVectorSwizzledOperand( + D3D10_SB_OPERAND_TYPE_TEMP, kSwizzleXYZW, 1)); + shader_code_.push_back(dest_color_temp); + shader_code_.push_back(EncodeVectorSwizzledOperand( + D3D10_SB_OPERAND_TYPE_TEMP, i ? 0b11101010 : 0b01000000, 1)); + shader_code_.push_back(scale_temp); + shader_code_.push_back(EncodeVectorSwizzledOperand( + D3D10_SB_OPERAND_TYPE_TEMP, kSwizzleXYZW, 1)); + shader_code_.push_back(i ? dest_factor_temp : src_factor_temp); + ++stat_.instruction_count; + ++stat_.float_instruction_count; + } + + // Source and destination alphas for color factors. + CompletePixelShader_WriteToROV_ExtractBlendScales( + rt_index, 0b00000000, true, kBlendX_Src_SrcAlpha_Shift, + kBlendX_Dest_SrcAlpha_Shift, kBlendX_Src_DestAlpha_Shift, + kBlendX_Dest_DestAlpha_Shift, scale_temp); + for (uint32_t i = 0; i < 4; ++i) { + shader_code_.push_back(ENCODE_D3D10_SB_OPCODE_TYPE(D3D10_SB_OPCODE_MAD) | + ENCODE_D3D10_SB_TOKENIZED_INSTRUCTION_LENGTH(9)); + shader_code_.push_back( + EncodeVectorMaskedOperand(D3D10_SB_OPERAND_TYPE_TEMP, 0b0111, 1)); + shader_code_.push_back(i & 1 ? dest_factor_temp : src_factor_temp); + shader_code_.push_back( + EncodeVectorReplicatedOperand(D3D10_SB_OPERAND_TYPE_TEMP, 3, 1)); + shader_code_.push_back(i & 2 ? dest_color_temp : src_color_and_output_temp); + shader_code_.push_back( + EncodeVectorReplicatedOperand(D3D10_SB_OPERAND_TYPE_TEMP, i, 1)); + shader_code_.push_back(scale_temp); + shader_code_.push_back(EncodeVectorSwizzledOperand( + D3D10_SB_OPERAND_TYPE_TEMP, kSwizzleXYZW, 1)); + shader_code_.push_back(i & 1 ? dest_factor_temp : src_factor_temp); + ++stat_.instruction_count; + ++stat_.float_instruction_count; + } + + // Constant color for color factors, constant alpha for alpha factors. + system_constants_used_ |= 1ull << kSysConst_EDRAMBlendConstant_Index; + CompletePixelShader_WriteToROV_ExtractBlendScales( + rt_index, 0b01010101, true, kBlendY_Src_ConstantColor_Shift, + kBlendY_SrcAlpha_ConstantAlpha_Shift, kBlendY_Dest_ConstantColor_Shift, + kBlendY_DestAlpha_ConstantAlpha_Shift, scale_temp); + for (uint32_t i = 0; i < 2; ++i) { + shader_code_.push_back(ENCODE_D3D10_SB_OPCODE_TYPE(D3D10_SB_OPCODE_MAD) | + ENCODE_D3D10_SB_TOKENIZED_INSTRUCTION_LENGTH(11)); + shader_code_.push_back( + EncodeVectorMaskedOperand(D3D10_SB_OPERAND_TYPE_TEMP, 0b1111, 1)); + shader_code_.push_back(i ? dest_factor_temp : src_factor_temp); + shader_code_.push_back(EncodeVectorSwizzledOperand( + D3D10_SB_OPERAND_TYPE_CONSTANT_BUFFER, kSwizzleXYZW, 3)); + shader_code_.push_back(cbuffer_index_system_constants_); + shader_code_.push_back(uint32_t(CbufferRegister::kSystemConstants)); + shader_code_.push_back(kSysConst_EDRAMBlendConstant_Vec); + shader_code_.push_back(EncodeVectorSwizzledOperand( + D3D10_SB_OPERAND_TYPE_TEMP, i ? 0b11101010 : 0b01000000, 1)); + shader_code_.push_back(scale_temp); + shader_code_.push_back(EncodeVectorSwizzledOperand( + D3D10_SB_OPERAND_TYPE_TEMP, kSwizzleXYZW, 1)); + shader_code_.push_back(i ? dest_factor_temp : src_factor_temp); + ++stat_.instruction_count; + ++stat_.float_instruction_count; + } + + // Constant alpha for color factors. + CompletePixelShader_WriteToROV_ExtractBlendScales( + rt_index, 0b01010101, true, kBlendY_Src_ConstantAlpha_Shift, + kBlendY_Dest_ConstantAlpha_Shift, 0, 0, scale_temp, 0b0011); + for (uint32_t i = 0; i < 2; ++i) { + shader_code_.push_back(ENCODE_D3D10_SB_OPCODE_TYPE(D3D10_SB_OPCODE_MAD) | + ENCODE_D3D10_SB_TOKENIZED_INSTRUCTION_LENGTH(11)); + shader_code_.push_back( + EncodeVectorMaskedOperand(D3D10_SB_OPERAND_TYPE_TEMP, 0b0111, 1)); + shader_code_.push_back(i ? dest_factor_temp : src_factor_temp); + shader_code_.push_back(EncodeVectorReplicatedOperand( + D3D10_SB_OPERAND_TYPE_CONSTANT_BUFFER, 3, 3)); + shader_code_.push_back(cbuffer_index_system_constants_); + shader_code_.push_back(uint32_t(CbufferRegister::kSystemConstants)); + shader_code_.push_back(kSysConst_EDRAMBlendConstant_Vec); + shader_code_.push_back( + EncodeVectorReplicatedOperand(D3D10_SB_OPERAND_TYPE_TEMP, i, 1)); + shader_code_.push_back(scale_temp); + shader_code_.push_back(EncodeVectorSwizzledOperand( + D3D10_SB_OPERAND_TYPE_TEMP, kSwizzleXYZW, 1)); + shader_code_.push_back(i ? dest_factor_temp : src_factor_temp); + ++stat_.instruction_count; + ++stat_.float_instruction_count; + } + + // TODO(Triang3l): Saturate blend mode. + + // Multiply the factors by the colors (for min/max, factors are 1). + for (uint32_t i = 0; i < 2; ++i) { + shader_code_.push_back(ENCODE_D3D10_SB_OPCODE_TYPE(D3D10_SB_OPCODE_MUL) | + ENCODE_D3D10_SB_TOKENIZED_INSTRUCTION_LENGTH(7)); + shader_code_.push_back( + EncodeVectorMaskedOperand(D3D10_SB_OPERAND_TYPE_TEMP, 0b1111, 1)); + shader_code_.push_back(i ? dest_factor_temp : src_factor_temp); + shader_code_.push_back(EncodeVectorSwizzledOperand( + D3D10_SB_OPERAND_TYPE_TEMP, kSwizzleXYZW, 1)); + shader_code_.push_back(i ? dest_color_temp : src_color_and_output_temp); + shader_code_.push_back(EncodeVectorSwizzledOperand( + D3D10_SB_OPERAND_TYPE_TEMP, kSwizzleXYZW, 1)); + shader_code_.push_back(i ? dest_factor_temp : src_factor_temp); + ++stat_.instruction_count; + ++stat_.float_instruction_count; + } + + // Apply the signs to the factors for addition/subtraction/inverse subtraction + // (for min/max, they are set to positive in the constant, so will be a nop). + CompletePixelShader_WriteToROV_ExtractBlendScales( + rt_index, 0b01010101, true, kBlendY_Src_OpSign_Shift, + kBlendY_SrcAlpha_OpSign_Shift, kBlendY_Dest_OpSign_Shift, + kBlendY_DestAlpha_OpSign_Shift, scale_temp); + for (uint32_t i = 0; i < 2; ++i) { + shader_code_.push_back(ENCODE_D3D10_SB_OPCODE_TYPE(D3D10_SB_OPCODE_MUL) | + ENCODE_D3D10_SB_TOKENIZED_INSTRUCTION_LENGTH(7)); + shader_code_.push_back( + EncodeVectorMaskedOperand(D3D10_SB_OPERAND_TYPE_TEMP, 0b1111, 1)); + shader_code_.push_back(i ? dest_factor_temp : src_factor_temp); + shader_code_.push_back(EncodeVectorSwizzledOperand( + D3D10_SB_OPERAND_TYPE_TEMP, kSwizzleXYZW, 1)); + shader_code_.push_back(i ? dest_factor_temp : src_factor_temp); + shader_code_.push_back(EncodeVectorSwizzledOperand( + D3D10_SB_OPERAND_TYPE_TEMP, i ? 0b11101010 : 0b01000000, 1)); + shader_code_.push_back(scale_temp); + ++stat_.instruction_count; + ++stat_.float_instruction_count; + } + + // Sum the factors into the resulting color. + shader_code_.push_back(ENCODE_D3D10_SB_OPCODE_TYPE(D3D10_SB_OPCODE_ADD) | + ENCODE_D3D10_SB_TOKENIZED_INSTRUCTION_LENGTH(7)); + shader_code_.push_back( + EncodeVectorMaskedOperand(D3D10_SB_OPERAND_TYPE_TEMP, 0b1111, 1)); + shader_code_.push_back(src_color_and_output_temp); + shader_code_.push_back( + EncodeVectorSwizzledOperand(D3D10_SB_OPERAND_TYPE_TEMP, kSwizzleXYZW, 1)); + shader_code_.push_back(src_factor_temp); + shader_code_.push_back( + EncodeVectorSwizzledOperand(D3D10_SB_OPERAND_TYPE_TEMP, kSwizzleXYZW, 1)); + shader_code_.push_back(dest_factor_temp); + ++stat_.instruction_count; + ++stat_.float_instruction_count; + + // TODO(Triang3l): Min/max. + + // Release scale_temp, src_factor_temp and dest_factor_temp. + PopSystemTemp(); +} + void DxbcShaderTranslator::CompletePixelShader_WriteToROV_StoreColor( uint32_t edram_dword_offset_temp, uint32_t rt_index, uint32_t source_and_scratch_temp) { @@ -1751,12 +2037,12 @@ void DxbcShaderTranslator::CompletePixelShader_WriteToROV() { ++stat_.uint_instruction_count; // Get what render targets need to be read (for write masks and blending). - uint32_t rt_load_blend_temp = PushSystemTemp(); + uint32_t rt_load_temp = PushSystemTemp(); shader_code_.push_back(ENCODE_D3D10_SB_OPCODE_TYPE(D3D10_SB_OPCODE_AND) | ENCODE_D3D10_SB_TOKENIZED_INSTRUCTION_LENGTH(12)); shader_code_.push_back( EncodeVectorMaskedOperand(D3D10_SB_OPERAND_TYPE_TEMP, 0b1111, 1)); - shader_code_.push_back(rt_load_blend_temp); + shader_code_.push_back(rt_load_temp); shader_code_.push_back(EncodeVectorSwizzledOperand( D3D10_SB_OPERAND_TYPE_CONSTANT_BUFFER, kSwizzleXYZW, 3)); shader_code_.push_back(cbuffer_index_system_constants_); @@ -1771,6 +2057,28 @@ void DxbcShaderTranslator::CompletePixelShader_WriteToROV() { ++stat_.instruction_count; ++stat_.uint_instruction_count; + // Get what render targets need blending (if only write mask is used and no + // blending, skip blending). + uint32_t rt_blend_temp = PushSystemTemp(); + shader_code_.push_back(ENCODE_D3D10_SB_OPCODE_TYPE(D3D10_SB_OPCODE_AND) | + ENCODE_D3D10_SB_TOKENIZED_INSTRUCTION_LENGTH(12)); + shader_code_.push_back( + EncodeVectorMaskedOperand(D3D10_SB_OPERAND_TYPE_TEMP, 0b1111, 1)); + shader_code_.push_back(rt_blend_temp); + shader_code_.push_back(EncodeVectorSwizzledOperand( + D3D10_SB_OPERAND_TYPE_CONSTANT_BUFFER, kSwizzleXYZW, 3)); + shader_code_.push_back(cbuffer_index_system_constants_); + shader_code_.push_back(uint32_t(CbufferRegister::kSystemConstants)); + shader_code_.push_back(kSysConst_EDRAMRTFlags_Vec); + shader_code_.push_back(EncodeVectorSwizzledOperand( + D3D10_SB_OPERAND_TYPE_IMMEDIATE32, kSwizzleXYZW, 0)); + shader_code_.push_back(kRTFlag_Blend); + shader_code_.push_back(kRTFlag_Blend); + shader_code_.push_back(kRTFlag_Blend); + shader_code_.push_back(kRTFlag_Blend); + ++stat_.instruction_count; + ++stat_.uint_instruction_count; + for (uint32_t i = 0; i < 4; ++i) { // In case of overlap, the render targets with the lower index have higher // priority since they usually have the most important value. @@ -1795,17 +2103,40 @@ void DxbcShaderTranslator::CompletePixelShader_WriteToROV() { ENCODE_D3D10_SB_TOKENIZED_INSTRUCTION_LENGTH(3)); shader_code_.push_back( EncodeVectorSelectOperand(D3D10_SB_OPERAND_TYPE_TEMP, rt_index, 1)); - shader_code_.push_back(rt_load_blend_temp); + shader_code_.push_back(rt_load_temp); ++stat_.instruction_count; ++stat_.dynamic_flow_control_count; - + uint32_t dest_color_temp = PushSystemTemp(); CompletePixelShader_WriteToROV_LoadColor(edram_coord_temp, rt_index, - system_temp_color_[rt_index]); + dest_color_temp); + // Blend if needed. + shader_code_.push_back(ENCODE_D3D10_SB_OPCODE_TYPE(D3D10_SB_OPCODE_IF) | + ENCODE_D3D10_SB_INSTRUCTION_TEST_BOOLEAN( + D3D10_SB_INSTRUCTION_TEST_NONZERO) | + ENCODE_D3D10_SB_TOKENIZED_INSTRUCTION_LENGTH(3)); + shader_code_.push_back( + EncodeVectorSelectOperand(D3D10_SB_OPERAND_TYPE_TEMP, rt_index, 1)); + shader_code_.push_back(rt_blend_temp); + ++stat_.instruction_count; + ++stat_.dynamic_flow_control_count; + CompletePixelShader_WriteToROV_Blend(rt_index, system_temp_color_[rt_index], + dest_color_temp); shader_code_.push_back(ENCODE_D3D10_SB_OPCODE_TYPE(D3D10_SB_OPCODE_ENDIF) | ENCODE_D3D10_SB_TOKENIZED_INSTRUCTION_LENGTH(1)); ++stat_.instruction_count; + // TODO(Triang3l): Apply the write mask. + + // Release dest_color_temp. + PopSystemTemp(); + shader_code_.push_back(ENCODE_D3D10_SB_OPCODE_TYPE(D3D10_SB_OPCODE_ENDIF) | + ENCODE_D3D10_SB_TOKENIZED_INSTRUCTION_LENGTH(1)); + ++stat_.instruction_count; + + // TODO(Triang3l): Convert to sRGB for k_8_8_8_8_GAMMA. + + // Write the new color, which may have been modified by blending. CompletePixelShader_WriteToROV_StoreColor(edram_coord_temp, rt_index, system_temp_color_[rt_index]); @@ -1815,8 +2146,8 @@ void DxbcShaderTranslator::CompletePixelShader_WriteToROV() { ++stat_.instruction_count; } - // Release rt_used_temp, rt_load_blend_temp and edram_coord_temp. - PopSystemTemp(3); + // Release edram_coord_temp, rt_used_temp, rt_load_temp and rt_blend_temp. + PopSystemTemp(4); } void DxbcShaderTranslator::CompletePixelShader() { @@ -8357,9 +8688,9 @@ const DxbcShaderTranslator::SystemConstantRdef DxbcShaderTranslator:: // vec4 19 {"xe_edram_load_mask_low_rt23", RdefTypeIndex::kUint4, 304, 16}, // vec4 20 - {"xe_edram_blend1", RdefTypeIndex::kUint4, 320, 16}, + {"xe_edram_blend_rt01", RdefTypeIndex::kUint4, 320, 16}, // vec4 21 - {"xe_edram_blend2", RdefTypeIndex::kUint4, 336, 16}, + {"xe_edram_blend_rt23", RdefTypeIndex::kUint4, 336, 16}, // vec4 20 {"xe_edram_blend_constant", RdefTypeIndex::kFloat4, 352, 16}, // vec4 23 diff --git a/src/xenia/gpu/dxbc_shader_translator.h b/src/xenia/gpu/dxbc_shader_translator.h index fa80a5437..f2837c7b8 100644 --- a/src/xenia/gpu/dxbc_shader_translator.h +++ b/src/xenia/gpu/dxbc_shader_translator.h @@ -66,118 +66,119 @@ class DxbcShaderTranslator : public ShaderTranslator { }; enum : uint32_t { - // First blend constant of the render target. + // X/Z of the blend constant for the render target. - kBlend1_Src_SrcColor_Shift = 0, - kBlend1_Src_SrcColor_Pos = 1u << kBlend1_Src_SrcColor_Shift, - kBlend1_Src_SrcColor_Neg = 3u << kBlend1_Src_SrcColor_Shift, - kBlend1_Src_SrcAlpha_Shift = 2, - kBlend1_Src_SrcAlpha_Pos = 1u << kBlend1_Src_SrcAlpha_Shift, - kBlend1_Src_SrcAlpha_Neg = 3u << kBlend1_Src_SrcAlpha_Shift, - kBlend1_Src_DestColor_Shift = 4, - kBlend1_Src_DestColor_Pos = 1u << kBlend1_Src_DestColor_Shift, - kBlend1_Src_DestColor_Neg = 3u << kBlend1_Src_DestColor_Shift, - kBlend1_Src_DestAlpha_Shift = 6, - kBlend1_Src_DestAlpha_Pos = 1u << kBlend1_Src_DestAlpha_Shift, - kBlend1_Src_DestAlpha_Neg = 3u << kBlend1_Src_DestAlpha_Shift, + kBlendX_Src_SrcColor_Shift = 0, + kBlendX_Src_SrcColor_Pos = 1u << kBlendX_Src_SrcColor_Shift, + kBlendX_Src_SrcColor_Neg = 3u << kBlendX_Src_SrcColor_Shift, + kBlendX_Src_SrcAlpha_Shift = 2, + kBlendX_Src_SrcAlpha_Pos = 1u << kBlendX_Src_SrcAlpha_Shift, + kBlendX_Src_SrcAlpha_Neg = 3u << kBlendX_Src_SrcAlpha_Shift, + kBlendX_Src_DestColor_Shift = 4, + kBlendX_Src_DestColor_Pos = 1u << kBlendX_Src_DestColor_Shift, + kBlendX_Src_DestColor_Neg = 3u << kBlendX_Src_DestColor_Shift, + kBlendX_Src_DestAlpha_Shift = 6, + kBlendX_Src_DestAlpha_Pos = 1u << kBlendX_Src_DestAlpha_Shift, + kBlendX_Src_DestAlpha_Neg = 3u << kBlendX_Src_DestAlpha_Shift, // For ONE_MINUS modes, enable both One and the needed factor with _Neg. - kBlend1_Src_One_Shift = 8, - kBlend1_Src_One = 1u << kBlend1_Src_One_Shift, + kBlendX_Src_One_Shift = 8, + kBlendX_Src_One = 1u << kBlendX_Src_One_Shift, - kBlend1_SrcAlpha_SrcAlpha_Shift = 9, - kBlend1_SrcAlpha_SrcAlpha_Pos = 1u << kBlend1_SrcAlpha_SrcAlpha_Shift, - kBlend1_SrcAlpha_SrcAlpha_Neg = 3u << kBlend1_SrcAlpha_SrcAlpha_Shift, - kBlend1_SrcAlpha_DestAlpha_Shift = 11, - kBlend1_SrcAlpha_DestAlpha_Pos = 1u << kBlend1_SrcAlpha_DestAlpha_Shift, - kBlend1_SrcAlpha_DestAlpha_Neg = 3u << kBlend1_SrcAlpha_DestAlpha_Shift, - kBlend1_SrcAlpha_One_Shift = 13, - kBlend1_SrcAlpha_One = 1u << kBlend1_SrcAlpha_One_Shift, + kBlendX_SrcAlpha_SrcAlpha_Shift = 9, + kBlendX_SrcAlpha_SrcAlpha_Pos = 1u << kBlendX_SrcAlpha_SrcAlpha_Shift, + kBlendX_SrcAlpha_SrcAlpha_Neg = 3u << kBlendX_SrcAlpha_SrcAlpha_Shift, + kBlendX_SrcAlpha_DestAlpha_Shift = 11, + kBlendX_SrcAlpha_DestAlpha_Pos = 1u << kBlendX_SrcAlpha_DestAlpha_Shift, + kBlendX_SrcAlpha_DestAlpha_Neg = 3u << kBlendX_SrcAlpha_DestAlpha_Shift, + kBlendX_SrcAlpha_One_Shift = 13, + kBlendX_SrcAlpha_One = 1u << kBlendX_SrcAlpha_One_Shift, - kBlend1_Dest_SrcColor_Shift = 14, - kBlend1_Dest_SrcColor_Pos = 1u << kBlend1_Dest_SrcColor_Shift, - kBlend1_Dest_SrcColor_Neg = 3u << kBlend1_Dest_SrcColor_Shift, - kBlend1_Dest_SrcAlpha_Shift = 16, - kBlend1_Dest_SrcAlpha_Pos = 1u << kBlend1_Dest_SrcAlpha_Shift, - kBlend1_Dest_SrcAlpha_Neg = 3u << kBlend1_Dest_SrcAlpha_Shift, - kBlend1_Dest_DestColor_Shift = 18, - kBlend1_Dest_DestColor_Pos = 1u << kBlend1_Dest_DestColor_Shift, - kBlend1_Dest_DestColor_Neg = 3u << kBlend1_Dest_DestColor_Shift, - kBlend1_Dest_DestAlpha_Shift = 20, - kBlend1_Dest_DestAlpha_Pos = 1u << kBlend1_Dest_DestAlpha_Shift, - kBlend1_Dest_DestAlpha_Neg = 3u << kBlend1_Dest_DestAlpha_Shift, + kBlendX_Dest_SrcColor_Shift = 14, + kBlendX_Dest_SrcColor_Pos = 1u << kBlendX_Dest_SrcColor_Shift, + kBlendX_Dest_SrcColor_Neg = 3u << kBlendX_Dest_SrcColor_Shift, + kBlendX_Dest_SrcAlpha_Shift = 16, + kBlendX_Dest_SrcAlpha_Pos = 1u << kBlendX_Dest_SrcAlpha_Shift, + kBlendX_Dest_SrcAlpha_Neg = 3u << kBlendX_Dest_SrcAlpha_Shift, + kBlendX_Dest_DestColor_Shift = 18, + kBlendX_Dest_DestColor_Pos = 1u << kBlendX_Dest_DestColor_Shift, + kBlendX_Dest_DestColor_Neg = 3u << kBlendX_Dest_DestColor_Shift, + kBlendX_Dest_DestAlpha_Shift = 20, + kBlendX_Dest_DestAlpha_Pos = 1u << kBlendX_Dest_DestAlpha_Shift, + kBlendX_Dest_DestAlpha_Neg = 3u << kBlendX_Dest_DestAlpha_Shift, // For ONE_MINUS modes, enable both One and the needed factor with _Neg. - kBlend1_Dest_One_Shift = 22, - kBlend1_Dest_One = 1u << kBlend1_Dest_One_Shift, + kBlendX_Dest_One_Shift = 22, + kBlendX_Dest_One = 1u << kBlendX_Dest_One_Shift, - kBlend1_DestAlpha_SrcAlpha_Shift = 23, - kBlend1_DestAlpha_SrcAlpha_Pos = 1u << kBlend1_DestAlpha_SrcAlpha_Shift, - kBlend1_DestAlpha_SrcAlpha_Neg = 3u << kBlend1_DestAlpha_SrcAlpha_Shift, - kBlend1_DestAlpha_DestAlpha_Shift = 25, - kBlend1_DestAlpha_DestAlpha_Pos = 1u << kBlend1_DestAlpha_DestAlpha_Shift, - kBlend1_DestAlpha_DestAlpha_Neg = 3u << kBlend1_DestAlpha_DestAlpha_Shift, - kBlend1_DestAlpha_One_Shift = 27, - kBlend1_DestAlpha_One = 1u << kBlend1_DestAlpha_One_Shift, + kBlendX_DestAlpha_SrcAlpha_Shift = 23, + kBlendX_DestAlpha_SrcAlpha_Pos = 1u << kBlendX_DestAlpha_SrcAlpha_Shift, + kBlendX_DestAlpha_SrcAlpha_Neg = 3u << kBlendX_DestAlpha_SrcAlpha_Shift, + kBlendX_DestAlpha_DestAlpha_Shift = 25, + kBlendX_DestAlpha_DestAlpha_Pos = 1u << kBlendX_DestAlpha_DestAlpha_Shift, + kBlendX_DestAlpha_DestAlpha_Neg = 3u << kBlendX_DestAlpha_DestAlpha_Shift, + kBlendX_DestAlpha_One_Shift = 27, + kBlendX_DestAlpha_One = 1u << kBlendX_DestAlpha_One_Shift, - // Second blend constant of the render target. + // Y/W of the blend constant for the render target. - kBlend2_Src_ConstantColor_Shift = 0, - kBlend2_Src_ConstantColor_Pos = 1u << kBlend2_Src_ConstantColor_Shift, - kBlend2_Src_ConstantColor_Neg = 3u << kBlend2_Src_ConstantColor_Shift, - kBlend2_Src_ConstantAlpha_Shift = 2, - kBlend2_Src_ConstantAlpha_Pos = 1u << kBlend2_Src_ConstantAlpha_Shift, - kBlend2_Src_ConstantAlpha_Neg = 3u << kBlend2_Src_ConstantAlpha_Shift, + kBlendY_Src_ConstantColor_Shift = 0, + kBlendY_Src_ConstantColor_Pos = 1u << kBlendY_Src_ConstantColor_Shift, + kBlendY_Src_ConstantColor_Neg = 3u << kBlendY_Src_ConstantColor_Shift, + kBlendY_Src_ConstantAlpha_Shift = 2, + kBlendY_Src_ConstantAlpha_Pos = 1u << kBlendY_Src_ConstantAlpha_Shift, + kBlendY_Src_ConstantAlpha_Neg = 3u << kBlendY_Src_ConstantAlpha_Shift, - kBlend2_SrcAlpha_ConstantAlpha_Shift = 4, - kBlend2_SrcAlpha_ConstantAlpha_Pos = - 1u << kBlend2_SrcAlpha_ConstantAlpha_Shift, - kBlend2_SrcAlpha_ConstantAlpha_Neg = - 3u << kBlend2_SrcAlpha_ConstantAlpha_Shift, + kBlendY_SrcAlpha_ConstantAlpha_Shift = 4, + kBlendY_SrcAlpha_ConstantAlpha_Pos = + 1u << kBlendY_SrcAlpha_ConstantAlpha_Shift, + kBlendY_SrcAlpha_ConstantAlpha_Neg = + 3u << kBlendY_SrcAlpha_ConstantAlpha_Shift, - kBlend2_Dest_ConstantColor_Shift = 6, - kBlend2_Dest_ConstantColor_Pos = 1u << kBlend2_Dest_ConstantColor_Shift, - kBlend2_Dest_ConstantColor_Neg = 3u << kBlend2_Dest_ConstantColor_Shift, - kBlend2_Dest_ConstantAlpha_Shift = 8, - kBlend2_Dest_ConstantAlpha_Pos = 1u << kBlend2_Dest_ConstantAlpha_Shift, - kBlend2_Dest_ConstantAlpha_Neg = 3u << kBlend2_Dest_ConstantAlpha_Shift, + kBlendY_Dest_ConstantColor_Shift = 6, + kBlendY_Dest_ConstantColor_Pos = 1u << kBlendY_Dest_ConstantColor_Shift, + kBlendY_Dest_ConstantColor_Neg = 3u << kBlendY_Dest_ConstantColor_Shift, + kBlendY_Dest_ConstantAlpha_Shift = 8, + kBlendY_Dest_ConstantAlpha_Pos = 1u << kBlendY_Dest_ConstantAlpha_Shift, + kBlendY_Dest_ConstantAlpha_Neg = 3u << kBlendY_Dest_ConstantAlpha_Shift, - kBlend2_DestAlpha_ConstantAlpha_Shift = 10, - kBlend2_DestAlpha_ConstantAlpha_Pos = - 1u << kBlend2_DestAlpha_ConstantAlpha_Shift, - kBlend2_DestAlpha_ConstantAlpha_Neg = - 3u << kBlend2_DestAlpha_ConstantAlpha_Shift, + kBlendY_DestAlpha_ConstantAlpha_Shift = 10, + kBlendY_DestAlpha_ConstantAlpha_Pos = + 1u << kBlendY_DestAlpha_ConstantAlpha_Shift, + kBlendY_DestAlpha_ConstantAlpha_Neg = + 3u << kBlendY_DestAlpha_ConstantAlpha_Shift, - kBlend2_Src_AlphaSaturate_Shift = 12, - kBlend2_Src_AlphaSaturate = 1u << kBlend2_Src_AlphaSaturate_Shift, - kBlend2_SrcAlpha_AlphaSaturate_Shift = 13, - kBlend2_SrcAlpha_AlphaSaturate = 1u << kBlend2_SrcAlpha_AlphaSaturate_Shift, - kBlend2_Dest_AlphaSaturate_Shift = 14, - kBlend2_Dest_AlphaSaturate = 1u << kBlend2_Dest_AlphaSaturate_Shift, - kBlend2_DestAlpha_AlphaSaturate_Shift = 15, - kBlend2_DestAlpha_AlphaSaturate = 1u - << kBlend2_DestAlpha_AlphaSaturate_Shift, + kBlendY_Src_AlphaSaturate_Shift = 12, + kBlendY_Src_AlphaSaturate = 1u << kBlendY_Src_AlphaSaturate_Shift, + kBlendY_SrcAlpha_AlphaSaturate_Shift = 13, + kBlendY_SrcAlpha_AlphaSaturate = 1u << kBlendY_SrcAlpha_AlphaSaturate_Shift, + kBlendY_Dest_AlphaSaturate_Shift = 14, + kBlendY_Dest_AlphaSaturate = 1u << kBlendY_Dest_AlphaSaturate_Shift, + kBlendY_DestAlpha_AlphaSaturate_Shift = 15, + kBlendY_DestAlpha_AlphaSaturate = 1u + << kBlendY_DestAlpha_AlphaSaturate_Shift, - // For addition/subtraction/inverse subtraction. - kBlend2_Src_OpSign_Shift = 16, - kBlend2_Src_OpSign_Pos = 1u << kBlend2_Src_OpSign_Shift, - kBlend2_Src_OpSign_Neg = 3u << kBlend2_Src_OpSign_Shift, - kBlend2_SrcAlpha_OpSign_Shift = 18, - kBlend2_SrcAlpha_OpSign_Pos = 1u << kBlend2_SrcAlpha_OpSign_Shift, - kBlend2_SrcAlpha_OpSign_Neg = 3u << kBlend2_SrcAlpha_OpSign_Shift, - kBlend2_Dest_OpSign_Shift = 20, - kBlend2_Dest_OpSign_Pos = 1u << kBlend2_Dest_OpSign_Shift, - kBlend2_Dest_OpSign_Neg = 3u << kBlend2_Dest_OpSign_Shift, - kBlend2_DestAlpha_OpSign_Shift = 22, - kBlend2_DestAlpha_OpSign_Pos = 1u << kBlend2_DestAlpha_OpSign_Shift, - kBlend2_DestAlpha_OpSign_Neg = 3u << kBlend2_DestAlpha_OpSign_Shift, + // For addition/subtraction/inverse subtraction, but must be positive for + // min/max. + kBlendY_Src_OpSign_Shift = 16, + kBlendY_Src_OpSign_Pos = 1u << kBlendY_Src_OpSign_Shift, + kBlendY_Src_OpSign_Neg = 3u << kBlendY_Src_OpSign_Shift, + kBlendY_SrcAlpha_OpSign_Shift = 18, + kBlendY_SrcAlpha_OpSign_Pos = 1u << kBlendY_SrcAlpha_OpSign_Shift, + kBlendY_SrcAlpha_OpSign_Neg = 3u << kBlendY_SrcAlpha_OpSign_Shift, + kBlendY_Dest_OpSign_Shift = 20, + kBlendY_Dest_OpSign_Pos = 1u << kBlendY_Dest_OpSign_Shift, + kBlendY_Dest_OpSign_Neg = 3u << kBlendY_Dest_OpSign_Shift, + kBlendY_DestAlpha_OpSign_Shift = 22, + kBlendY_DestAlpha_OpSign_Pos = 1u << kBlendY_DestAlpha_OpSign_Shift, + kBlendY_DestAlpha_OpSign_Neg = 3u << kBlendY_DestAlpha_OpSign_Shift, - kBlend2_Color_OpMin_Shift = 24, - kBlend2_Color_OpMin = 1u << kBlend2_Color_OpMin_Shift, - kBlend2_Color_OpMax_Shift = 25, - kBlend2_Color_OpMax = 1u << kBlend2_Color_OpMax_Shift, - kBlend2_Alpha_OpMin_Shift = 26, - kBlend2_Alpha_OpMin = 1u << kBlend2_Alpha_OpMin_Shift, - kBlend2_Alpha_OpMax_Shift = 27, - kBlend2_Alpha_OpMax = 1u << kBlend2_Alpha_OpMax_Shift, + kBlendY_Color_OpMin_Shift = 24, + kBlendY_Color_OpMin = 1u << kBlendY_Color_OpMin_Shift, + kBlendY_Color_OpMax_Shift = 25, + kBlendY_Color_OpMax = 1u << kBlendY_Color_OpMax_Shift, + kBlendY_Alpha_OpMin_Shift = 26, + kBlendY_Alpha_OpMin = 1u << kBlendY_Alpha_OpMin_Shift, + kBlendY_Alpha_OpMax_Shift = 27, + kBlendY_Alpha_OpMax = 1u << kBlendY_Alpha_OpMax_Shift, }; // IF SYSTEM CONSTANTS ARE CHANGED OR ADDED, THE FOLLOWING MUST BE UPDATED: @@ -245,13 +246,9 @@ class DxbcShaderTranslator : public ShaderTranslator { // signed. uint32_t edram_load_mask_rt01_rt23[2][4]; - // vec4 20 - // First part of the blending options. - uint32_t edram_blend1[4]; - - // vec4 21 - // Second part of the blending options. - uint32_t edram_blend2[4]; + // vec4 20:21 + // Render target blending options. + uint32_t edram_blend_rt01_rt23[2][4]; // vec4 22 // The constant blend factor for the respective modes. @@ -320,8 +317,8 @@ class DxbcShaderTranslator : public ShaderTranslator { } // Returns whether blending should be done at all (not 1 * src + 0 * dest). - static bool GetBlendConstants(uint32_t blend_control, uint32_t& blend1_out, - uint32_t& blend2_out); + static bool GetBlendConstants(uint32_t blend_control, uint32_t& blend_x_out, + uint32_t& blend_y_out); protected: void Reset() override; @@ -453,14 +450,14 @@ class DxbcShaderTranslator : public ShaderTranslator { kSysConst_EDRAMLoadMaskRT23_Index = kSysConst_EDRAMLoadMaskRT01_Index + 1, kSysConst_EDRAMLoadMaskRT23_Vec = kSysConst_EDRAMLoadMaskRT01_Vec + 1, - kSysConst_EDRAMBlend1_Index = kSysConst_EDRAMLoadMaskRT23_Index + 1, - kSysConst_EDRAMBlend1_Vec = kSysConst_EDRAMLoadMaskRT23_Vec + 1, + kSysConst_EDRAMBlendRT01_Index = kSysConst_EDRAMLoadMaskRT23_Index + 1, + kSysConst_EDRAMBlendRT01_Vec = kSysConst_EDRAMLoadMaskRT23_Vec + 1, - kSysConst_EDRAMBlend2_Index = kSysConst_EDRAMBlend1_Index + 1, - kSysConst_EDRAMBlend2_Vec = kSysConst_EDRAMBlend1_Vec + 1, + kSysConst_EDRAMBlendRT23_Index = kSysConst_EDRAMBlendRT01_Index + 1, + kSysConst_EDRAMBlendRT23_Vec = kSysConst_EDRAMBlendRT01_Vec + 1, - kSysConst_EDRAMBlendConstant_Index = kSysConst_EDRAMBlend2_Index + 1, - kSysConst_EDRAMBlendConstant_Vec = kSysConst_EDRAMBlend2_Vec + 1, + kSysConst_EDRAMBlendConstant_Index = kSysConst_EDRAMBlendRT23_Index + 1, + kSysConst_EDRAMBlendConstant_Vec = kSysConst_EDRAMBlendRT23_Vec + 1, kSysConst_EDRAMStoreMinRT01_Index = kSysConst_EDRAMBlendConstant_Index + 1, kSysConst_EDRAMStoreMinRT01_Vec = kSysConst_EDRAMBlendConstant_Vec + 1, @@ -582,7 +579,21 @@ class DxbcShaderTranslator : public ShaderTranslator { void CompletePixelShader_WriteToRTVs(); void CompletePixelShader_WriteToROV_LoadColor( uint32_t edram_dword_offset_temp, uint32_t rt_index, - uint32_t target_index); + uint32_t target_temp); + void CompletePixelShader_WriteToROV_Blend(uint32_t rt_index, + uint32_t src_color_and_output_temp, + uint32_t dest_color_temp); + // Extracts 0.0 or plus/minus 1.0 from a blend constant. For example, it can + // be used to extract one scale for color and alpha into XY, and another scale + // for color and alpha into ZW. constant_swizzle is a bit mask indicating + // which part of the blend constant for the render target to extract the scale + // from, 0b00000000 for X/Z only, 0b01010101 for Y/W only, 0b00000001 for X/Z + // in the first component, Y/W in the rest (XY changed to ZW automatically + // according to the render target index - don't set the higher bit). + void CompletePixelShader_WriteToROV_ExtractBlendScales( + uint32_t rt_index, uint32_t constant_swizzle, bool is_signed, + uint32_t shift_x, uint32_t shift_y, uint32_t shift_z, uint32_t shift_w, + uint32_t target_temp, uint32_t write_mask = 0b1111); void CompletePixelShader_WriteToROV_StoreColor( uint32_t edram_dword_offset_temp, uint32_t rt_index, uint32_t source_and_scratch_temp);