v3d: implement robust buffer access
This is the last piece to expose KHR_robustness. The main bulk of the job is done already in the broadcom compiler through lowerings, so we only need to set the proper key in order to enable the robustness. Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com> Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Reviewed-by: Maíra Canal <mcanal@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35965>
This commit is contained in:
@@ -222,7 +222,7 @@ GL 4.5, GLSL 4.50 -- all DONE: freedreno/a6xx, nvc0, r600, radeonsi, llvmpipe, v
|
||||
GL_ARB_shader_texture_image_samples DONE (freedreno/a3xx+, nv50, crocus/gen7+)
|
||||
GL_ARB_texture_barrier DONE (freedreno, nv50, v3d, vc4, lima, crocus)
|
||||
GL_KHR_context_flush_control DONE (all - but needs GLX/EGL extension to be useful)
|
||||
GL_KHR_robustness DONE (freedreno, panfrost)
|
||||
GL_KHR_robustness DONE (freedreno, panfrost, v3d)
|
||||
GL_EXT_shader_integer_mix DONE (all drivers that support GLSL)
|
||||
|
||||
GL 4.6, GLSL 4.60 -- all DONE: radeonsi, virgl, zink, iris, crocus/gen7+, d3d12, asahi, r600/evergreen+
|
||||
@@ -273,7 +273,7 @@ GLES3.2, GLSL ES 3.2 -- all DONE: freedreno/a6xx, radeonsi, virgl, llvmpipe, zin
|
||||
GL_EXT_color_buffer_float DONE (all drivers)
|
||||
GL_KHR_blend_equation_advanced DONE (freedreno/a6xx, nvc0, panfrost, crocus/gen4.5+, v3d)
|
||||
GL_KHR_debug DONE (all drivers)
|
||||
GL_KHR_robustness DONE (freedreno, nvc0, panfrost, r600)
|
||||
GL_KHR_robustness DONE (freedreno, nvc0, panfrost, r600, v3d)
|
||||
GL_KHR_texture_compression_astc_ldr DONE (freedreno, r600, v3d, vc4, panfrost, softpipe, lima, crocus/gen6+)
|
||||
GL_OES_copy_image DONE (all drivers)
|
||||
GL_OES_draw_buffers_indexed DONE (all drivers that support GL_ARB_draw_buffers_blend)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
EGL_EXT_create_context_robustness support on Panfrost V10+
|
||||
GL_ARB_robust_buffer_access_behavior, GL_KHR_robust_buffer_access_behavior and GL_KHR_robustness support on Panfrost
|
||||
VK_EXT_mutable_descriptor_type on panvk/v9+
|
||||
GL_KHR_robustness on v3d
|
||||
|
||||
@@ -465,6 +465,7 @@ v3d_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags)
|
||||
|
||||
slab_create_child(&v3d->transfer_pool, &screen->transfer_pool);
|
||||
|
||||
v3d->robust_buffer = flags & PIPE_CONTEXT_ROBUST_BUFFER_ACCESS;
|
||||
if (screen->devinfo.has_reset_counter) {
|
||||
pctx->get_device_reset_status = v3d_get_device_reset_status;
|
||||
v3d->global_reset_count = v3d_get_reset_count(v3d, false);
|
||||
|
||||
@@ -669,6 +669,10 @@ struct v3d_context {
|
||||
|
||||
bool active_queries;
|
||||
|
||||
/* Whether a context with robust buffer access should be created.
|
||||
*/
|
||||
bool robust_buffer;
|
||||
|
||||
/* How many GPU resets happened since the driver was proved, and how
|
||||
* many were caused by this context.
|
||||
*/
|
||||
|
||||
@@ -579,6 +579,9 @@ v3d_setup_shared_key(struct v3d_context *v3d, struct v3d_key *key,
|
||||
if (return_size == 32)
|
||||
key->sampler_is_32b |= (1 << i);
|
||||
}
|
||||
|
||||
key->robust_uniform_access = v3d->robust_buffer;
|
||||
key->robust_storage_access = v3d->robust_buffer;
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -390,6 +390,7 @@ v3d_init_screen_caps(struct v3d_screen *screen)
|
||||
caps->max_texture_lod_bias = 16.0f;
|
||||
|
||||
caps->device_reset_status_query = screen->devinfo.has_reset_counter;
|
||||
caps->robust_buffer_access_behavior = true;
|
||||
}
|
||||
|
||||
static bool
|
||||
|
||||
Reference in New Issue
Block a user