mirror of
https://github.com/libretro/parallel-gx1.git
synced 2026-11-07 04:26:01 -10:00
Both fed user-written GLSL to the backends at runtime, which the move to bytecode emitted straight from the shader generators leaves no compiler for. The frontend's own shader pipeline covers post-processing. The presentation pass keeps a plain copy and the built-in correction shader for output resampling, colour space and gamma correction and HDR scaling, now compiled in rather than loaded from Sys/Shaders. The graphics-mod system keeps its draw, EFB, projection and texture actions; custom pipelines, materials, shader, mesh and sampler assets, the custom constant buffers in every backend and the two mods built on them are gone, along with the shader generators' custom-shader hooks.
54 lines
1.9 KiB
C++
54 lines
1.9 KiB
C++
// Copyright 2019 Dolphin Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <memory>
|
|
|
|
#include "VideoBackends/D3D12/D3D12StreamBuffer.h"
|
|
#include "VideoBackends/D3D12/DescriptorHeapManager.h"
|
|
#include "VideoCommon/VertexManagerBase.h"
|
|
|
|
namespace DX12
|
|
{
|
|
class VertexManager final : public VertexManagerBase
|
|
{
|
|
public:
|
|
VertexManager();
|
|
~VertexManager() override;
|
|
|
|
bool Initialize() override;
|
|
|
|
void UploadUtilityUniforms(const void* uniforms, u32 uniforms_size) override;
|
|
bool UploadTexelBuffer(const void* data, u32 data_size, TexelBufferFormat format,
|
|
u32* out_offset) override;
|
|
bool UploadTexelBuffer(const void* data, u32 data_size, TexelBufferFormat format, u32* out_offset,
|
|
const void* palette_data, u32 palette_size,
|
|
TexelBufferFormat palette_format, u32* out_palette_offset) override;
|
|
|
|
protected:
|
|
void ResetBuffer(u32 vertex_stride) override;
|
|
void CommitBuffer(u32 num_vertices, u32 vertex_stride, u32 num_indices, u32* out_base_vertex,
|
|
u32* out_base_index) override;
|
|
void UploadUniforms() override;
|
|
|
|
void UpdateVertexShaderConstants();
|
|
void UpdateGeometryShaderConstants();
|
|
void UpdatePixelShaderConstants();
|
|
|
|
// Allocates storage in the uniform buffer of the specified size. If this storage cannot be
|
|
// allocated immediately, the current command buffer will be submitted and all stage's
|
|
// constants will be re-uploaded. false will be returned in this case, otherwise true.
|
|
bool ReserveConstantStorage();
|
|
void UploadAllConstants();
|
|
|
|
StreamBuffer m_vertex_stream_buffer;
|
|
StreamBuffer m_index_stream_buffer;
|
|
StreamBuffer m_uniform_stream_buffer;
|
|
StreamBuffer m_texel_stream_buffer;
|
|
std::array<DescriptorHandle, NUM_TEXEL_BUFFER_FORMATS> m_texel_buffer_views = {};
|
|
DescriptorHandle m_vertex_srv = {};
|
|
};
|
|
|
|
} // namespace DX12
|