Renderer: Move cull mode to a rasterization state object

Also moves logic for primitive handling to VideoCommon.
This commit is contained in:
Stenzek
2017-04-30 18:07:57 +10:00
parent 2869c570f1
commit 836b9b9acb
38 changed files with 389 additions and 450 deletions

View File

@ -131,12 +131,13 @@ class UtilityShaderDraw
public:
UtilityShaderDraw(VkCommandBuffer command_buffer, VkPipelineLayout pipeline_layout,
VkRenderPass render_pass, VkShaderModule vertex_shader,
VkShaderModule geometry_shader, VkShaderModule pixel_shader);
VkShaderModule geometry_shader, VkShaderModule pixel_shader,
PrimitiveType primitive = PrimitiveType::TriangleStrip);
UtilityShaderVertex* ReserveVertices(VkPrimitiveTopology topology, size_t count);
UtilityShaderVertex* ReserveVertices(size_t count);
void CommitVertices(size_t count);
void UploadVertices(VkPrimitiveTopology topology, UtilityShaderVertex* vertices, size_t count);
void UploadVertices(UtilityShaderVertex* vertices, size_t count);
u8* AllocateVSUniforms(size_t size);
void CommitVSUniforms(size_t size);
@ -151,6 +152,7 @@ public:
void SetPSTexelBuffer(VkBufferView view);
void SetRasterizationState(const RasterizationState& state);
void SetMultisamplingState(const MultisamplingState& state);
void SetDepthState(const DepthState& state);
void SetBlendState(const BlendingState& state);
@ -177,7 +179,7 @@ public:
// Draw without a vertex buffer. Assumes viewport has been initialized separately.
void SetViewportAndScissor(int x, int y, int width, int height);
void DrawWithoutVertexBuffer(VkPrimitiveTopology primitive_topology, u32 vertex_count);
void DrawWithoutVertexBuffer(u32 vertex_count);
private:
void BindVertexBuffer();