i965/blorp: Make state setup C-safe
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 22 Apr 2016 21:51:05 +0000 (14:51 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 26 Apr 2016 21:55:22 +0000 (14:55 -0700)
Previously they (very rarely) used C++isms that prevented them from being
compiled as C.  As of this commit, they can be compiled as either C or C++.

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/gen6_blorp.cpp
src/mesa/drivers/dri/i965/gen7_blorp.cpp
src/mesa/drivers/dri/i965/gen8_blorp.cpp

index 5498070..ee3276e 100644 (file)
@@ -693,7 +693,7 @@ gen6_blorp_emit_constant_ps(struct brw_context *brw,
    /* Make sure the push constants fill an exact integer number of
     * registers.
     */
-   assert(sizeof(brw_blorp_wm_push_constants) % 32 == 0);
+   assert(sizeof(struct brw_blorp_wm_push_constants) % 32 == 0);
 
    /* There must be at least one register worth of push constant data. */
    assert(BRW_BLORP_NUM_PUSH_CONST_REGS > 0);
@@ -922,7 +922,7 @@ gen6_blorp_emit_drawing_rectangle(struct brw_context *brw,
 }
 
 /* 3DSTATE_VIEWPORT_STATE_POINTERS */
-void
+static void
 gen6_blorp_emit_viewport_state(struct brw_context *brw,
                               const struct brw_blorp_params *params)
 {
index f2ed473..e2e6072 100644 (file)
@@ -597,7 +597,7 @@ gen7_blorp_emit_constant_ps(struct brw_context *brw,
    /* Make sure the push constants fill an exact integer number of
     * registers.
     */
-   assert(sizeof(brw_blorp_wm_push_constants) % 32 == 0);
+   assert(sizeof(struct brw_blorp_wm_push_constants) % 32 == 0);
 
    /* There must be at least one register worth of push constant data. */
    assert(BRW_BLORP_NUM_PUSH_CONST_REGS > 0);
index d02a003..720f524 100644 (file)
@@ -599,7 +599,7 @@ gen8_blorp_emit_surface_states(struct brw_context *brw,
                                     true /* is_render_target */);
    if (params->src.mt) {
       const struct brw_blorp_surface_info *surface = &params->src;
-      intel_mipmap_tree *mt = surface->mt;
+      struct intel_mipmap_tree *mt = surface->mt;
 
       /* Textures are always sampled as 2D. */
       const bool is_cube = mt->target == GL_TEXTURE_CUBE_MAP_ARRAY ||