v3d: Add support for GL_ARB_framebuffer_no_attachments.
Fixes dEQP-GLES31.functional.state_query.integer.max_framebuffer_height_getboolean when GLES3 is enabled.
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user