mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-16 08:21:20 -04:00
shm: align the stride to 256 bytes
This is required for the compositor to import the buffer directly into AMD hardware for zero-copy sampling.
This commit is contained in:
parent
44a674edb8
commit
c462bad08c
2 changed files with 2 additions and 2 deletions
2
shm.c
2
shm.c
|
|
@ -13,7 +13,6 @@
|
||||||
|
|
||||||
#include <pixman.h>
|
#include <pixman.h>
|
||||||
|
|
||||||
#include <fcft/stride.h>
|
|
||||||
#include <tllist.h>
|
#include <tllist.h>
|
||||||
|
|
||||||
#define LOG_MODULE "shm"
|
#define LOG_MODULE "shm"
|
||||||
|
|
@ -22,6 +21,7 @@
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "macros.h"
|
#include "macros.h"
|
||||||
#include "xmalloc.h"
|
#include "xmalloc.h"
|
||||||
|
#include "stride.h"
|
||||||
|
|
||||||
#if !defined(MAP_UNINITIALIZED)
|
#if !defined(MAP_UNINITIALIZED)
|
||||||
#define MAP_UNINITIALIZED 0
|
#define MAP_UNINITIALIZED 0
|
||||||
|
|
|
||||||
2
stride.h
2
stride.h
|
|
@ -5,5 +5,5 @@
|
||||||
static inline int
|
static inline int
|
||||||
stride_for_format_and_width(pixman_format_code_t format, int width)
|
stride_for_format_and_width(pixman_format_code_t format, int width)
|
||||||
{
|
{
|
||||||
return (((PIXMAN_FORMAT_BPP(format) * width + 7) / 8 + 4 - 1) & -4);
|
return (((PIXMAN_FORMAT_BPP(format) * width + 7) / 8 + 256 - 1) & -256);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue