r600g/radeonsi: send endian info to format translation functions
Because r600 GPUs can't do swap in their DB unit, we need to disable endianess swapping for textures that are handled by DB. There are four format translation functions in r600g driver: - r600_translate_texformat - r600_colorformat_endian_swap - r600_translate_colorformat - r600_translate_colorswap This patch adds a new parameters to those functions, called "do_endian_swap". When running in a big-endian machine, the calling functions will check whether the texture/color is handled by DB - "rtex->is_depth && !rtex->is_flushing_texture" - and if so, they will send FALSE through this parameter. Otherwise, they will send TRUE. The translation functions, in specific cases, will look at this parameter and configure the swapping accordingly. v4: evergreen_init_color_surface_rat() is only used by compute and don't handle DB surfaces, so just sent hard-coded FALSE to translation functions when called by it. Signed-off-by:Oded Gabbay <oded.gabbay@gmail.com> Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org> Reviewed-by:
Marek Olšák <marek.olsak@amd.com> (cherry picked from commit 2242dbe1) Squashed with commit radeonsi: fix build error because of missing param Signed-off-by:
Oded Gabbay <oded.gabbay@gmail.com> Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 514c5b5f) Fixes: 2242dbe1 "r600g/radeonsi: send endian info to format translation functions"
Showing
- src/gallium/drivers/r600/evergreen_state.c 21 additions, 12 deletionssrc/gallium/drivers/r600/evergreen_state.c
- src/gallium/drivers/r600/r600_pipe.h 5 additions, 3 deletionssrc/gallium/drivers/r600/r600_pipe.h
- src/gallium/drivers/r600/r600_state.c 18 additions, 9 deletionssrc/gallium/drivers/r600/r600_state.c
- src/gallium/drivers/r600/r600_state_common.c 5 additions, 3 deletionssrc/gallium/drivers/r600/r600_state_common.c
- src/gallium/drivers/radeon/r600_pipe_common.h 1 addition, 1 deletionsrc/gallium/drivers/radeon/r600_pipe_common.h
- src/gallium/drivers/radeon/r600_texture.c 2 additions, 2 deletionssrc/gallium/drivers/radeon/r600_texture.c
- src/gallium/drivers/radeonsi/si_state.c 3 additions, 3 deletionssrc/gallium/drivers/radeonsi/si_state.c
Loading
Please register or sign in to comment