renderer: expose TXQS capability to guest.

This lets the guest know it can use the TXQS opcode

Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
macos/master
Dave Airlie 7 years ago
parent f565193a1f
commit de61327cb1
  1. 1
      src/virgl_hw.h
  2. 5
      src/vrend_renderer.c

@ -222,6 +222,7 @@ enum virgl_formats {
#define VIRGL_CAP_SET_MIN_SAMPLES (1 << 2)
#define VIRGL_CAP_COPY_IMAGE (1 << 3)
#define VIRGL_CAP_TGSI_PRECISE (1 << 4)
#define VIRGL_CAP_TXQS (1 << 5)
/* virgl bind flags - these are compatible with mesa 10.5 gallium.
* but are fixed, no other should be passed to virgl either.

@ -129,6 +129,7 @@ enum features_id
feat_transform_feedback2,
feat_transform_feedback3,
feat_transform_feedback_overflow_query,
feat_txqs,
feat_ubo,
feat_viewport_array,
feat_last,
@ -182,6 +183,7 @@ static const struct {
[feat_transform_feedback2] = { 40, 30, { "GL_ARB_transform_feedback2" } },
[feat_transform_feedback3] = { 40, UNAVAIL, { "GL_ARB_transform_feedback3" } },
[feat_transform_feedback_overflow_query] = { 46, UNAVAIL, { "GL_ARB_transform_feedback_overflow_query" } },
[feat_txqs] = { 45, UNAVAIL, { "GL_ARB_shader_texture_image_samples" } },
[feat_ubo] = { 31, 30, { "GL_ARB_uniform_buffer_object" } },
[feat_viewport_array] = { 41, UNAVAIL, { "GL_ARB_viewport_array" } },
};
@ -7984,6 +7986,9 @@ void vrend_renderer_fill_caps(uint32_t set, UNUSED uint32_t version,
if (has_feature(feat_texture_view))
caps->v2.capability_bits |= VIRGL_CAP_TEXTURE_VIEW;
if (has_feature(feat_txqs))
caps->v2.capability_bits |= VIRGL_CAP_TXQS;
if (has_feature(feat_copy_image))
caps->v2.capability_bits |= VIRGL_CAP_COPY_IMAGE;
}

Loading…
Cancel
Save