Core: Add Vulkan GPU renderer

This commit is contained in:
Connor McLaughlin
2020-06-19 00:18:17 +10:00
parent 3cd5b7ae74
commit 49d11988bf
15 changed files with 1460 additions and 42 deletions

View File

@ -14,9 +14,7 @@ public:
enum class BatchPrimitive : u8
{
Lines = 0,
LineStrip = 1,
Triangles = 2,
TriangleStrip = 3
Triangles = 1
};
enum class BatchRenderMode : u8
@ -119,6 +117,12 @@ protected:
u32 u_set_mask_while_drawing;
};
struct VRAMFillUBOData
{
float u_fill_color[4];
u32 u_interlaced_displayed_field;
};
struct VRAMWriteUBOData
{
u32 u_base_coords[2];
@ -230,6 +234,9 @@ protected:
/// Returns true if the VRAM copy shader should be used (oversized copies, masking).
bool UseVRAMCopyShader(u32 src_x, u32 src_y, u32 dst_x, u32 dst_y, u32 width, u32 height) const;
VRAMFillUBOData GetVRAMFillUBOData(u32 x, u32 y, u32 width, u32 height, u32 color) const;
VRAMCopyUBOData GetVRAMCopyUBOData(u32 src_x, u32 src_y, u32 dst_x, u32 dst_y, u32 width, u32 height) const;
/// Handles quads with flipped texture coordinate directions.
static void HandleFlippedQuadTextureCoordinates(BatchVertex* vertices);