mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 05:27:20 +00:00
[host] dxgi: ensure 24-bit packed output is properly aligned
This commit is contained in:
parent
47ad93f48d
commit
2316a5e64d
@ -78,8 +78,11 @@ static bool rgb24_configure(void * opaque,
|
|||||||
|
|
||||||
if (!this.pshader)
|
if (!this.pshader)
|
||||||
{
|
{
|
||||||
this.width = (*cols * 3 + 3) / 4;
|
/* we must align to 64 byte boundaries to avoid breaking dmabuf import */
|
||||||
this.height = *rows;
|
this.width = ALIGN_TO((*cols * 3 + 3) / 4, 64);
|
||||||
|
|
||||||
|
/* adjust for the aligned width */
|
||||||
|
this.height = ((*rows * *cols) + this.width - 1) / this.width;
|
||||||
|
|
||||||
char sOutputWidth[6], sOutputHeight[6];
|
char sOutputWidth[6], sOutputHeight[6];
|
||||||
snprintf(sOutputWidth , sizeof(sOutputWidth) , "%d", this.width );
|
snprintf(sOutputWidth , sizeof(sOutputWidth) , "%d", this.width );
|
||||||
|
Loading…
Reference in New Issue
Block a user