mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-31 01:59:52 -06:00
Use main buffers for utility draws
This commit is contained in:
@ -30,10 +30,6 @@ public:
|
||||
static bool CreateInstance();
|
||||
static void DestroyInstance();
|
||||
|
||||
const std::array<VkDescriptorImageInfo, NUM_PIXEL_SHADER_SAMPLERS>& GetPSSamplerBindings() const
|
||||
{
|
||||
return m_bindings.ps_samplers;
|
||||
}
|
||||
VkFramebuffer GetFramebuffer() const { return m_framebuffer; }
|
||||
const VKPipeline* GetPipeline() const { return m_pipeline; }
|
||||
void SetVertexBuffer(VkBuffer buffer, VkDeviceSize offset);
|
||||
@ -47,6 +43,9 @@ public:
|
||||
void UpdateGeometryShaderConstants();
|
||||
void UpdatePixelShaderConstants();
|
||||
|
||||
// Updates constants from external data, e.g. utility draws.
|
||||
void UpdateConstants(const void* data, u32 data_size);
|
||||
|
||||
void SetTexture(size_t index, VkImageView view);
|
||||
void SetSampler(size_t index, VkSampler sampler);
|
||||
|
||||
@ -104,7 +103,8 @@ private:
|
||||
// Number of descriptor sets for game draws.
|
||||
enum
|
||||
{
|
||||
NUM_GX_DRAW_DESCRIPTOR_SETS = DESCRIPTOR_SET_BIND_POINT_STORAGE_OR_TEXEL_BUFFER + 1
|
||||
NUM_GX_DRAW_DESCRIPTOR_SETS = DESCRIPTOR_SET_BIND_POINT_STORAGE_OR_TEXEL_BUFFER + 1,
|
||||
NUM_UTILITY_DRAW_DESCRIPTOR_SETS = 2
|
||||
};
|
||||
|
||||
enum DITRY_FLAG : u32
|
||||
@ -133,6 +133,8 @@ private:
|
||||
bool IsViewportWithinRenderArea() const;
|
||||
|
||||
bool UpdateDescriptorSet();
|
||||
bool UpdateGXDescriptorSet();
|
||||
bool UpdateUtilityDescriptorSet();
|
||||
|
||||
// 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
|
||||
@ -167,6 +169,7 @@ private:
|
||||
} m_bindings;
|
||||
size_t m_uniform_buffer_reserve_size = 0;
|
||||
u32 m_num_active_descriptor_sets = 0;
|
||||
u32 m_num_dynamic_offsets = 0;
|
||||
|
||||
// rasterization
|
||||
VkViewport m_viewport = {0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f};
|
||||
|
Reference in New Issue
Block a user