mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
i965/tiled_memcopy: Get rid of the direction parameter to get_memcpy
Now that we can use the much simpler rgba8_copy function, we don't need to hand different functions out based on direction. Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Chad Versace <chad.versace@intel.com>
This commit is contained in:
parent
d2b32656e1
commit
6cc7aec5b0
5 changed files with 5 additions and 22 deletions
|
|
@ -141,8 +141,7 @@ intel_readpixels_tiled_memcpy(struct gl_context * ctx,
|
|||
if (rb->_BaseFormat == GL_RGB)
|
||||
return false;
|
||||
|
||||
if (!intel_get_memcpy(rb->Format, format, type, &mem_copy, &cpp,
|
||||
INTEL_DOWNLOAD))
|
||||
if (!intel_get_memcpy(rb->Format, format, type, &mem_copy, &cpp))
|
||||
return false;
|
||||
|
||||
if (!irb->mt ||
|
||||
|
|
|
|||
|
|
@ -404,8 +404,7 @@ intel_gettexsubimage_tiled_memcpy(struct gl_context *ctx,
|
|||
if (texImage->_BaseFormat == GL_RGB)
|
||||
return false;
|
||||
|
||||
if (!intel_get_memcpy(texImage->TexFormat, format, type, &mem_copy, &cpp,
|
||||
INTEL_DOWNLOAD))
|
||||
if (!intel_get_memcpy(texImage->TexFormat, format, type, &mem_copy, &cpp))
|
||||
return false;
|
||||
|
||||
/* If this is a nontrivial texture view, let another path handle it instead. */
|
||||
|
|
|
|||
|
|
@ -119,8 +119,7 @@ intel_texsubimage_tiled_memcpy(struct gl_context * ctx,
|
|||
if (ctx->_ImageTransferState)
|
||||
return false;
|
||||
|
||||
if (!intel_get_memcpy(texImage->TexFormat, format, type, &mem_copy, &cpp,
|
||||
INTEL_UPLOAD))
|
||||
if (!intel_get_memcpy(texImage->TexFormat, format, type, &mem_copy, &cpp))
|
||||
return false;
|
||||
|
||||
/* If this is a nontrivial texture view, let another path handle it instead. */
|
||||
|
|
|
|||
|
|
@ -745,8 +745,7 @@ tiled_to_linear(uint32_t xt1, uint32_t xt2,
|
|||
* \return true if the format and type combination are valid
|
||||
*/
|
||||
bool intel_get_memcpy(mesa_format tiledFormat, GLenum format,
|
||||
GLenum type, mem_copy_fn *mem_copy, uint32_t *cpp,
|
||||
enum intel_memcpy_direction direction)
|
||||
GLenum type, mem_copy_fn *mem_copy, uint32_t *cpp)
|
||||
{
|
||||
if (type == GL_UNSIGNED_INT_8_8_8_8_REV &&
|
||||
!(format == GL_RGBA || format == GL_BGRA))
|
||||
|
|
|
|||
|
|
@ -55,20 +55,7 @@ tiled_to_linear(uint32_t xt1, uint32_t xt2,
|
|||
uint32_t tiling,
|
||||
mem_copy_fn mem_copy);
|
||||
|
||||
/* Tells intel_get_memcpy() whether the memcpy() is
|
||||
*
|
||||
* - an upload to the GPU with an aligned destination and a potentially
|
||||
* unaligned source; or
|
||||
* - a download from the GPU with an aligned source and a potentially
|
||||
* unaligned destination.
|
||||
*/
|
||||
enum intel_memcpy_direction {
|
||||
INTEL_UPLOAD,
|
||||
INTEL_DOWNLOAD
|
||||
};
|
||||
|
||||
bool intel_get_memcpy(mesa_format tiledFormat, GLenum format,
|
||||
GLenum type, mem_copy_fn *mem_copy, uint32_t *cpp,
|
||||
enum intel_memcpy_direction direction);
|
||||
GLenum type, mem_copy_fn *mem_copy, uint32_t *cpp);
|
||||
|
||||
#endif /* INTEL_TILED_MEMCPY */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue