vrend: Enable texture_multisample for GLES

Just set the cap if we have GLES 3.0 and call the
glTexStorage*DMultisample functions as appropriate.

Causes a bunch of the tests in
dEQP-GLES3.functional.fbo.msaa.*_samples to pass.

Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
macos/master
Tomeu Vizoso 7 years ago committed by Jakob Bornecrantz
parent de8528cd1c
commit 25165ad72a
  1. 20
      src/vrend_renderer.c

@ -4670,8 +4670,17 @@ int vrend_renderer_resource_create(struct vrend_renderer_resource_create_args *a
if (args->nr_samples > 1) { if (args->nr_samples > 1) {
if (vrend_state.use_gles) { if (vrend_state.use_gles) {
report_gles_missing_func(NULL, "glTexImage[2,3]DMultisample"); if (gr->target == GL_TEXTURE_2D_MULTISAMPLE) {
} else if (gr->target == GL_TEXTURE_2D_MULTISAMPLE) { glTexStorage2DMultisample(gr->target, args->nr_samples,
internalformat, args->width, args->height,
GL_TRUE);
} else {
glTexStorage3DMultisample(gr->target, args->nr_samples,
internalformat, args->width, args->height, args->array_size,
GL_TRUE);
}
} else {
if (gr->target == GL_TEXTURE_2D_MULTISAMPLE) {
glTexImage2DMultisample(gr->target, args->nr_samples, glTexImage2DMultisample(gr->target, args->nr_samples,
internalformat, args->width, args->height, internalformat, args->width, args->height,
GL_TRUE); GL_TRUE);
@ -4680,6 +4689,7 @@ int vrend_renderer_resource_create(struct vrend_renderer_resource_create_args *a
internalformat, args->width, args->height, args->array_size, internalformat, args->width, args->height, args->array_size,
GL_TRUE); GL_TRUE);
} }
}
} else if (gr->target == GL_TEXTURE_CUBE_MAP) { } else if (gr->target == GL_TEXTURE_CUBE_MAP) {
int i; int i;
@ -6691,8 +6701,6 @@ void vrend_renderer_fill_caps_gles(uint32_t set, uint32_t version,
caps->v1.bset.seamless_cube_map_per_texture = 0; caps->v1.bset.seamless_cube_map_per_texture = 0;
caps->v1.bset.texture_multisample = 0;
caps->v1.bset.mirror_clamp = 0; caps->v1.bset.mirror_clamp = 0;
caps->v1.bset.indep_blend_func = 0; caps->v1.bset.indep_blend_func = 0;
caps->v1.bset.cube_map_array = 0; caps->v1.bset.cube_map_array = 0;
@ -6722,6 +6730,10 @@ void vrend_renderer_fill_caps_gles(uint32_t set, uint32_t version,
caps->v1.bset.primitive_restart = 1; caps->v1.bset.primitive_restart = 1;
} }
if (gles_ver >= 30) {
caps->v1.bset.texture_multisample = 1;
}
if (!fill_capset2) { if (!fill_capset2) {
return; return;
} }

Loading…
Cancel
Save