[Mesa-dev] [PATCH 2/2] Add support for RGBA8 and RGBX8 textures in intel_texsubimage_tiled_memcpy
Kenneth Graunke
kenneth at whitecape.org
Thu Jul 17 16:23:34 PDT 2014
On Thursday, July 17, 2014 02:41:31 PM Jason Ekstrand wrote:
> Signed-off-by: Jason Ekstrand <jason.ekstrand at intel.com>
> ---
> src/mesa/drivers/dri/i965/intel_tex_subimage.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/src/mesa/drivers/dri/i965/intel_tex_subimage.c b/src/mesa/drivers/dri/i965/intel_tex_subimage.c
> index 04cbc4c..4043eb7 100644
> --- a/src/mesa/drivers/dri/i965/intel_tex_subimage.c
> +++ b/src/mesa/drivers/dri/i965/intel_tex_subimage.c
> @@ -585,6 +585,16 @@ intel_texsubimage_tiled_memcpy(struct gl_context * ctx,
> } else if (format == GL_RGBA) {
> mem_copy = rgba8_copy;
> }
> + } else if ((texImage->TexFormat == MESA_FORMAT_R8G8B8A8_UNORM) ||
> + (texImage->TexFormat == MESA_FORMAT_R8G8B8X8_UNORM)) {
> + cpp = 4;
> + if (format == GL_BGRA) {
> + /* Copying from RGBA to BGRA is the same as BGRA to RGBA so we can
> + * use the same function. */
*/ goes on a separate line.
Patch 2 is:
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
(patch 1 looks fine too but I didn't check it very thoroughly)
> + mem_copy = rgba8_copy;
> + } else if (format == GL_RGBA) {
> + mem_copy = memcpy;
> + }
> }
> if (!mem_copy)
> return false;
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140717/ddadb872/attachment.sig>
More information about the mesa-dev
mailing list