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

implement log2GobsPerBlockY values for even smaller images #350

Merged
merged 1 commit into from
Jan 13, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/direct/nv-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,9 @@ bool alloc_memory(const NVDriverContext *context, const uint32_t size, int *fd)
//first figure out the gob layout
uint32_t log2GobsPerBlockX = 0; //TODO not sure if these are the correct numbers to start with, but they're the largest ones i've seen used
uint32_t log2GobsPerBlockY = height < 86 ? 3 : 4; //TODO 86 is a guess, 80px high needs 3, 112px needs 4, 96px needs 4, 88px needs 4, 86px needs 4
if (height < 43) log2GobsPerBlockY = 2;
if (height < 22) log2GobsPerBlockY = 1;
if (height < 11) log2GobsPerBlockY = 0;
uint32_t log2GobsPerBlockZ = 0;

//LOG("Calculated GOB size: %dx%d (%dx%d)", gobWidthInBytes << log2GobsPerBlockX, gobHeightInBytes << log2GobsPerBlockY, log2GobsPerBlockX, log2GobsPerBlockY);
Expand Down