i965: Enable EGL_KHR_gl_texture_3D_image
[mesa.git] / src / mesa / drivers / dri / i965 / brw_sf_state.c
index 5d9892214a935c6cef3bf06c2d45b32883d27c92..89406fc9cb86d9203bb40a375fae317aab90ae81 100644 (file)
@@ -45,7 +45,7 @@ static void upload_sf_vp(struct brw_context *brw)
    struct gl_context *ctx = &brw->ctx;
    struct brw_sf_viewport *sfv;
    GLfloat y_scale, y_bias;
-   double scale[3], translate[3];
+   float scale[3], translate[3];
    const bool render_to_fbo = _mesa_is_user_fbo(ctx->DrawBuffer);
 
    sfv = brw_state_batch(brw, AUB_TRACE_SF_VP_STATE,
@@ -124,7 +124,8 @@ const struct brw_tracked_state brw_sf_vp = {
       .mesa  = _NEW_BUFFERS |
                _NEW_SCISSOR |
                _NEW_VIEWPORT,
-      .brw   = BRW_NEW_BATCH,
+      .brw   = BRW_NEW_BATCH |
+               BRW_NEW_BLORP,
    },
    .emit = upload_sf_vp
 };
@@ -220,7 +221,7 @@ static void upload_sf_unit( struct brw_context *brw )
 
    /* _NEW_LINE */
    sf->sf6.line_width =
-      CLAMP(ctx->Line.Width, 1.0, ctx->Const.MaxLineWidth) * (1<<1);
+      CLAMP(ctx->Line.Width, 1.0f, ctx->Const.MaxLineWidth) * (1<<1);
 
    sf->sf6.line_endcap_aa_region_width = 1;
    if (ctx->Line.SmoothFlag)
@@ -244,7 +245,7 @@ static void upload_sf_unit( struct brw_context *brw )
        * Chipset Graphics Controller Programmer's Reference Manual,
        * Volume 2: 3D/Media", Revision 1.0b as of January 2008,
        * available at
-       *     http://intellinuxgraphics.org/documentation.html
+       *     https://01.org/linuxgraphics/documentation/hardware-specification-prms
        * at the time of this writing).
        *
        * It does work on at least some devices, if not all;
@@ -259,9 +260,10 @@ static void upload_sf_unit( struct brw_context *brw )
 
    /* _NEW_POINT */
    sf->sf7.sprite_point = ctx->Point.PointSprite;
-   sf->sf7.point_size = CLAMP(rint(CLAMP(ctx->Point.Size,
-                                        ctx->Point.MinSize,
-                                        ctx->Point.MaxSize)), 1, 255) * (1<<3);
+   sf->sf7.point_size = CLAMP(rintf(CLAMP(ctx->Point.Size,
+                                          ctx->Point.MinSize,
+                                          ctx->Point.MaxSize)), 1.0f, 255.0f) *
+                        (1<<3);
    /* _NEW_PROGRAM | _NEW_POINT */
    sf->sf7.use_point_size_state = !(ctx->VertexProgram.PointSizeEnabled ||
                                    ctx->Point._Attenuated);
@@ -311,6 +313,7 @@ const struct brw_tracked_state brw_sf_unit = {
                _NEW_PROGRAM |
                _NEW_SCISSOR,
       .brw   = BRW_NEW_BATCH |
+               BRW_NEW_BLORP |
                BRW_NEW_PROGRAM_CACHE |
                BRW_NEW_SF_PROG_DATA |
                BRW_NEW_SF_VP |