[virglrenderer-devel] [PATCH 8/9] add robust buffer access feature.
Gurchetan Singh
gurchetansingh at chromium.org
Wed Aug 1 00:57:38 UTC 2018
On Tue, Jul 31, 2018 at 3:28 PM Dave Airlie <airlied at gmail.com> wrote:
>
> From: Dave Airlie <airlied at redhat.com>
>
> ---
> src/virgl_hw.h | 1 +
> src/vrend_renderer.c | 5 +++++
> 2 files changed, 6 insertions(+)
>
> diff --git a/src/virgl_hw.h b/src/virgl_hw.h
> index 739500f..6ab549a 100644
> --- a/src/virgl_hw.h
> +++ b/src/virgl_hw.h
> @@ -226,6 +226,7 @@ enum virgl_formats {
> #define VIRGL_CAP_MEMORY_BARRIER (1 << 6)
> #define VIRGL_CAP_COMPUTE_SHADER (1 << 7)
> #define VIRGL_CAP_FB_NO_ATTACH (1 << 8)
> +#define VIRGL_CAP_ROBUST_BUFFER_ACCESS (1 << 9)
>
> /* virgl bind flags - these are compatible with mesa 10.5 gallium.
> * but are fixed, no other should be passed to virgl either.
> diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c
> index 58b1f52..3ce5343 100644
> --- a/src/vrend_renderer.c
> +++ b/src/vrend_renderer.c
> @@ -117,6 +117,7 @@ enum features_id
> feat_nv_conditional_render,
> feat_nv_prim_restart,
> feat_polygon_offset_clamp,
> + feat_robust_buffer_access,
> feat_sample_mask,
> feat_sample_shading,
> feat_samplers,
> @@ -175,6 +176,7 @@ static const struct {
> [feat_nv_conditional_render] = { UNAVAIL, UNAVAIL, { "GL_NV_conditional_render" } },
> [feat_nv_prim_restart] = { UNAVAIL, UNAVAIL, { "GL_NV_primitive_restart" } },
> [feat_polygon_offset_clamp] = { 46, UNAVAIL, { "GL_ARB_polygon_offset_clamp" } },
> + [feat_robust_buffer_access] = { 43, UNAVAIL, { "GL_ARB_robust_Buffer_access_behaviour" } },
I'm not sure if capitalization counts when querying for extensions,
but shouldn't this be "GL_ARB_robust_buffer_access_behavior" instead
of "GL_ARB_robust_Buffer_access_behaviour"?
> [feat_sample_mask] = { 32, 31, { "GL_ARB_texture_multisample" } },
> [feat_sample_shading] = { 40, UNAVAIL, { "GL_ARB_sample_shading" } },
> [feat_samplers] = { 33, UNAVAIL, { "GL_ARB_sampler_objects" } },
> @@ -8219,6 +8221,9 @@ void vrend_renderer_fill_caps(uint32_t set, UNUSED uint32_t version,
>
> if (has_feature(feat_copy_image))
> caps->v2.capability_bits |= VIRGL_CAP_COPY_IMAGE;
> +
> + if (has_feature(feat_robust_buffer_access))
> + caps->v2.capability_bits |= VIRGL_CAP_ROBUST_BUFFER_ACCESS;
> }
>
> GLint64 vrend_renderer_get_timestamp(void)
> --
> 2.14.3
>
> _______________________________________________
> virglrenderer-devel mailing list
> virglrenderer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/virglrenderer-devel
More information about the virglrenderer-devel
mailing list