Skip to content

Conversation

Fletterio
Copy link
Contributor

@Fletterio Fletterio commented Jul 24, 2025


DrawResourcesFiller::TileUploadData DrawResourcesFiller::generateTileUploadData(const ImageType imageType, const float64_t3x3& NDCToWorld, GeoreferencedImageStreamingState* imageStreamingState)
{
// I think eventually it's better to just transform georeferenced images that aren't big enough into static images and forget about them
Copy link
Contributor

@Erfan-Ahmadi Erfan-Ahmadi Aug 25, 2025

Choose a reason for hiding this comment

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

Good idea! let's try to have similar logic in n4ce codebase as well when we integrate and make it not go through georeferenced paths if image is small enough

Copy link
Contributor

Choose a reason for hiding this comment

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

the criteria should be: the memory the image consumes is smaller than the GPU-resident image used for streaming

// 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.

3 participants