aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/teximage.c
diff options
context:
space:
mode:
authorHenri Verbeet <[email protected]>2018-03-26 19:06:08 +0430
committerHenri Verbeet <[email protected]>2018-03-29 14:38:25 +0430
commit0b73c86b8030a7f7cb35fc85c83eff7f2b8c24a4 (patch)
tree2a89d8402c0741d9874be587e6f1970c12865c97 /src/mesa/main/teximage.c
parente45fe0ed66af32a36b03d5a5141e68fad0d15e6a (diff)
mesa: Inherit texture view multi-sample information from the original texture images.
Found running "The Witness" in Wine. Without this patch, texture views created on multi-sample textures would have a GL_TEXTURE_SAMPLES of 0. All things considered such views actually work surprisingly well, but when combined with (plain) multi-sample textures in a framebuffer object, the resulting FBO is incomplete because the sample counts don't match. CC: <[email protected]> Signed-off-by: Henri Verbeet <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main/teximage.c')
-rw-r--r--src/mesa/main/teximage.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 9e139d746f1..8f5351085c5 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -837,8 +837,8 @@ clear_teximage_fields(struct gl_texture_image *img)
* Fills in the fields of \p img with the given information.
* Note: width, height and depth include the border.
*/
-static void
-init_teximage_fields_ms(struct gl_context *ctx,
+void
+_mesa_init_teximage_fields_ms(struct gl_context *ctx,
struct gl_texture_image *img,
GLsizei width, GLsizei height, GLsizei depth,
GLint border, GLenum internalFormat,
@@ -950,8 +950,8 @@ _mesa_init_teximage_fields(struct gl_context *ctx,
GLint border, GLenum internalFormat,
mesa_format format)
{
- init_teximage_fields_ms(ctx, img, width, height, depth, border,
- internalFormat, format, 0, GL_TRUE);
+ _mesa_init_teximage_fields_ms(ctx, img, width, height, depth, border,
+ internalFormat, format, 0, GL_TRUE);
}
@@ -5891,9 +5891,9 @@ texture_image_multisample(struct gl_context *ctx, GLuint dims,
if (_mesa_is_proxy_texture(target)) {
if (samplesOK && dimensionsOK && sizeOK) {
- init_teximage_fields_ms(ctx, texImage, width, height, depth, 0,
- internalformat, texFormat,
- samples, fixedsamplelocations);
+ _mesa_init_teximage_fields_ms(ctx, texImage, width, height, depth, 0,
+ internalformat, texFormat,
+ samples, fixedsamplelocations);
}
else {
/* clear all image fields */
@@ -5920,9 +5920,9 @@ texture_image_multisample(struct gl_context *ctx, GLuint dims,
ctx->Driver.FreeTextureImageBuffer(ctx, texImage);
- init_teximage_fields_ms(ctx, texImage, width, height, depth, 0,
- internalformat, texFormat,
- samples, fixedsamplelocations);
+ _mesa_init_teximage_fields_ms(ctx, texImage, width, height, depth, 0,
+ internalformat, texFormat,
+ samples, fixedsamplelocations);
if (width > 0 && height > 0 && depth > 0) {
if (memObj) {