(D3D) Don't use Pass from d3d_wrapper.cpp

This commit is contained in:
twinaphex 2015-04-05 18:25:48 +02:00
parent 9c678a3abd
commit e9f08dfafe
3 changed files with 4 additions and 5 deletions

View File

@ -265,17 +265,16 @@ void d3d_clear(LPDIRECT3DDEVICE dev,
void d3d_lockrectangle_clear(void *data,
LPDIRECT3DTEXTURE tex,
unsigned level, D3DLOCKED_RECT *lock_rect, RECT *rect,
unsigned flags)
unsigned rectangle_height, unsigned flags)
{
#if defined(_XBOX)
d3d_video_t *chain = (d3d_video_t*)data;
D3DTexture_LockRect(tex, level, lock_rect, rect, flags);
memset(lock_rect->pBits, 0, chain->tex_h * lock_rect->Pitch);
#else
Pass *pass = (Pass*)data;
if (SUCCEEDED(tex->LockRect(level, lock_rect, rect, flags)))
{
memset(lock_rect->pBits, level, pass->info.tex_h * lock_rect->Pitch);
memset(lock_rect->pBits, level, rectangle_height * lock_rect->Pitch);
tex->UnlockRect(0);
}
#endif

View File

@ -1310,7 +1310,7 @@ void renderchain_blit_to_texture(void *data, const void *frame,
if (first->last_width != width || first->last_height != height)
{
d3d_lockrectangle_clear(first, first->tex, 0, &d3dlr,
NULL, D3DLOCK_NOSYSLOCK);
NULL, first->info.tex_h, D3DLOCK_NOSYSLOCK);
}
d3d_texture_blit(driver->video_data, chain->pixel_size, first->tex,

View File

@ -250,7 +250,7 @@ static void renderchain_blit_to_texture(void *data, const void *frame,
if (d3d->last_width != width || d3d->last_height != height)
{
d3d_lockrectangle_clear(d3d, d3d->tex,
0, &d3dlr, NULL, D3DLOCK_NOSYSLOCK);
0, &d3dlr, NULL, 0 /* FIXME - stub */, D3DLOCK_NOSYSLOCK);
}
d3d_texture_blit(driver->video_data, 0, d3d->tex,