aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2014-08-12 16:35:33 -0700
committerEric Anholt <[email protected]>2014-08-15 11:52:18 -0700
commit64ad96a9f4dec0724d7276d32de59cc621fccb55 (patch)
treee77e898261d1f901fdb4eab67a154391d0162cc4 /src/gallium/drivers/vc4
parent2f28a0dc23165123cf1e8b5942acad37878edd8a (diff)
vc4: Move the deref of the color buffer for simulator into the simulator.
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
Diffstat (limited to 'src/gallium/drivers/vc4')
-rw-r--r--src/gallium/drivers/vc4/vc4_context.c5
-rw-r--r--src/gallium/drivers/vc4/vc4_context.h3
-rw-r--r--src/gallium/drivers/vc4/vc4_simulator.c4
3 files changed, 4 insertions, 8 deletions
diff --git a/src/gallium/drivers/vc4/vc4_context.c b/src/gallium/drivers/vc4/vc4_context.c
index 8073e79cc93..2fc571a26ad 100644
--- a/src/gallium/drivers/vc4/vc4_context.c
+++ b/src/gallium/drivers/vc4/vc4_context.c
@@ -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");
diff --git a/src/gallium/drivers/vc4/vc4_context.h b/src/gallium/drivers/vc4/vc4_context.h
index fe51072180b..bdd174cd365 100644
--- a/src/gallium/drivers/vc4/vc4_context.h
+++ b/src/gallium/drivers/vc4/vc4_context.h
@@ -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,
diff --git a/src/gallium/drivers/vc4/vc4_simulator.c b/src/gallium/drivers/vc4/vc4_simulator.c
index 827d6179c86..cedd401d47a 100644
--- a/src/gallium/drivers/vc4/vc4_simulator.c
+++ b/src/gallium/drivers/vc4/vc4_simulator.c
@@ -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;