mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
VideoCommon: Add separate pipeline usage for UberShaders
This commit is contained in:
@ -20,6 +20,8 @@ class NativeVertexFormat;
|
||||
// - Per-stage UBO (VS/GS/PS, VS constants accessible from PS)
|
||||
// - 8 combined image samplers (accessible from PS)
|
||||
// - 1 SSBO, accessible from PS if bounding box is enabled
|
||||
// - GX Uber
|
||||
// - Same as GX, plus one VS SSBO for vertices if dynamic vertex loading is enabled
|
||||
// - Utility
|
||||
// - Single UBO, accessible from all stages [set=0, binding=1]
|
||||
// - 8 combined image samplers (accessible from PS) [set=1, binding=0-7]
|
||||
@ -32,6 +34,7 @@ class NativeVertexFormat;
|
||||
enum class AbstractPipelineUsage
|
||||
{
|
||||
GX,
|
||||
GXUber,
|
||||
Utility
|
||||
};
|
||||
|
||||
|
@ -588,10 +588,10 @@ AbstractPipelineConfig ShaderCache::GetGXPipelineConfig(
|
||||
const NativeVertexFormat* vertex_format, const AbstractShader* vertex_shader,
|
||||
const AbstractShader* geometry_shader, const AbstractShader* pixel_shader,
|
||||
const RasterizationState& rasterization_state, const DepthState& depth_state,
|
||||
const BlendingState& blending_state)
|
||||
const BlendingState& blending_state, AbstractPipelineUsage usage)
|
||||
{
|
||||
AbstractPipelineConfig config = {};
|
||||
config.usage = AbstractPipelineUsage::GX;
|
||||
config.usage = usage;
|
||||
config.vertex_format = vertex_format;
|
||||
config.vertex_shader = vertex_shader;
|
||||
config.geometry_shader = geometry_shader;
|
||||
@ -735,7 +735,7 @@ ShaderCache::GetGXPipelineConfig(const GXPipelineUid& config_in)
|
||||
}
|
||||
|
||||
return GetGXPipelineConfig(config.vertex_format, vs, gs, ps, config.rasterization_state,
|
||||
config.depth_state, config.blending_state);
|
||||
config.depth_state, config.blending_state, AbstractPipelineUsage::GX);
|
||||
}
|
||||
|
||||
/// Edits the UID based on driver bugs and other special configurations
|
||||
@ -800,7 +800,8 @@ ShaderCache::GetGXPipelineConfig(const GXUberPipelineUid& config_in)
|
||||
}
|
||||
|
||||
return GetGXPipelineConfig(config.vertex_format, vs, gs, ps, config.rasterization_state,
|
||||
config.depth_state, config.blending_state);
|
||||
config.depth_state, config.blending_state,
|
||||
AbstractPipelineUsage::GXUber);
|
||||
}
|
||||
|
||||
const AbstractPipeline* ShaderCache::InsertGXPipeline(const GXPipelineUid& config,
|
||||
|
@ -151,7 +151,7 @@ private:
|
||||
GetGXPipelineConfig(const NativeVertexFormat* vertex_format, const AbstractShader* vertex_shader,
|
||||
const AbstractShader* geometry_shader, const AbstractShader* pixel_shader,
|
||||
const RasterizationState& rasterization_state, const DepthState& depth_state,
|
||||
const BlendingState& blending_state);
|
||||
const BlendingState& blending_state, AbstractPipelineUsage usage);
|
||||
std::optional<AbstractPipelineConfig> GetGXPipelineConfig(const GXPipelineUid& uid);
|
||||
std::optional<AbstractPipelineConfig> GetGXPipelineConfig(const GXUberPipelineUid& uid);
|
||||
const AbstractPipeline* InsertGXPipeline(const GXPipelineUid& config,
|
||||
|
Reference in New Issue
Block a user