Skip to content

add xaa-compat.h and a ton of shims for compat in privates.h#29

Open
HaplessIdiot wants to merge 501 commits into
supersonic-xserver:masterfrom
HaplessIdiot:master
Open

add xaa-compat.h and a ton of shims for compat in privates.h#29
HaplessIdiot wants to merge 501 commits into
supersonic-xserver:masterfrom
HaplessIdiot:master

Conversation

@HaplessIdiot

Copy link
Copy Markdown
Contributor

No description provided.

nia and others added 30 commits September 28, 2021 07:20
…DX().

Tested on 3/60.  Note AbortDevices() and DEVICE_ABORT in deviceProc
functions were introduced after Xorg 1.14.0:
 https://gitlab.freedesktop.org/xorg/xserver/-/commit/9f79e93b6b3416055d08a0e8f9f16d5fd0649e36
- AbortDDX() is removed, make it static to avoid code churn since
  it is used by internal code now
- LegalModifier() is gone
- if the PRESENT extension isn't included, don't enable the
  -fakescreenfps option since it require PRESENT.

fixes builds for sun3 and x68k.
https://gitlab.freedesktop.org/xorg/xserver/-/commit/a23eba2a91024d27da45e5aee1f4215f7ec2ae82
> These are so close to identical that most DDXes implement one in terms
> of the other. All the relevant cases can be distinguished by the error
> code, so merge the functions together to make things simpler.
https://gitlab.freedesktop.org/xorg/xserver/-/commit/d1c00c859c6676fbb540420c9055788bc19cb18f
Note ScrnInfoRec structure in hw/xfree86/common/xf86str.h isn't reverted
because it isn't used by -flipPixels option so that we can keep ABI
compatibility among xf86-video-foo drivers.

This -flipPixels is mandatory at least by Xorg server users with
xf86-video-wsfb driver on NetBSD/mac68k and SE/30 mono screen
that has "black=1 and white=0" VRAM.

"go for it" by mrg@ on current-users@:
https://mail-index.netbsd.org/current-users/2022/07/24/msg042731.html
USE_SSP=yes builds don't work with this new xorg-server version, adjust
the drmmode_set_gamma_lut() call to use malloc() instead of the stack,
and pass down a higher level pointer to gain access to the screen index
so error messages with xf86DrvMsg() work.

tested on pinebookpro.
- Sets up 8bpp shadow framebuffer with depth 4
- Bitplane conversion done in shadow update function
- Adds new shadow update function shadowUpdateAfb4x8,
  which is a slightly modified version of existing shadowUpdateAfb4/8.

Discussion on tech-x11: http://mail-index.netbsd.org/tech-x11/2024/02/29/msg002447.html
some clean up upstream didn't get tested on alpha it seems, with both
missing CARD8 etc identifiers as well as dead/duplicate code.
Comment thread include/Xdefs.h Outdated

#ifndef _XTYPEDEF_POINTER
# define _XTYPEDEF_POINTER
# define _XTYPEDEF_POINTER 1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redundant?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah i agree thats extra im sure its in warnings too

Comment thread Xi/exevents.c Outdated
Bool
XIShouldNotify(ClientPtr client, DeviceIntPtr dev)
{
return TRUE;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is always true than this function is not needed in general

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah i didnt know a good way to stub it off it needs it copied there from a header to not bitch


The build errors reveal deeper incompatibilities that cannot be solved with header shims alone:

1. **glx/vndserver_priv.h** - This file contains corrupted/encrypted legacy XFree86 code that cannot be parsed by modern compilers. The user indicated they will handle this separately.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not good if you want the code to compile. I'd suggest fixing this code so it works with modern compilers.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah i need a better source of this ancient file the vndserver_priv.h i used from netbsd is incomplete

Comment thread dri3/dri3.c

static Bool
dri3_close_screen(ScreenPtr screen)
dri3_close_screen(int index, ScreenPtr screen)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are other functions updated for this change?

@HaplessIdiot HaplessIdiot Mar 18, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is to match xlibre dri3 driver stuff for amdgpu to work i need to build a list of all the new functions added for amdgpu args are different count many 2 arg are now 3 or 4 more complex. i jumped to dri3 errors when i saw a few and it was missing this stuff here. -Dlegacy_build=true was added to see comparisons in build headers vs xlibre for error counts.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is to match xlibre dri3 driver stuff for amdgpu

Sure, but we should update the other codes so that it compiles with this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants