llvmpipe: add a few const qualifiers
authorBrian Paul <brianp@vmware.com>
Fri, 19 Feb 2016 15:51:51 +0000 (08:51 -0700)
committerBrian Paul <brianp@vmware.com>
Fri, 19 Feb 2016 15:51:51 +0000 (08:51 -0700)
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/gallium/drivers/llvmpipe/lp_setup_context.h
src/gallium/drivers/llvmpipe/lp_setup_line.c
src/gallium/drivers/llvmpipe/lp_setup_tri.c

index 5ab297d7e1a6c7f0776287ec34d42cd32d8cfc46..9714691270495e1371b62df5bfb8346b187322e3 100644 (file)
@@ -169,8 +169,8 @@ struct lp_setup_context
 };
 
 static inline void
-scissor_planes_needed(boolean scis_planes[4], struct u_rect *bbox,
-                      struct u_rect *scissor)
+scissor_planes_needed(boolean scis_planes[4], const struct u_rect *bbox,
+                      const struct u_rect *scissor)
 {
    /* left */
    scis_planes[0] = (bbox->x0 < scissor->x0);
index af4e7900d3c0452c388310466d071874b073effe..018130c31924a8bdb1be2e59a716b7cce59db133 100644 (file)
@@ -719,7 +719,7 @@ try_setup_line( struct lp_setup_context *setup,
     */
    if (nr_planes > 4) {
       /* why not just use draw_regions */
-      struct u_rect *scissor = &setup->scissors[viewport_index];
+      const struct u_rect *scissor = &setup->scissors[viewport_index];
       struct lp_rast_plane *plane_s = &plane[4];
       boolean s_planes[4];
       scissor_planes_needed(s_planes, &bbox, scissor);
index cdb3d015dec7b6125f77ab44fb2fb358014e60d1..29aee726941ef7c70414801aa105e6b3ae0d457d 100644 (file)
@@ -681,7 +681,7 @@ do_triangle_ccw(struct lp_setup_context *setup,
     */
    if (nr_planes > 3) {
       /* why not just use draw_regions */
-      struct u_rect *scissor = &setup->scissors[viewport_index];
+      const struct u_rect *scissor = &setup->scissors[viewport_index];
       struct lp_rast_plane *plane_s = &plane[3];
       boolean s_planes[4];
       scissor_planes_needed(s_planes, &bbox, scissor);