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

Vulkan dump resources: Add support for R32G32B32A32_SFLOAT images #1768

Conversation

panos-lunarg
Copy link
Contributor

No description provided.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 264775.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 4904 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 4904 passed.

float float_b = float_vals[x + 2];
float float_a = float_vals[x + 3];

uint8_t r = static_cast<uint8_t>(float_r * 255.0f);
Copy link
Contributor

Choose a reason for hiding this comment

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

If the user wants the range [0.0f,1.0f] to be evenly distributed among uint8_t values, I think 255.0f should be std::nextafter(256.0f, 0.0f) (which will equate to 255.99...f). Also, SFLOAT isn't normalized so you probably need to clamp the source values here to [0.0f, 1.0f]. Maybe some day in the future we can go back and alter the other case statements to match but not in this PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

To prevent this feedback from blocking this PR when it applies to all other cases in image_writer.cpp and not just this new addition, I've moved this feedback to #1790 and will remove my feedback on this PR. Note that values will not be distributed uniformly from [0,1] to [0,255] and values outside the range [0,1] will wrap.

@bradgrantham-lunarg bradgrantham-lunarg added the P1 Prevents an important capture from being replayed label Oct 7, 2024
@panos-lunarg
Copy link
Contributor Author

Submitted #1799 instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 Prevents an important capture from being replayed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants