|
|
|
@ -267,7 +267,7 @@ int testvirgl_create_backed_simple_buffer(struct virgl_resource *res, |
|
|
|
|
return 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
uint32_t testvirgl_get_glsl_level_from_caps(void) |
|
|
|
|
static void *get_caps(void) |
|
|
|
|
{ |
|
|
|
|
uint32_t max_ver, max_size, glsl_level; |
|
|
|
|
void *caps; |
|
|
|
@ -276,11 +276,16 @@ uint32_t testvirgl_get_glsl_level_from_caps(void) |
|
|
|
|
ck_assert_int_eq(max_ver, 1); |
|
|
|
|
ck_assert_int_ne(max_size, 0); |
|
|
|
|
ck_assert_int_eq(max_size, sizeof(struct virgl_caps_v1)); |
|
|
|
|
|
|
|
|
|
caps = malloc(max_size); |
|
|
|
|
|
|
|
|
|
virgl_renderer_fill_caps(0, 0, caps); |
|
|
|
|
return caps; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
uint32_t testvirgl_get_glsl_level_from_caps(void) |
|
|
|
|
{ |
|
|
|
|
uint32_t glsl_level; |
|
|
|
|
void *caps = get_caps(); |
|
|
|
|
struct virgl_caps_v1 *v1 = (struct virgl_caps_v1*) caps; |
|
|
|
|
glsl_level = v1->glsl_level; |
|
|
|
|
|
|
|
|
@ -291,18 +296,8 @@ uint32_t testvirgl_get_glsl_level_from_caps(void) |
|
|
|
|
|
|
|
|
|
unsigned testvirgl_get_multisample_from_caps(void) |
|
|
|
|
{ |
|
|
|
|
uint32_t max_ver, max_size; |
|
|
|
|
void *caps = get_caps(); |
|
|
|
|
unsigned multisample; |
|
|
|
|
void *caps; |
|
|
|
|
|
|
|
|
|
virgl_renderer_get_cap_set(1, &max_ver, &max_size); |
|
|
|
|
ck_assert_int_eq(max_ver, 1); |
|
|
|
|
ck_assert_int_ne(max_size, 0); |
|
|
|
|
ck_assert_int_eq(max_size, sizeof(struct virgl_caps_v1)); |
|
|
|
|
|
|
|
|
|
caps = malloc(max_size); |
|
|
|
|
|
|
|
|
|
virgl_renderer_fill_caps(0, 0, caps); |
|
|
|
|
|
|
|
|
|
struct virgl_caps_v1 *v1 = (struct virgl_caps_v1*) caps; |
|
|
|
|
multisample = v1->bset.texture_multisample; |
|
|
|
|