[Mesa-dev] pfn_notify in clCreateContext()

Vedran Miletić vedran at miletic.net
Fri Feb 24 16:00:53 UTC 2017


Hello,

I noticed that Clover outputs si_shader_dump_stats() via pfn_notify
callback registered clCreateContext() (it's not done directly, but
that's the result). According to OpenCL standard documentation [1],
pfn_notify should be used only to report errors.

One of the programs that gets confused by our behavior is OpenMM,
outputing lines such as:

OpenCL internal error: Shader Stats: SGPRS: 16 VGPRS: 11 Code Size:
10804 LDS: 0 Scratch: 0 Max Waves: 10 Spilled SGPRs: 0 Spilled VGPRs: 0
PrivMem VGPRs: 0

What should we do?

1) Leave as is in hope that no application is broken by it beyond
printing non-errors.
2) Do not print debug_message() (including si_shader_dump_stats()) via
pfn_notify.
3) Introduce separate error_message() for pfn_notify instead of
debug_message().

Regards,
Vedran

[1]
https://www.khronos.org/registry/OpenCL/sdk/1.1/docs/man/xhtml/clCreateContext.html

-- 
Vedran Miletić
vedran.miletic.net


More information about the mesa-dev mailing list