mesa: add/update comments in _mesa_copy_buffer_subdata()
[mesa.git] / src / mesa / drivers / dri / i965 / gen6_cc.c
index 1e6c4cfed32b65891e3115b201396d2a14f54fe9..916ec7d0456a90020629023a5c906a95ce102679 100644 (file)
@@ -33,7 +33,7 @@
 #include "main/macros.h"
 
 static void
-prepare_blend_state(struct brw_context *brw)
+gen6_upload_blend_state(struct brw_context *brw)
 {
    struct gl_context *ctx = &brw->intel.ctx;
    struct gen6_blend_state *blend;
@@ -64,7 +64,7 @@ prepare_blend_state(struct brw_context *brw)
         /* Floating point RTs should have no effect from LogicOp,
          * except for disabling of blending
          */
-        if (_mesa_get_format_datatype(rb->Format) != GL_FLOAT) {
+        if (rb && _mesa_get_format_datatype(rb->Format) != GL_FLOAT) {
            blend[b].blend1.logic_op_enable = 1;
            blend[b].blend1.logic_op_func =
               intel_translate_logic_op(ctx->Color.LogicOp);
@@ -151,11 +151,11 @@ const struct brw_tracked_state gen6_blend_state = {
       .brw = BRW_NEW_BATCH,
       .cache = 0,
    },
-   .prepare = prepare_blend_state,
+   .emit = gen6_upload_blend_state,
 };
 
 static void
-gen6_prepare_color_calc_state(struct brw_context *brw)
+gen6_upload_color_calc_state(struct brw_context *brw)
 {
    struct gl_context *ctx = &brw->intel.ctx;
    struct gen6_color_calc_state *cc;
@@ -187,7 +187,7 @@ const struct brw_tracked_state gen6_color_calc_state = {
       .brw = BRW_NEW_BATCH,
       .cache = 0,
    },
-   .prepare = gen6_prepare_color_calc_state,
+   .emit = gen6_upload_color_calc_state,
 };
 
 static void upload_cc_state_pointers(struct brw_context *brw)