VideoCommon: refactor drawing into its own function

This commit is contained in:
iwubcode
2024-01-27 14:21:42 -06:00
parent e740e32562
commit c34b3ae390
2 changed files with 144 additions and 97 deletions

View File

@ -15,9 +15,12 @@
#include "VideoCommon/ShaderCache.h"
#include "VideoCommon/VideoEvents.h"
struct CustomPixelShaderContents;
class CustomShaderCache;
class DataReader;
class GeometryShaderManager;
class NativeVertexFormat;
class PixelShaderManager;
class PointerWrap;
struct PortableVertexDeclaration;
@ -218,9 +221,20 @@ private:
// Minimum number of draws per command buffer when attempting to preempt a readback operation.
static constexpr u32 MINIMUM_DRAW_CALLS_PER_COMMAND_BUFFER_FOR_READBACK = 10;
void RenderDrawCall(PixelShaderManager& pixel_shader_manager,
GeometryShaderManager& geometry_shader_manager,
const CustomPixelShaderContents& custom_pixel_shader_contents,
std::span<u8> custom_pixel_shader_uniforms, PrimitiveType primitive_type,
const AbstractPipeline* current_pipeline);
void UpdatePipelineConfig();
void UpdatePipelineObject();
const AbstractPipeline*
GetCustomPipeline(const CustomPixelShaderContents& custom_pixel_shader_contents,
const VideoCommon::GXPipelineUid& current_pipeline_config,
const VideoCommon::GXUberPipelineUid& current_uber_pipeline_confi,
const AbstractPipeline* current_pipeline) const;
bool m_is_flushed = true;
FlushStatistics m_flush_statistics = {};