diff --git a/gfx/d3d9/d3d.hpp b/gfx/d3d9/d3d.hpp index 5b2533a1e0..ea4f9e4ef5 100644 --- a/gfx/d3d9/d3d.hpp +++ b/gfx/d3d9/d3d.hpp @@ -67,18 +67,6 @@ tex->UnlockRect(0); \ } #define D3DDevice_CreateVertexBuffers(device, Length, Usage, UnusedFVF, UnusedPool, ppVertexBuffer, pUnusedSharedHandle) device->CreateVertexBuffer(Length, Usage, UnusedFVF, UnusedPool, ppVertexBuffer, NULL) - -#define D3DTexture_Blit(d3d, desc, d3dlr, frame, width, height, pitch) \ - if (SUCCEEDED(first.tex->LockRect(0, &d3dlr, NULL, D3DLOCK_NOSYSLOCK))) \ - { \ - for (unsigned y = 0; y < height; y++) \ - { \ - const uint8_t *in = (const uint8_t*)frame + y * pitch; \ - uint8_t *out = (uint8_t*)d3dlr.pBits + y * d3dlr.Pitch; \ - memcpy(out, in, width * d3d->pixel_size); \ - } \ - first.tex->UnlockRect(0); \ - } #endif #ifdef HAVE_OVERLAY diff --git a/gfx/d3d9/d3d_wrapper.c b/gfx/d3d9/d3d_wrapper.c index 4663a79911..f04e47ee8d 100644 --- a/gfx/d3d9/d3d_wrapper.c +++ b/gfx/d3d9/d3d_wrapper.c @@ -200,7 +200,7 @@ HRESULT d3d_set_vertex_shader(LPDIRECT3DDEVICE dev, unsigned index, } -void d3d_textureblit(void *data, void *renderchain_data, +void d3d_texture_blit(void *data, void *renderchain_data, LPDIRECT3DTEXTURE tex, D3DSURFACE_DESC desc, D3DLOCKED_RECT lr, const void *frame, unsigned width, unsigned height, unsigned pitch) diff --git a/gfx/d3d9/d3d_wrapper.h b/gfx/d3d9/d3d_wrapper.h index 8a4b3b3937..11a019e0b1 100644 --- a/gfx/d3d9/d3d_wrapper.h +++ b/gfx/d3d9/d3d_wrapper.h @@ -56,7 +56,7 @@ void d3d_set_texture(LPDIRECT3DDEVICE dev, unsigned sampler, HRESULT d3d_set_vertex_shader(LPDIRECT3DDEVICE dev, unsigned index, void *data); -void d3d_textureblit(void *data, +void d3d_texture_blit(void *data, LPDIRECT3DTEXTURE tex, D3DSURFACE_DESC desc, D3DLOCKED_RECT lr, const void *frame, unsigned width, unsigned height, unsigned pitch); diff --git a/gfx/d3d9/render_chain.cpp b/gfx/d3d9/render_chain.cpp index 990a5fc7d3..6928671b6f 100644 --- a/gfx/d3d9/render_chain.cpp +++ b/gfx/d3d9/render_chain.cpp @@ -541,7 +541,7 @@ void renderchain_blit_to_texture(void *data, const void *frame, NULL, D3DLOCK_NOSYSLOCK); } - D3DTexture_Blit(chain, desc, d3dlr, frame, width, height, pitch); + d3d_texture_blit(chain, desc, d3dlr, frame, width, height, pitch); } void renderchain_render_pass(void *data, Pass &pass, unsigned pass_index) diff --git a/gfx/d3d9/render_chain_xdk.h b/gfx/d3d9/render_chain_xdk.h index 7b1b89945d..674c855762 100644 --- a/gfx/d3d9/render_chain_xdk.h +++ b/gfx/d3d9/render_chain_xdk.h @@ -5,20 +5,6 @@ static void renderchain_blit_to_texture(void *data, const void *frame, static void renderchain_set_mvp(void *data, unsigned vp_width, unsigned vp_height, unsigned rotation); static void renderchain_set_vertices(void *data, unsigned pass, unsigned width, unsigned height); -#if defined(_XBOX360) -#define D3DTexture_Blit(d3d, desc, d3dlr, frame, width, height, pitch) \ - d3d->tex->GetLevelDesc(0, &desc); \ - XGCopySurface(d3dlr.pBits, d3dlr.Pitch, width, height, desc.Format, NULL, frame, pitch, desc.Format, NULL, 0, 0) -#else -#define D3DTexture_Blit(d3d, desc, d3dlr, frame, width, height, pitch) \ - for (unsigned y = 0; y < height; y++) \ - { \ - const uint8_t *in = (const uint8_t*)frame + y * pitch; \ - uint8_t *out = (uint8_t*)d3dlr.pBits + y * d3dlr.Pitch; \ - memcpy(out, in, width * d3d->pixel_size); \ - } -#endif - static void renderchain_clear(void *data) { d3d_video_t *d3d = (d3d_video_t*)data; @@ -285,5 +271,5 @@ static void renderchain_blit_to_texture(void *data, const void *frame, } D3DTexture_LockRect(d3d->tex, 0, &d3dlr, NULL, D3DLOCK_NOSYSLOCK); - D3DTexture_Blit(d3d, desc, d3dlr, frame, width, height, pitch); + d3d_texture_blit(d3d, desc, d3dlr, frame, width, height, pitch); }