[virglrenderer-devel] [PATCH 8/9] add robust buffer access feature.
Dave Airlie
airlied at gmail.com
Tue Jul 31 22:28:20 UTC 2018
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" } },
[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
More information about the virglrenderer-devel
mailing list