diff --git a/src/virglrenderer.c b/src/virglrenderer.c index cd473b0..ab3dc75 100644 --- a/src/virglrenderer.c +++ b/src/virglrenderer.c @@ -149,8 +149,10 @@ void virgl_renderer_fill_caps(uint32_t set, uint32_t version, { switch (set) { case VIRGL_CAPSET_VIRGL: + vrend_renderer_fill_caps(VREND_CAP_SET, version, (union virgl_caps *)caps); + break; case VIRGL_CAPSET_VIRGL2: - vrend_renderer_fill_caps(set, version, (union virgl_caps *)caps); + vrend_renderer_fill_caps(VREND_CAP_SET2, version, (union virgl_caps *)caps); break; default: break; @@ -355,8 +357,10 @@ void virgl_renderer_get_cap_set(uint32_t cap_set, uint32_t *max_ver, { switch (cap_set) { case VIRGL_CAPSET_VIRGL: + vrend_renderer_get_cap_set(VREND_CAP_SET, max_ver, max_size); + break; case VIRGL_CAPSET_VIRGL2: - vrend_renderer_get_cap_set(cap_set, max_ver, max_size); + vrend_renderer_get_cap_set(VREND_CAP_SET2, max_ver, max_size); break; default: *max_ver = 0; diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index ab29f10..9c34530 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -10332,11 +10332,11 @@ void vrend_renderer_get_cap_set(uint32_t cap_set, uint32_t *max_ver, uint32_t *max_size) { switch (cap_set) { - case VIRGL_CAPSET_VIRGL: + case VREND_CAP_SET: *max_ver = 1; *max_size = sizeof(struct virgl_caps_v1); break; - case VIRGL_CAPSET_VIRGL2: + case VREND_CAP_SET2: /* we should never need to increase this - it should be possible to just grow virgl_caps */ *max_ver = 2; *max_size = sizeof(struct virgl_caps_v2); diff --git a/src/vrend_renderer.h b/src/vrend_renderer.h index 26ec08e..424d750 100644 --- a/src/vrend_renderer.h +++ b/src/vrend_renderer.h @@ -434,6 +434,9 @@ struct vrend_renderer_resource_info { int vrend_renderer_resource_get_info(struct pipe_resource *pres, struct vrend_renderer_resource_info *info); +#define VREND_CAP_SET 1 +#define VREND_CAP_SET2 2 + void vrend_renderer_get_cap_set(uint32_t cap_set, uint32_t *max_ver, uint32_t *max_size);