[virglrenderer-devel] [PATCH 2/8] vrend: Silence warnings on invalid glLineWidth state
Jakob Bornecrantz
jakob.bornecrantz at collabora.com
Tue Feb 13 14:27:24 UTC 2018
Signed-off-by: Jakob Bornecrantz <jakob.bornecrantz at collabora.com>
---
src/vrend_renderer.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c
index 36ded80..eea7422 100644
--- a/src/vrend_renderer.c
+++ b/src/vrend_renderer.c
@@ -3486,7 +3486,8 @@ static void vrend_hw_emit_rs(struct vrend_context *ctx)
}
}
- glLineWidth(state->line_width);
+ /* line_width < 0 is invalid, the guest sometimes forgot to set it. */
+ glLineWidth(state->line_width <= 0 ? 1.0f : state->line_width);
if (state->rasterizer_discard != ctx->sub->hw_rs_state.rasterizer_discard) {
ctx->sub->hw_rs_state.rasterizer_discard = state->rasterizer_discard;
--
2.14.1
More information about the virglrenderer-devel
mailing list