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

printf: Support 64-bit floats #8341

Merged

Conversation

spencer-lunarg
Copy link
Contributor

closes #7143

@spencer-lunarg spencer-lunarg requested a review from a team as a code owner July 31, 2024 01:54
@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build queued with queue ID 226793.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 17162 running.

@@ -635,5 +637,8 @@ void Module::PostProcess() {
}
}

// TODO - Currently this is not tied into validation layers callback, should be using LogWarning/LogError
void InternalWarning(const char* message) { std::cout << "[Internal Shader Instrumentation Warning] " << message << '\n'; }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

next PR after this will be to hook in the call back so I can move all the validation from #8294 into here as it should be done in this part of the code anyway

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 17162 passed.

layers/gpu/debug_printf/debug_printf.cpp Show resolved Hide resolved
double_bitmask_ |= 1 << expanded_parameter_count_;

// TODO (Also in GPU-AV) need to detect if shaderInt64 is supported or not before forcing this on
module_.AddCapability(spv::CapabilityInt64);
Copy link
Contributor

Choose a reason for hiding this comment

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

What happens if CapabilityInt64 is not supported? Will the user get noticed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

its just technically invalid SPIR-V and a VU like anything else

from what I could see, Float64 is more rare than Int64 so assume they would support this... but we should add a way to check

@spencer-lunarg spencer-lunarg merged commit e0dd7ee into KhronosGroup:main Jul 31, 2024
21 checks passed
@spencer-lunarg spencer-lunarg deleted the spencer-lunarg-print-64 branch July 31, 2024 12:18
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.

debugPrintfEXT with %g formatting on GPU doubles, dvec2, dvec4 etc is broken
3 participants