- fixed output of software renderers with Vulkan backend
Vulkan hardware buffer for software canvas may have some padding Software renderers should be aware of buffer's pitch in order to copy pixels properly https://forum.zdoom.org/viewtopic.php?t=64562
This commit is contained in:
parent
edcce76f3a
commit
56557a17f1
14 changed files with 41 additions and 27 deletions
|
|
@ -271,8 +271,8 @@ void GroupMemoryBarrierCommand::Execute(DrawerThread *thread)
|
|||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
MemcpyCommand::MemcpyCommand(void *dest, const void *src, int width, int height, int srcpitch, int pixelsize)
|
||||
: dest(dest), src(src), width(width), height(height), srcpitch(srcpitch), pixelsize(pixelsize)
|
||||
MemcpyCommand::MemcpyCommand(void *dest, int destpitch, const void *src, int width, int height, int srcpitch, int pixelsize)
|
||||
: dest(dest), src(src), destpitch(destpitch), width(width), height(height), srcpitch(srcpitch), pixelsize(pixelsize)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -281,9 +281,9 @@ void MemcpyCommand::Execute(DrawerThread *thread)
|
|||
int start = thread->skipped_by_thread(0);
|
||||
int count = thread->count_for_thread(0, height);
|
||||
int sstep = thread->num_cores * srcpitch * pixelsize;
|
||||
int dstep = thread->num_cores * width * pixelsize;
|
||||
int dstep = thread->num_cores * destpitch * pixelsize;
|
||||
int size = width * pixelsize;
|
||||
uint8_t *d = (uint8_t*)dest + start * width * pixelsize;
|
||||
uint8_t *d = (uint8_t*)dest + start * destpitch * pixelsize;
|
||||
const uint8_t *s = (const uint8_t*)src + start * srcpitch * pixelsize;
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue