GPU/HW: Track dirty area of VRAM shadow texture via drawing area

This commit is contained in:
Connor McLaughlin
2019-11-05 19:19:49 +10:00
parent 65197d4350
commit afbec85f89
9 changed files with 95 additions and 117 deletions

View File

@ -102,12 +102,10 @@ protected:
static_cast<float>(rgba >> 24) * (1.0f / 255.0f));
}
virtual void UpdateDrawingOffset() override;
virtual void InvalidateVRAMReadCache() = 0;
virtual void MapBatchVertexPointer(u32 required_vertices) = 0;
void InvalidateVRAMReadTexture() { m_vram_read_texture_dirty = true; }
u32 GetBatchVertexSpace() const { return static_cast<u32>(m_batch_end_vertex_ptr - m_batch_current_vertex_ptr); }
u32 GetBatchVertexCount() const { return static_cast<u32>(m_batch_current_vertex_ptr - m_batch_start_vertex_ptr); }
@ -135,6 +133,10 @@ protected:
BatchUBOData m_batch_ubo_data = {};
bool m_batch_ubo_dirty = true;
// Bounding box of VRAM area that the GPU has drawn into.
Common::Rectangle<u32> m_vram_dirty_rect;
bool m_vram_read_texture_dirty = false;
private:
static BatchPrimitive GetPrimitiveForCommand(RenderCommand rc);