i965: const a few structs and vars to avoid writing to them by accident
authorEric Engestrom <eric.engestrom@imgtec.com>
Mon, 27 Nov 2017 13:46:43 +0000 (13:46 +0000)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 28 Nov 2017 23:23:16 +0000 (15:23 -0800)
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/genX_state_upload.c

index 2808363e3adb5d2556b83683a2485f8711073da8..c0b2ea082386c37ce4f16309870f27c71b4b7127 100644 (file)
@@ -4289,16 +4289,16 @@ static const struct brw_tracked_state genX(cs_state) = {
 static void
 genX(upload_raster)(struct brw_context *brw)
 {
-   struct gl_context *ctx = &brw->ctx;
+   const struct gl_context *ctx = &brw->ctx;
 
    /* _NEW_BUFFERS */
-   bool render_to_fbo = _mesa_is_user_fbo(ctx->DrawBuffer);
+   const bool render_to_fbo = _mesa_is_user_fbo(ctx->DrawBuffer);
 
    /* _NEW_POLYGON */
-   struct gl_polygon_attrib *polygon = &ctx->Polygon;
+   const struct gl_polygon_attrib *polygon = &ctx->Polygon;
 
    /* _NEW_POINT */
-   struct gl_point_attrib *point = &ctx->Point;
+   const struct gl_point_attrib *point = &ctx->Point;
 
    brw_batch_emit(brw, GENX(3DSTATE_RASTER), raster) {
       if (brw->polygon_front_bit == render_to_fbo)