Only set line width when wideLines feature is supported

This commit is contained in:
Billy Laws 2022-10-09 14:03:23 +01:00
parent 4cebdfc8d3
commit f93df35e6c

View File

@ -305,7 +305,11 @@ namespace skyline::gpu::interconnect::maxwell3d {
LineWidthState::LineWidthState(dirty::Handle dirtyHandle, DirtyManager &manager, const EngineRegisters &engine) : engine{manager, dirtyHandle, engine} {}
void LineWidthState::Flush(InterconnectContext &ctx, StateUpdateBuilder &builder) {
builder.SetLineWidth(engine->aliasedLineWidthEnable ? engine->lineWidthAliased : engine->lineWidth);
float width{engine->aliasedLineWidthEnable ? engine->lineWidthAliased : engine->lineWidth};
if (width != 1.0f && !ctx.gpu.traits.supportsWideLines)
Logger::Warn("Wide lines used on guest but unsupported on host!");
else
builder.SetLineWidth(width);
}
/* Depth Bias */