aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/v3d
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2018-12-27 19:57:03 -0800
committerEric Anholt <[email protected]>2019-01-14 13:18:02 -0800
commit619a28b845118707a4968ab1e3d8eb67da7a44cb (patch)
treeed3075456dcd395b90a891eacd678b318e1920cf /src/gallium/drivers/v3d
parent051a41d3d56ee0eccf99e1871133cfaa4606b728 (diff)
v3d: Add support for GL_ARB_framebuffer_no_attachments.
Fixes dEQP-GLES31.functional.state_query.integer.max_framebuffer_height_getboolean when GLES3 is enabled.
Diffstat (limited to 'src/gallium/drivers/v3d')
-rw-r--r--src/gallium/drivers/v3d/v3d_job.c7
-rw-r--r--src/gallium/drivers/v3d/v3d_screen.c5
-rw-r--r--src/gallium/drivers/v3d/v3dx_rcl.c9
3 files changed, 19 insertions, 2 deletions
diff --git a/src/gallium/drivers/v3d/v3d_job.c b/src/gallium/drivers/v3d/v3d_job.c
index f92aac1a51a..5928e98a71c 100644
--- a/src/gallium/drivers/v3d/v3d_job.c
+++ b/src/gallium/drivers/v3d/v3d_job.c
@@ -267,8 +267,6 @@ v3d_get_job(struct v3d_context *v3d,
job->msaa = true;
}
- v3d_job_set_tile_buffer_size(job);
-
for (int i = 0; i < VC5_MAX_DRAW_BUFFERS; i++) {
if (cbufs[i])
_mesa_hash_table_insert(v3d->write_jobs,
@@ -303,6 +301,11 @@ v3d_get_job_for_fbo(struct v3d_context *v3d)
struct pipe_surface *zsbuf = v3d->framebuffer.zsbuf;
struct v3d_job *job = v3d_get_job(v3d, cbufs, zsbuf);
+ if (v3d->framebuffer.samples >= 1)
+ job->msaa = true;
+
+ v3d_job_set_tile_buffer_size(job);
+
/* The dirty flags are tracking what's been updated while v3d->job has
* been bound, so set them all to ~0 when switching between jobs. We
* also need to reset all state at the start of rendering.
diff --git a/src/gallium/drivers/v3d/v3d_screen.c b/src/gallium/drivers/v3d/v3d_screen.c
index 5fd29b78785..a1ff75435f0 100644
--- a/src/gallium/drivers/v3d/v3d_screen.c
+++ b/src/gallium/drivers/v3d/v3d_screen.c
@@ -128,6 +128,7 @@ v3d_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
case PIPE_CAP_TGSI_CAN_READ_OUTPUTS:
case PIPE_CAP_TGSI_PACK_HALF_FLOAT:
case PIPE_CAP_TEXTURE_HALF_FLOAT_LINEAR:
+ case PIPE_CAP_FRAMEBUFFER_NO_ATTACHMENT:
return 1;
case PIPE_CAP_GENERATE_MIPMAP:
@@ -396,7 +397,11 @@ v3d_screen_is_format_supported(struct pipe_screen *pscreen,
}
}
+ /* FORMAT_NONE gets allowed for ARB_framebuffer_no_attachments's probe
+ * of FRAMEBUFFER_MAX_SAMPLES
+ */
if ((usage & PIPE_BIND_RENDER_TARGET) &&
+ format != PIPE_FORMAT_NONE &&
!v3d_rt_format_supported(&screen->devinfo, format)) {
return FALSE;
}
diff --git a/src/gallium/drivers/v3d/v3dx_rcl.c b/src/gallium/drivers/v3d/v3dx_rcl.c
index 45115c0b0cc..17750cc75f4 100644
--- a/src/gallium/drivers/v3d/v3dx_rcl.c
+++ b/src/gallium/drivers/v3d/v3dx_rcl.c
@@ -374,6 +374,15 @@ v3d_rcl_emit_stores(struct v3d_job *job, struct v3d_cl *cl)
}
}
#else /* V3D_VERSION >= 40 */
+ /* If we're emitting an RCL with GL_ARB_framebuffer_no_attachments,
+ * we still need to emit some sort of store.
+ */
+ if (!job->store) {
+ cl_emit(cl, STORE_TILE_BUFFER_GENERAL, store) {
+ store.buffer_to_store = NONE;
+ }
+ }
+
assert(!stores_pending);
/* GFXH-1461/GFXH-1689: The per-buffer store command's clear