mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-01 13:20:25 +01:00
i965: Accelerate uploads of RGBA and BGRA GL_UNSIGNED_INT_8_8_8_8_REV textures
Since intel is always going to be little-endian, GL_UNSIGNED_INT_8_8_8_8_REV is the same as GL_UNSIGNED_BYTE for RGBA and BGRA textures, so the same acceleration code will work. We might as well use it. Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
5072d0e7fc
commit
6bac86cd85
1 changed files with 5 additions and 1 deletions
|
|
@ -560,7 +560,7 @@ intel_texsubimage_tiled_memcpy(struct gl_context * ctx,
|
|||
* we need tests.
|
||||
*/
|
||||
if (!brw->has_llc ||
|
||||
type != GL_UNSIGNED_BYTE ||
|
||||
!(type == GL_UNSIGNED_BYTE || type == GL_UNSIGNED_INT_8_8_8_8_REV) ||
|
||||
texImage->TexObject->Target != GL_TEXTURE_2D ||
|
||||
pixels == NULL ||
|
||||
_mesa_is_bufferobj(packing->BufferObj) ||
|
||||
|
|
@ -573,6 +573,10 @@ intel_texsubimage_tiled_memcpy(struct gl_context * ctx,
|
|||
packing->Invert)
|
||||
return false;
|
||||
|
||||
if (type == GL_UNSIGNED_INT_8_8_8_8_REV &&
|
||||
!(format == GL_RGBA || format == GL_BGRA))
|
||||
return false; /* Invalid type/format combination */
|
||||
|
||||
if ((texImage->TexFormat == MESA_FORMAT_L_UNORM8 && format == GL_LUMINANCE) ||
|
||||
(texImage->TexFormat == MESA_FORMAT_A_UNORM8 && format == GL_ALPHA)) {
|
||||
cpp = 1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue