vrend: add VREND_CAPSET_SET* back

This partially reverts commit 5e96edf216 (virgl: add enum virgl_capsets
to virgl_hw.h).
macos/master
Chia-I Wu 4 years ago
parent c49b09b71d
commit afaa281a90
  1. 8
      src/virglrenderer.c
  2. 4
      src/vrend_renderer.c
  3. 3
      src/vrend_renderer.h

@ -149,8 +149,10 @@ void virgl_renderer_fill_caps(uint32_t set, uint32_t version,
{ {
switch (set) { switch (set) {
case VIRGL_CAPSET_VIRGL: case VIRGL_CAPSET_VIRGL:
vrend_renderer_fill_caps(VREND_CAP_SET, version, (union virgl_caps *)caps);
break;
case VIRGL_CAPSET_VIRGL2: 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; break;
default: default:
break; break;
@ -355,8 +357,10 @@ void virgl_renderer_get_cap_set(uint32_t cap_set, uint32_t *max_ver,
{ {
switch (cap_set) { switch (cap_set) {
case VIRGL_CAPSET_VIRGL: case VIRGL_CAPSET_VIRGL:
vrend_renderer_get_cap_set(VREND_CAP_SET, max_ver, max_size);
break;
case VIRGL_CAPSET_VIRGL2: 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; break;
default: default:
*max_ver = 0; *max_ver = 0;

@ -10332,11 +10332,11 @@ void vrend_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 VREND_CAP_SET:
*max_ver = 1; *max_ver = 1;
*max_size = sizeof(struct virgl_caps_v1); *max_size = sizeof(struct virgl_caps_v1);
break; 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 */ /* we should never need to increase this - it should be possible to just grow virgl_caps */
*max_ver = 2; *max_ver = 2;
*max_size = sizeof(struct virgl_caps_v2); *max_size = sizeof(struct virgl_caps_v2);

@ -434,6 +434,9 @@ struct vrend_renderer_resource_info {
int vrend_renderer_resource_get_info(struct pipe_resource *pres, int vrend_renderer_resource_get_info(struct pipe_resource *pres,
struct vrend_renderer_resource_info *info); 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, void vrend_renderer_get_cap_set(uint32_t cap_set, uint32_t *max_ver,
uint32_t *max_size); uint32_t *max_size);

Loading…
Cancel
Save