mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-20 10:56:58 +02:00
format source files
This commit is contained in:
@@ -9,9 +9,9 @@
|
||||
#include "common/magicEnum.h"
|
||||
#include "common/profiler.h"
|
||||
#include "common/stringUtils.h"
|
||||
#include "graphics/guest_gpu/gpu_defs.h"
|
||||
#include "graphics/guest_gpu/graphicsRun.h"
|
||||
#include "graphics/guest_gpu/hardwareContext.h"
|
||||
#include "graphics/guest_gpu/gpu_defs.h"
|
||||
#include "graphics/shader/recompiler/ShaderDecoder.h"
|
||||
#include "graphics/shader/recompiler/ShaderRecompiler.h"
|
||||
#include "graphics/shader/shaderVertexMetadata.h"
|
||||
@@ -562,14 +562,18 @@ static uint32_t VertexAttribFormatToBufferFormat(uint32_t format) {
|
||||
{Prospero::VertexAttribFormat::k10_11_11Float, Prospero::BufferFormat::k10_11_11Float},
|
||||
{Prospero::VertexAttribFormat::k2_10_10_10UNorm, Prospero::BufferFormat::k2_10_10_10UNorm},
|
||||
{Prospero::VertexAttribFormat::k2_10_10_10SNorm, Prospero::BufferFormat::k2_10_10_10SNorm},
|
||||
{Prospero::VertexAttribFormat::k2_10_10_10UScaled, Prospero::BufferFormat::k2_10_10_10UScaled},
|
||||
{Prospero::VertexAttribFormat::k2_10_10_10SScaled, Prospero::BufferFormat::k2_10_10_10SScaled},
|
||||
{Prospero::VertexAttribFormat::k2_10_10_10UScaled,
|
||||
Prospero::BufferFormat::k2_10_10_10UScaled},
|
||||
{Prospero::VertexAttribFormat::k2_10_10_10SScaled,
|
||||
Prospero::BufferFormat::k2_10_10_10SScaled},
|
||||
{Prospero::VertexAttribFormat::k2_10_10_10UInt, Prospero::BufferFormat::k2_10_10_10UInt},
|
||||
{Prospero::VertexAttribFormat::k2_10_10_10SInt, Prospero::BufferFormat::k2_10_10_10SInt},
|
||||
{Prospero::VertexAttribFormat::k10_10_10_2UNorm, Prospero::BufferFormat::k10_10_10_2UNorm},
|
||||
{Prospero::VertexAttribFormat::k10_10_10_2SNorm, Prospero::BufferFormat::k10_10_10_2SNorm},
|
||||
{Prospero::VertexAttribFormat::k10_10_10_2UScaled, Prospero::BufferFormat::k10_10_10_2UScaled},
|
||||
{Prospero::VertexAttribFormat::k10_10_10_2SScaled, Prospero::BufferFormat::k10_10_10_2SScaled},
|
||||
{Prospero::VertexAttribFormat::k10_10_10_2UScaled,
|
||||
Prospero::BufferFormat::k10_10_10_2UScaled},
|
||||
{Prospero::VertexAttribFormat::k10_10_10_2SScaled,
|
||||
Prospero::BufferFormat::k10_10_10_2SScaled},
|
||||
{Prospero::VertexAttribFormat::k10_10_10_2UInt, Prospero::BufferFormat::k10_10_10_2UInt},
|
||||
{Prospero::VertexAttribFormat::k10_10_10_2SInt, Prospero::BufferFormat::k10_10_10_2SInt},
|
||||
{Prospero::VertexAttribFormat::k8_8_8_8UNorm, Prospero::BufferFormat::k8_8_8_8UNorm},
|
||||
@@ -581,19 +585,25 @@ static uint32_t VertexAttribFormatToBufferFormat(uint32_t format) {
|
||||
{Prospero::VertexAttribFormat::k32_32UInt, Prospero::BufferFormat::k32_32UInt},
|
||||
{Prospero::VertexAttribFormat::k32_32SInt, Prospero::BufferFormat::k32_32SInt},
|
||||
{Prospero::VertexAttribFormat::k32_32Float, Prospero::BufferFormat::k32_32Float},
|
||||
{Prospero::VertexAttribFormat::k16_16_16_16UNorm, Prospero::BufferFormat::k16_16_16_16UNorm},
|
||||
{Prospero::VertexAttribFormat::k16_16_16_16SNorm, Prospero::BufferFormat::k16_16_16_16SNorm},
|
||||
{Prospero::VertexAttribFormat::k16_16_16_16UScaled, Prospero::BufferFormat::k16_16_16_16UScaled},
|
||||
{Prospero::VertexAttribFormat::k16_16_16_16SScaled, Prospero::BufferFormat::k16_16_16_16SScaled},
|
||||
{Prospero::VertexAttribFormat::k16_16_16_16UNorm,
|
||||
Prospero::BufferFormat::k16_16_16_16UNorm},
|
||||
{Prospero::VertexAttribFormat::k16_16_16_16SNorm,
|
||||
Prospero::BufferFormat::k16_16_16_16SNorm},
|
||||
{Prospero::VertexAttribFormat::k16_16_16_16UScaled,
|
||||
Prospero::BufferFormat::k16_16_16_16UScaled},
|
||||
{Prospero::VertexAttribFormat::k16_16_16_16SScaled,
|
||||
Prospero::BufferFormat::k16_16_16_16SScaled},
|
||||
{Prospero::VertexAttribFormat::k16_16_16_16UInt, Prospero::BufferFormat::k16_16_16_16UInt},
|
||||
{Prospero::VertexAttribFormat::k16_16_16_16SInt, Prospero::BufferFormat::k16_16_16_16SInt},
|
||||
{Prospero::VertexAttribFormat::k16_16_16_16Float, Prospero::BufferFormat::k16_16_16_16Float},
|
||||
{Prospero::VertexAttribFormat::k16_16_16_16Float,
|
||||
Prospero::BufferFormat::k16_16_16_16Float},
|
||||
{Prospero::VertexAttribFormat::k32_32_32UInt, Prospero::BufferFormat::k32_32_32UInt},
|
||||
{Prospero::VertexAttribFormat::k32_32_32SInt, Prospero::BufferFormat::k32_32_32SInt},
|
||||
{Prospero::VertexAttribFormat::k32_32_32Float, Prospero::BufferFormat::k32_32_32Float},
|
||||
{Prospero::VertexAttribFormat::k32_32_32_32UInt, Prospero::BufferFormat::k32_32_32_32UInt},
|
||||
{Prospero::VertexAttribFormat::k32_32_32_32SInt, Prospero::BufferFormat::k32_32_32_32SInt},
|
||||
{Prospero::VertexAttribFormat::k32_32_32_32Float, Prospero::BufferFormat::k32_32_32_32Float},
|
||||
{Prospero::VertexAttribFormat::k32_32_32_32Float,
|
||||
Prospero::BufferFormat::k32_32_32_32Float},
|
||||
};
|
||||
|
||||
for (const auto& entry: format_map) {
|
||||
@@ -793,9 +803,9 @@ static bool ShaderGetStaticInputInfoVS(const HW::VertexShaderInfo* regs,
|
||||
|
||||
static void ShaderGetStaticInputInfoPS(
|
||||
const HW::PixelShaderInfo* regs, const HW::ShaderRegisters* sh,
|
||||
const ShaderVertexInputInfo* vs_info,
|
||||
const ShaderVertexInputInfo* vs_info,
|
||||
std::span<const Prospero::ColorComponentMapping, 8> target_export_mapping,
|
||||
ShaderPixelInputInfo* ps_info) {
|
||||
ShaderPixelInputInfo* ps_info) {
|
||||
KYTY_PROFILER_FUNCTION();
|
||||
|
||||
EXIT_IF(vs_info == nullptr);
|
||||
@@ -834,10 +844,10 @@ static void ShaderGetStaticInputInfoPS(
|
||||
: 0;
|
||||
|
||||
for (int i = 0; i < 8; i++) {
|
||||
ps_info->target_output_mode[i] = sh->target_output_mode[i];
|
||||
ps_info->target_export_mapping[i] =
|
||||
sh->target_output_mode[i] != 0 ? target_export_mapping[i]
|
||||
: Prospero::ColorComponentMapping {};
|
||||
ps_info->target_output_mode[i] = sh->target_output_mode[i];
|
||||
ps_info->target_export_mapping[i] = sh->target_output_mode[i] != 0
|
||||
? target_export_mapping[i]
|
||||
: Prospero::ColorComponentMapping {};
|
||||
}
|
||||
ps_info->mrt_output_mask = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user