virgl: move virgl_capsets to virglrenderer_hw.h

And rename it to virgl_renderer_capset.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
macos/master
Chia-I Wu 4 years ago
parent afaa281a90
commit c5663614be
  1. 7
      src/virgl_hw.h
  2. 9
      src/virglrenderer.c
  3. 7
      src/virglrenderer_hw.h

@ -370,13 +370,6 @@ enum virgl_formats {
VIRGL_FORMAT_MAX_EXTENDED VIRGL_FORMAT_MAX_EXTENDED
}; };
#ifdef VIRGL_RENDERER_UNSTABLE_APIS
enum virgl_capsets {
VIRGL_CAPSET_VIRGL = 1,
VIRGL_CAPSET_VIRGL2 = 2,
};
#endif
/* These are used by the capability_bits field in virgl_caps_v2. */ /* These are used by the capability_bits field in virgl_caps_v2. */
#define VIRGL_CAP_NONE 0 #define VIRGL_CAP_NONE 0
#define VIRGL_CAP_TGSI_INVARIANT (1 << 0) #define VIRGL_CAP_TGSI_INVARIANT (1 << 0)

@ -37,6 +37,7 @@
#include "vrend_renderer.h" #include "vrend_renderer.h"
#include "virglrenderer.h" #include "virglrenderer.h"
#include "virglrenderer_hw.h"
#include "virgl_context.h" #include "virgl_context.h"
#include "virgl_resource.h" #include "virgl_resource.h"
@ -148,10 +149,10 @@ void virgl_renderer_fill_caps(uint32_t set, uint32_t version,
void *caps) void *caps)
{ {
switch (set) { switch (set) {
case VIRGL_CAPSET_VIRGL: case VIRGL_RENDERER_CAPSET_VIRGL:
vrend_renderer_fill_caps(VREND_CAP_SET, version, (union virgl_caps *)caps); vrend_renderer_fill_caps(VREND_CAP_SET, version, (union virgl_caps *)caps);
break; break;
case VIRGL_CAPSET_VIRGL2: case VIRGL_RENDERER_CAPSET_VIRGL2:
vrend_renderer_fill_caps(VREND_CAP_SET2, version, (union virgl_caps *)caps); vrend_renderer_fill_caps(VREND_CAP_SET2, version, (union virgl_caps *)caps);
break; break;
default: default:
@ -356,10 +357,10 @@ void virgl_renderer_get_cap_set(uint32_t cap_set, uint32_t *max_ver,
uint32_t *max_size) uint32_t *max_size)
{ {
switch (cap_set) { switch (cap_set) {
case VIRGL_CAPSET_VIRGL: case VIRGL_RENDERER_CAPSET_VIRGL:
vrend_renderer_get_cap_set(VREND_CAP_SET, max_ver, max_size); vrend_renderer_get_cap_set(VREND_CAP_SET, max_ver, max_size);
break; break;
case VIRGL_CAPSET_VIRGL2: case VIRGL_RENDERER_CAPSET_VIRGL2:
vrend_renderer_get_cap_set(VREND_CAP_SET2, max_ver, max_size); vrend_renderer_get_cap_set(VREND_CAP_SET2, max_ver, max_size);
break; break;
default: default:

@ -26,4 +26,11 @@
#include "virgl_hw.h" #include "virgl_hw.h"
#ifdef VIRGL_RENDERER_UNSTABLE_APIS
enum virgl_renderer_capset {
VIRGL_RENDERER_CAPSET_VIRGL = 1,
VIRGL_RENDERER_CAPSET_VIRGL2 = 2,
};
#endif
#endif /* VIRGLRENDERER_HW_H */ #endif /* VIRGLRENDERER_HW_H */

Loading…
Cancel
Save