diff --git a/src/virglrenderer.c b/src/virglrenderer.c index 59d3e7b..b09e2a2 100644 --- a/src/virglrenderer.c +++ b/src/virglrenderer.c @@ -152,10 +152,8 @@ void virgl_renderer_fill_caps(uint32_t set, uint32_t version, { switch (set) { case VIRGL_RENDERER_CAPSET_VIRGL: - vrend_renderer_fill_caps(VREND_CAP_SET, version, (union virgl_caps *)caps); - break; case VIRGL_RENDERER_CAPSET_VIRGL2: - vrend_renderer_fill_caps(VREND_CAP_SET2, version, (union virgl_caps *)caps); + vrend_renderer_fill_caps(set, version, (union virgl_caps *)caps); break; default: break; @@ -361,10 +359,8 @@ void virgl_renderer_get_cap_set(uint32_t cap_set, uint32_t *max_ver, { switch (cap_set) { case VIRGL_RENDERER_CAPSET_VIRGL: - vrend_renderer_get_cap_set(VREND_CAP_SET, max_ver, max_size); - break; case VIRGL_RENDERER_CAPSET_VIRGL2: - vrend_renderer_get_cap_set(VREND_CAP_SET2, max_ver, max_size); + vrend_renderer_get_cap_set(cap_set, max_ver, max_size); break; default: *max_ver = 0; diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index 6c74d4d..2b97c94 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -54,6 +54,7 @@ #include "virgl_hw.h" #include "virgl_resource.h" #include "virglrenderer.h" +#include "virglrenderer_hw.h" #include "tgsi/tgsi_text.h" @@ -10354,11 +10355,11 @@ void vrend_renderer_get_cap_set(uint32_t cap_set, uint32_t *max_ver, uint32_t *max_size) { switch (cap_set) { - case VREND_CAP_SET: + case VIRGL_RENDERER_CAPSET_VIRGL: *max_ver = 1; *max_size = sizeof(struct virgl_caps_v1); break; - case VREND_CAP_SET2: + case VIRGL_RENDERER_CAPSET_VIRGL2: /* 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 afb900b..da4ffe9 100644 --- a/src/vrend_renderer.h +++ b/src/vrend_renderer.h @@ -426,9 +426,6 @@ struct vrend_renderer_resource_info { void 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);