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

[d3d9] Refactor state blocks to allocate dynamically. #3248

Merged
merged 1 commit into from
Mar 7, 2023

Conversation

misyltoad
Copy link
Collaborator

No description provided.

@misyltoad misyltoad requested a review from K0bin February 11, 2023 21:40
Copy link
Collaborator

@K0bin K0bin left a comment

Choose a reason for hiding this comment

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

Looks fine to me except for the mess with TextureChangePrivate_.

@K0bin
Copy link
Collaborator

K0bin commented Feb 28, 2023

One thing my branch also does, which this one doesn't do, is only allocate the HWVP constant set if SWVP is not enabled.

I think that's absolutely worthwhile considering that most games don't use SWVP and the SWVP constant set is huge (~130 KB just for floats).

@misyltoad misyltoad changed the title [wip] dynamic state block [d3d9] Refactor state blocks to allocate dynamically. Mar 7, 2023
@misyltoad
Copy link
Collaborator Author

One thing my branch also does, which this one doesn't do, is only allocate the HWVP constant set if SWVP is not enabled.

Let's come back to this, fwiu that space is always allocated in DX and games can write up there and probably expect to read them back so we'd need to be careful.

Looks fine to me except for the mess with TextureChangePrivate_.

I solved that by just moving it to the CPP file and doing an explicit template instantiation with:

    template struct D3D9State<dynamic_item>;
    template struct D3D9State<static_item>;

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