vc4: Move the deref of the color buffer for simulator into the simulator.
authorEric Anholt <eric@anholt.net>
Tue, 12 Aug 2014 23:35:33 +0000 (16:35 -0700)
committerEric Anholt <eric@anholt.net>
Fri, 15 Aug 2014 18:52:18 +0000 (11:52 -0700)
At some point I'm going to want to move the information necessary for the
host buffer upload/download into the BO so that it's independent of the
current vc4->framebuffer, but for now this fixes pointless derefs on
non-simulator in vc4_context.c since the dump_fbo() removal

src/gallium/drivers/vc4/vc4_context.c
src/gallium/drivers/vc4/vc4_context.h
src/gallium/drivers/vc4/vc4_simulator.c

index 8073e79cc93a9236b50630cf0cfe5145a640475f..2fc571a26ad36b54b3d884c3d40dd60885931d00 100644 (file)
@@ -144,9 +144,6 @@ vc4_flush(struct pipe_context *pctx)
 
         vc4_setup_rcl(vc4);
 
-        struct vc4_surface *csurf = vc4_surface(vc4->framebuffer.cbufs[0]);
-        struct vc4_resource *ctex = vc4_resource(csurf->base.texture);
-
         struct drm_vc4_submit_cl submit;
         memset(&submit, 0, sizeof(submit));
 
@@ -169,7 +166,7 @@ vc4_flush(struct pipe_context *pctx)
 #ifndef USE_VC4_SIMULATOR
                 ret = drmIoctl(vc4->fd, DRM_IOCTL_VC4_SUBMIT_CL, &submit);
 #else
-                ret = vc4_simulator_flush(vc4, &submit, csurf);
+                ret = vc4_simulator_flush(vc4, &submit);
 #endif
                 if (ret)
                         errx(1, "VC4 submit failed\n");
index fe51072180be1f3913b726800b06f97804698720..bdd174cd365de15e0a07135db237f5453ba5a620 100644 (file)
@@ -215,8 +215,7 @@ void vc4_state_init(struct pipe_context *pctx);
 void vc4_program_init(struct pipe_context *pctx);
 void vc4_simulator_init(struct vc4_screen *screen);
 int vc4_simulator_flush(struct vc4_context *vc4,
-                        struct drm_vc4_submit_cl *args,
-                        struct vc4_surface *color_surf);
+                        struct drm_vc4_submit_cl *args);
 
 void vc4_write_uniforms(struct vc4_context *vc4,
                         struct vc4_compiled_shader *shader,
index 827d6179c863de93c18721f5de4b64a78d477235..cedd401d47aa758e8a9f8e159fc25c6021578328 100644 (file)
@@ -226,9 +226,9 @@ fail:
 }
 
 int
-vc4_simulator_flush(struct vc4_context *vc4, struct drm_vc4_submit_cl *args,
-                    struct vc4_surface *csurf)
+vc4_simulator_flush(struct vc4_context *vc4, struct drm_vc4_submit_cl *args)
 {
+        struct vc4_surface *csurf = vc4_surface(vc4->framebuffer.cbufs[0]);
         struct vc4_resource *ctex = vc4_resource(csurf->base.texture);
         uint32_t winsys_stride = ctex->bo->simulator_winsys_stride;
         uint32_t sim_stride = ctex->slices[0].stride;