expose FBFETCH-cap if supported

[airlied: use a feat_framebuffer_fetch]
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
macos/master
Erik Faye-Lund 7 years ago committed by Dave Airlie
parent 3e0f7bd4ae
commit 0364a2a318
  1. 1
      src/virgl_hw.h
  2. 5
      src/vrend_renderer.c

@ -227,6 +227,7 @@ enum virgl_formats {
#define VIRGL_CAP_COMPUTE_SHADER (1 << 7) #define VIRGL_CAP_COMPUTE_SHADER (1 << 7)
#define VIRGL_CAP_FB_NO_ATTACH (1 << 8) #define VIRGL_CAP_FB_NO_ATTACH (1 << 8)
#define VIRGL_CAP_ROBUST_BUFFER_ACCESS (1 << 9) #define VIRGL_CAP_ROBUST_BUFFER_ACCESS (1 << 9)
#define VIRGL_CAP_TGSI_FBFETCH (1 << 10)
/* virgl bind flags - these are compatible with mesa 10.5 gallium. /* virgl bind flags - these are compatible with mesa 10.5 gallium.
* but are fixed, no other should be passed to virgl either. * but are fixed, no other should be passed to virgl either.

@ -102,6 +102,7 @@ enum features_id
feat_draw_instance, feat_draw_instance,
feat_dual_src_blend, feat_dual_src_blend,
feat_fb_no_attach, feat_fb_no_attach,
feat_framebuffer_fetch,
feat_geometry_shader, feat_geometry_shader,
feat_gl_conditional_render, feat_gl_conditional_render,
feat_gl_prim_restart, feat_gl_prim_restart,
@ -161,6 +162,7 @@ static const struct {
[feat_draw_instance] = { 31, 30, { "GL_ARB_draw_instanced" } }, [feat_draw_instance] = { 31, 30, { "GL_ARB_draw_instanced" } },
[feat_dual_src_blend] = { 33, UNAVAIL, { "GL_ARB_blend_func_extended" } }, [feat_dual_src_blend] = { 33, UNAVAIL, { "GL_ARB_blend_func_extended" } },
[feat_fb_no_attach] = { 43, 31, { "GL_ARB_framebuffer_no_attachments" } }, [feat_fb_no_attach] = { 43, 31, { "GL_ARB_framebuffer_no_attachments" } },
[feat_framebuffer_fetch] = { UNAVAIL, UNAVAIL, { "GL_EXT_shader_framebuffer_fetch" } },
[feat_geometry_shader] = { 32, UNAVAIL, {} }, [feat_geometry_shader] = { 32, UNAVAIL, {} },
[feat_gl_conditional_render] = { 30, UNAVAIL, {} }, [feat_gl_conditional_render] = { 30, UNAVAIL, {} },
[feat_gl_prim_restart] = { 31, UNAVAIL, {} }, [feat_gl_prim_restart] = { 31, UNAVAIL, {} },
@ -8226,6 +8228,9 @@ void vrend_renderer_fill_caps(uint32_t set, UNUSED uint32_t version,
if (has_feature(feat_robust_buffer_access)) if (has_feature(feat_robust_buffer_access))
caps->v2.capability_bits |= VIRGL_CAP_ROBUST_BUFFER_ACCESS; caps->v2.capability_bits |= VIRGL_CAP_ROBUST_BUFFER_ACCESS;
if (has_feature(feat_framebuffer_fetch))
caps->v2.capability_bits |= VIRGL_CAP_TGSI_FBFETCH;
} }
GLint64 vrend_renderer_get_timestamp(void) GLint64 vrend_renderer_get_timestamp(void)

Loading…
Cancel
Save