mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-21 11:26:56 +02:00
graphics: simplify pipeline keys
This commit is contained in:
@@ -655,8 +655,11 @@ PipelineCache::Pipeline& PipelineCache::CreateGraphicsPipeline(
|
|||||||
const auto vs_id = vertex_program.id;
|
const auto vs_id = vertex_program.id;
|
||||||
const auto ps_id = ps_active ? pixel_program.id : 0;
|
const auto ps_id = ps_active ? pixel_program.id : 0;
|
||||||
|
|
||||||
PipelineStaticParameters static_params {};
|
GraphicsPipelineKey key {};
|
||||||
PipelineRenderingState rendering {};
|
key.vs_shader_id = vs_id;
|
||||||
|
key.ps_shader_id = ps_id;
|
||||||
|
auto& static_params = key.static_params;
|
||||||
|
auto& rendering = key.rendering;
|
||||||
rendering.color_count = color_count;
|
rendering.color_count = color_count;
|
||||||
uint32_t attachment_samples = 0;
|
uint32_t attachment_samples = 0;
|
||||||
for (uint32_t i = 0; i < color_count; i++) {
|
for (uint32_t i = 0; i < color_count; i++) {
|
||||||
@@ -741,11 +744,6 @@ PipelineCache::Pipeline& PipelineCache::CreateGraphicsPipeline(
|
|||||||
static_params.blend_enable[i] = bc.enable;
|
static_params.blend_enable[i] = bc.enable;
|
||||||
static_params.blend_bypass[i] = rt.info.blend_bypass;
|
static_params.blend_bypass[i] = rt.info.blend_bypass;
|
||||||
}
|
}
|
||||||
GraphicsPipelineKey key {};
|
|
||||||
key.rendering = rendering;
|
|
||||||
key.vs_shader_id = vs_id;
|
|
||||||
key.ps_shader_id = ps_id;
|
|
||||||
key.static_params = static_params;
|
|
||||||
if (vs_input_info.stage.program->stage != ShaderType::Mesh) {
|
if (vs_input_info.stage.program->stage != ShaderType::Mesh) {
|
||||||
EXIT_IF(vs_input_info.buffers_num < 0 ||
|
EXIT_IF(vs_input_info.buffers_num < 0 ||
|
||||||
vs_input_info.buffers_num > ShaderVertexInputInfo::RES_MAX ||
|
vs_input_info.buffers_num > ShaderVertexInputInfo::RES_MAX ||
|
||||||
|
|||||||
Reference in New Issue
Block a user