Mesa (master): i965: Advertise larger line widths.
Kenneth Graunke
kwg at kemper.freedesktop.org
Sun Nov 9 06:27:40 UTC 2014
Module: Mesa
Branch: master
Commit: 6dab04d7e3af2e0be8a05ca2df8c5669a5f54937
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6dab04d7e3af2e0be8a05ca2df8c5669a5f54937
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Mon Nov 3 17:01:53 2014 -0800
i965: Advertise larger line widths.
We've artificially been limiting this to 5 for no particular reason.
On Gen4-5, the limit is [0, 7.5] with a granularity of 0.5 (U3.1).
On Gen6+, the limit is [0, 7.9921875]. Since it's a U3.7, the
granularity should be 0.125 (1/8).
This patch conservatively advertises one granularity smaller than the
hardware's maximum value, just in case there's a problem using the
largest possible value. On Gen4-5, this is 7.5 - 0.5 = 7.0. On Gen6+,
this is 8.0 - 0.125 = 7.875.
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Kristian Høgsberg <krh at bitplanet.net>
---
src/mesa/drivers/dri/i965/brw_context.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index e1a994a..eaabd43 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -421,9 +421,15 @@ brw_initialize_context_constants(struct brw_context *brw)
ctx->Const.MinLineWidth = 1.0;
ctx->Const.MinLineWidthAA = 1.0;
- ctx->Const.MaxLineWidth = 5.0;
- ctx->Const.MaxLineWidthAA = 5.0;
- ctx->Const.LineWidthGranularity = 0.5;
+ if (brw->gen >= 6) {
+ ctx->Const.MaxLineWidth = 7.875;
+ ctx->Const.MaxLineWidthAA = 7.875;
+ ctx->Const.LineWidthGranularity = 0.125;
+ } else {
+ ctx->Const.MaxLineWidth = 7.0;
+ ctx->Const.MaxLineWidthAA = 7.0;
+ ctx->Const.LineWidthGranularity = 0.5;
+ }
ctx->Const.MinPointSize = 1.0;
ctx->Const.MinPointSizeAA = 1.0;
More information about the mesa-commit
mailing list