Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a settings Option for the pba codepath #37

Open
yoshimo opened this issue Mar 10, 2018 · 8 comments
Open

Create a settings Option for the pba codepath #37

yoshimo opened this issue Mar 10, 2018 · 8 comments

Comments

@yoshimo
Copy link

yoshimo commented Mar 10, 2018

The experimental patches do not always work better than a pure wine.
For testing it would be nice to have a config check box similar to csmt in the past were you can enable or disable this new rendering path for easier a/b testing.

@oscarbg
Copy link

oscarbg commented Mar 10, 2018

+1

@ghost
Copy link

ghost commented Mar 10, 2018

I think I know how to do this,
not sure how long it will take me

but if you want to have a look at this yourself,
look in dlls/wined3d-csmt/
take note of the STAGING_CSMT in that Makefile.in
now look for STAGING_CSMT in the rest of the code ( start in dlls/wined3d/ )

do you see the logic

if condition
do foo foo
done

or
if condition
do foo foo
else
do bar bar
done

go on... have a go

@ghost
Copy link

ghost commented Mar 10, 2018

I think I have done it
compiling now
PBA-dllredirect.patch.gz
no winecfg yet, you will have to manually edit the dllredirect in user.reg ( after setting csmt so you can see what needs to be edited )

basically we now have two extra wined3d dlls

  • wined3d-pba.dll , pba without csmt
  • wined3d-csmt-pba.dll , pba with csmt

once I have confirmed it works, i'll look at winecfg
then see if I can remember how to do a git pull request , been a very long time

@ghost
Copy link

ghost commented Mar 10, 2018

doh, I missed configure.ac
look for WINE_CONFIG_DLL(wined3d-csmt)
and add
WINE_CONFIG_DLL(wined3d-pba)
WINE_CONFIG_DLL(wined3d-csmt-pba)

then run autoconf

@ghost
Copy link

ghost commented Mar 10, 2018

here you go
PBA-dllredirect_fixed.patch.gz
without the typos, and includes all the stuff I missed last time ;)
don't forget to autoconf to regenerate configure
still no winecfg , so requires manual edit of user.reg

@acomminos
Copy link
Owner

This is a good idea, but this patch is more complex than it needs to be for performance testing. Additionally, I think that this should be checked at runtime versus compile time- there's already a case at runtime where we don't use the PBA (when ARB_buffer_storage is unsupported), so I'm inclined to make that path more robust instead. It's not quite like CSMT, which doesn't actually need a runtime fallback path (as CSMT requires no particular hardware support).

If we want to disable using the PBA, all we have to do is;

  1. Ensure the WINED3D_BUFFER_PERSISTENT flag is never set on the buffer.
  2. Don't allocate the PBA buffer heaps in wined3d/device.c.

I'll write this up tonight.

@ghost
Copy link

ghost commented Mar 11, 2018

yeah, I just blindy hacked away at it

so, something like
if (gl_info->supported[ARB_BUFFER_STORAGE] && !get_reg_key(config_key,......))

much simpler

@acomminos
Copy link
Owner

The PBA_DISABLE envvar can be used for now, added in 87307b1.

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

No branches or pull requests

3 participants