i965: Turn brw_get_line_width_float() into brw_get_line_width().
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 9 May 2017 05:39:25 +0000 (22:39 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 10 May 2017 18:41:42 +0000 (11:41 -0700)
Drop the old brw_get_line_width() helper which return the unsigned
fixed-point encoding of the line width - it's been dead since the
conversion to GENXML (which does the encoding for us).

Then rename brw_get_line_width_float() to the shorter name.

Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
src/mesa/drivers/dri/i965/brw_util.h
src/mesa/drivers/dri/i965/genX_state_upload.c

index 7395d345a57c50f8ebf1a28ef76042f849c5c228..814286007dea450f0143a9ff2fad72e96760acb8 100644 (file)
@@ -41,7 +41,7 @@ extern GLuint brw_translate_blend_equation( GLenum mode );
 extern GLenum brw_fix_xRGB_alpha(GLenum function);
 
 static inline float
-brw_get_line_width_float(struct brw_context *brw)
+brw_get_line_width(struct brw_context *brw)
 {
    /* From the OpenGL 4.4 spec:
     *
@@ -72,12 +72,4 @@ brw_get_line_width_float(struct brw_context *brw)
    return line_width;
 }
 
-static inline uint32_t
-brw_get_line_width(struct brw_context *brw)
-{
-   float line_width = brw_get_line_width_float(brw);
-
-   return U_FIXED(line_width, 7);
-}
-
 #endif
index 77b9f93b5e3771b5ed865080ec461d36d804c6be..ebfcdd46e046b82ae446d402c328e69891164c70 100644 (file)
@@ -1405,11 +1405,11 @@ genX(upload_sf)(struct brw_context *brw)
       /* _NEW_LINE */
 #if GEN_GEN == 8
       if (brw->is_cherryview)
-         sf.CHVLineWidth = brw_get_line_width_float(brw);
+         sf.CHVLineWidth = brw_get_line_width(brw);
       else
-         sf.LineWidth = brw_get_line_width_float(brw);
+         sf.LineWidth = brw_get_line_width(brw);
 #else
-      sf.LineWidth = brw_get_line_width_float(brw);
+      sf.LineWidth = brw_get_line_width(brw);
 #endif
 
       if (ctx->Line.SmoothFlag) {