Skip to content

Conversation

@Fletterio
Copy link
Contributor

@Fletterio Fletterio commented Jul 24, 2025

// TODO: Improve logic, currently just a simple check to see if the full-screen image has more pixels that viewport or not
// TODO: add criterial that the size of the full-res image shouldn't consume more than 30% of the total memory arena for images (if we allowed larger than viewport extents)
const bool betterToResideFullyInMem = georeferencedImageParams.imageExtents.x * georeferencedImageParams.imageExtents.y <= georeferencedImageParams.viewportExtents.x * georeferencedImageParams.viewportExtents.y;
const bool betterToResideFullyInMem = params.imageExtents.x * params.imageExtents.y <= params.viewportExtents.x * params.viewportExtents.y;
Copy link
Contributor

Choose a reason for hiding this comment

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

I just hit a problem where params.imageExtent was 2^17 and the multiplication resulted in 0 because it's uint32_t.
change original imageExtents to be uint64_t (only on cpu side ofcourse) and make sure you're not limited by uint64_t and modify the check to :
if params.imageExtent.x < 2^14 && params.imageExtent.y < 2^14 && imagePixels <= viewportPixels to make sure we're doing "Streamed" if the image extent is larger than a certain threshold unrelated to the viewport.
Check if we're getting similar issues with uint32_t2 imageExtents being large.

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.

4 participants