VideoBackends:Metal: Don't set primitive on ubershaders

This commit is contained in:
TellowKrinkle 2022-06-18 20:33:18 -05:00
parent 99533d2840
commit 7edc8b4e79
1 changed files with 9 additions and 5 deletions

View File

@ -330,11 +330,14 @@ public:
// Throw extras in bits we don't otherwise use // Throw extras in bits we don't otherwise use
if (cfg.rasterization_state.cullmode == CullMode::All) if (cfg.rasterization_state.cullmode == CullMode::All)
blend.hex |= 1 << 29; blend.hex |= 1 << 29;
if (cfg.usage != AbstractPipelineUsage::GXUber)
{
if (cfg.rasterization_state.primitive == PrimitiveType::Points) if (cfg.rasterization_state.primitive == PrimitiveType::Points)
blend.hex |= 1 << 30; blend.hex |= 1 << 30;
else if (cfg.rasterization_state.primitive == PrimitiveType::Lines) else if (cfg.rasterization_state.primitive == PrimitiveType::Lines)
blend.hex |= 1 << 31; blend.hex |= 1 << 31;
} }
}
PipelineID() { memset(this, 0, sizeof(*this)); } PipelineID() { memset(this, 0, sizeof(*this)); }
PipelineID(const PipelineID& other) { memcpy(this, &other, sizeof(*this)); } PipelineID(const PipelineID& other) { memcpy(this, &other, sizeof(*this)); }
PipelineID& operator=(const PipelineID& other) PipelineID& operator=(const PipelineID& other)
@ -386,6 +389,7 @@ public:
if (config.vertex_format) if (config.vertex_format)
[desc setVertexDescriptor:static_cast<const VertexFormat*>(config.vertex_format)->Get()]; [desc setVertexDescriptor:static_cast<const VertexFormat*>(config.vertex_format)->Get()];
RasterizationState rs = config.rasterization_state; RasterizationState rs = config.rasterization_state;
if (config.usage != AbstractPipelineUsage::GXUber)
[desc setInputPrimitiveTopology:GetClass(rs.primitive)]; [desc setInputPrimitiveTopology:GetClass(rs.primitive)];
if (rs.cullmode == CullMode::All) if (rs.cullmode == CullMode::All)
[desc setRasterizationEnabled:NO]; [desc setRasterizationEnabled:NO];