If the guest is creating texture and the memory comes from buffer object by creating GL_TEXTURE_BUFFER, then host creates GL_TEXTURE_BUFFER too. No texture parameters can be set for GL_TEXTURE_BUFFER. If there is mismatch between the guest texture format and the host texture format, for example GL_ALPHA8(guest) and GL_R8(host), then we can't apply swizzling for such textures. In such case, add manually swizzling in GLSL shader generation step. The logic of this patch: 1. Add additional fields in shader key struct 2. During draw_vbo call check if "manual swizzling" is needed 3. If yes, the add fields in key struct and generate shader again 4. During generation of for example texelFetch instruction in GLSL put additional instruction for swizzling Reviewed-by: Gert Wollny <gert.wollny@collabora.com>macos/master
parent
00b2cb688c
commit
729c6b9177
Loading…
Reference in new issue