This commit is contained in:
Subv 2015-08-16 20:49:43 -05:00
parent 3b6c037ba2
commit c5f0d83ed4
2 changed files with 16 additions and 16 deletions

View file

@ -852,18 +852,18 @@ void RasterizerOpenGL::ReloadColorBuffer() {
using VideoCore::CopyTextureAndUntile;
switch (bytes_per_pixel) {
case 4:
CopyTextureAndUntile<u32>(reinterpret_cast<u32*>(temp_fb_color_buffer.get()),
reinterpret_cast<u32*>(color_buffer),
CopyTextureAndUntile<u32>(reinterpret_cast<u32*>(color_buffer),
reinterpret_cast<u32*>(temp_fb_color_buffer.get()),
fb_color_texture.width, fb_color_texture.height);
break;
case 3:
CopyTextureAndUntile<u24_be>(reinterpret_cast<u24_be*>(temp_fb_color_buffer.get()),
reinterpret_cast<u24_be*>(color_buffer),
CopyTextureAndUntile<u24_be>(reinterpret_cast<u24_be*>(color_buffer),
reinterpret_cast<u24_be*>(temp_fb_color_buffer.get()),
fb_color_texture.width, fb_color_texture.height);
break;
case 2:
CopyTextureAndUntile<u16>(reinterpret_cast<u16*>(temp_fb_color_buffer.get()),
reinterpret_cast<u16*>(color_buffer),
CopyTextureAndUntile<u16>(reinterpret_cast<u16*>(color_buffer),
reinterpret_cast<u16*>(temp_fb_color_buffer.get()),
fb_color_texture.width, fb_color_texture.height);
break;
default:
@ -975,18 +975,18 @@ void RasterizerOpenGL::CommitColorBuffer() {
using VideoCore::CopyTextureAndTile;
switch (bytes_per_pixel) {
case 4:
CopyTextureAndTile<u32>(reinterpret_cast<u32*>(color_buffer),
reinterpret_cast<u32*>(temp_gl_color_buffer.get()),
CopyTextureAndTile<u32>(reinterpret_cast<u32*>(temp_gl_color_buffer.get()),
reinterpret_cast<u32*>(color_buffer),
fb_color_texture.width, fb_color_texture.height);
break;
case 3:
CopyTextureAndTile<u24_be>(reinterpret_cast<u24_be*>(color_buffer),
reinterpret_cast<u24_be*>(temp_gl_color_buffer.get()),
CopyTextureAndTile<u24_be>(reinterpret_cast<u24_be*>(temp_gl_color_buffer.get()),
reinterpret_cast<u24_be*>(color_buffer),
fb_color_texture.width, fb_color_texture.height);
break;
case 2:
CopyTextureAndTile<u16>(reinterpret_cast<u16*>(color_buffer),
reinterpret_cast<u16*>(temp_gl_color_buffer.get()),
CopyTextureAndTile<u16>(reinterpret_cast<u16*>(temp_gl_color_buffer.get()),
reinterpret_cast<u16*>(color_buffer),
fb_color_texture.width, fb_color_texture.height);
break;
default:

View file

@ -62,13 +62,13 @@ static inline u32 MortonInterleave(u32 x, u32 y) {
*
* @param T Type of the source and destination pointers, the swizzling process depends on the size
* of this parameter.
* @param dst Pointer to which the texture will be copied.
* @param src Pointer to the source texture data.
* @param dst Pointer to which the texture will be copied.
* @param width Width of the texture, should be a multiple of 8.
* @param height Height of the texture, should be a multiple of 8.
*/
template<typename T>
static inline void CopyTextureAndTile(T* dst, const T* src, unsigned int width, unsigned int height) {
static inline void CopyTextureAndTile(const T* src, T* dst, unsigned int width, unsigned int height) {
for (unsigned int y = 0; y + 8 <= height; y += 8) {
for (unsigned int x = 0; x + 8 <= width; x += 8) {
const T* line = &src[y * width + x];
@ -90,13 +90,13 @@ static inline void CopyTextureAndTile(T* dst, const T* src, unsigned int width,
*
* @param T Type of the source and destination pointers, the swizzling process depends on the size
* of this parameter.
* @param dst Pointer to which the texture will be copied.
* @param src Pointer to the source texture data.
* @param dst Pointer to which the texture will be copied.
* @param width Width of the texture, should be a multiple of 8.
* @param height Height of the texture, should be a multiple of 8.
*/
template<typename T>
static inline void CopyTextureAndUntile(T* dst, const T* src, unsigned int width, unsigned int height) {
static inline void CopyTextureAndUntile(const T* src, T* dst, unsigned int width, unsigned int height) {
for (unsigned int y = 0; y + 8 <= height; y += 8) {
for (unsigned int x = 0; x + 8 <= width; x += 8) {
T* line = &dst[y * width + x];