Instead of complex macro machinery, just move the conditional swapping
directly into ProcXvListImageFormats ().
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Instead of complex macro machinery, just move the conditional swapping
directly into ProcXvQueryImageAttributes().
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Instead of complex macro machinery, just move the conditional swapping
directly into ProcXvQueryPortAttributes().
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Instead of complex macro machinery, just move the conditional swapping
directly into ProcXvQueryBestSize().
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Instead of complex macro machinery, just move the conditional swapping
directly into ProcXvGetPortAttribute().
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Instead of complex macro machinery, just move the conditional swapping
directly into ProcXvGrabPort().
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Instead of complex macro machinery, just move the conditional swapping
directly into ProcXvListImageFormats().
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Instead of complex macro machinery, just move the conditional swapping
directly into ProcXvQueryPortAttributes().
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Instead of complex macro machinery, just move the conditional swapping
directly into ProcXvQueryAdaptors().
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Instead of complex macro machinery, just move the conditional swapping
directly into ProcXvQueryEncodings().
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Instead of complex macro machinery, just move the conditional swapping
directly into ProcXvQueryAdaptors().
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Instead of complex macro machinery, just move the conditional swapping
directly into ProcXvQueryEncodings().
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Instead of complex macro machinery, just move the conditional swapping
directly into ProcXvQueryExtension().
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Instead of complex macro machinery, just move the conditional swapping
directly into ProcXvQueryExtension().
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
For now that case doensn't practically happen yet - all fields are at
least assigned to some default/dummy function. But in the future, we
might wanna get rid of dummies.
From now on, video drivers are allowed to assign them to NULL, if they
don't wanna have the default implementations and nothing happening
at all instead (no more need for having their own empty dummies)
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Add compile-time checks on whether sizeof(foo) == SIZEOF(foo),
using new static assert macro.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
The X protocol types from xorgproto all have corresponding sz_<typename>
defines with their actual network payload size (this can be checked via
SIZEOF() macro).
In theory, this should always be the same as sizeof(), but just to be sure,
adding a macro for a static assert on that.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This allows us to pass flags to the function, avoiding the forced
implicit GBM_BO_USE_SCANOUT which happens with the older version.
Backport from Xwayland:
f31ca9238f
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
If we're using implicit modifiers, we'll pass NULL and zero modifiers.
Lets just use the legacy API directly instead.
Backport from Xwayland:
08b0ea09de
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
This likely wasn't a problem, as *num_modifiers was 0, so likely no
data was read from a potentially uninitilaized pointer, but it's
still better to explicitly set it to NULL.
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
Since we're now constructing the payload step by step via x_rpcbuf,
there's no need to have an extra loop for collecting dbeScreenVisualInfo's,
we can just fetch and process them one by one, and so don't need extra
temporary storage for them.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Since using x_rpcbuf, we don't need extra computation of the payload_length,
as the x_rpcbuf already knows the amount of data written into it.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
By using the new x_rpcbuf, it's easy to assemble packets step by step,
without even knowing the final size yet and doing the write out in
one step.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Low level OS specific code should not depend on higher level protocol
headers. This also removes yet another conflict with win32/mingw headers.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Mention the integration of the June 2025 X.org CVE fixes into the XLibre
Xserver. Add a link to our Q&A discussions as well.
Fixes: #522
Signed-off-by: callmetango <callmetango@users.noreply.github.com>