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

ERROR: Internal compile error, error code: E_SC_NOTSUPPORTED Shader not supported by HW #385

Closed
ncicek opened this issue Aug 14, 2021 · 12 comments

Comments

@ncicek
Copy link

ncicek commented Aug 14, 2021

Repro steps:
Install AMD PRO gpu drivers on ubuntu 20 (needed for OpenCL)
Launch glscopeclient and connect to demo driver.
Program crashes and following error appears:

$ glscopeclient
ERROR: Link of shader progam failed:
Compute shader(s) failed to link.
Compute link error: HW_UNSUPPORTED.
ERROR: Internal compile error, error code: E_SC_NOTSUPPORTED
Shader not supported by HW
INTERNAL ERROR: failed to link histogram waveform shader program, aborting
This indicates a bug in the program, please file a report via Github
Aborted (core dumped)

Doesn't seem to matter which AMD GPU I try: old radeon r9 200 series, or newer rx 6800.

Googling for keyword "E_SC_NOTSUPPORTED" shows references to SSBO (Shader Storage Buffer Object). Is this something that is used in the shader code?
How can I help debug further?

@ncicek
Copy link
Author

ncicek commented Aug 14, 2021

Here is full output when run with --debug flag:

$ glscopeclient --debug
OMP_WAIT_POLICY not set to PASSIVE. Re-exec'ing with correct environment
Detecting CPU features...
* AVX2
* FMA

Detecting OpenCL devices...
Platform 0
CL_PLATFORM_NAME = AMD Accelerated Parallel Processing
CL_PLATFORM_PROFILE = FULL_PROFILE
CL_PLATFORM_VENDOR = Advanced Micro Devices, Inc.
CL_PLATFORM_VERSION = OpenCL 2.1 AMD-APP (3302.5)
No GPUs found
clFFT version: 2.12.2

Connecting to SCPI oscilloscope at 192.168.1.39:5025
Context: OpenGL 4.2 compatibility profile
GL_VENDOR = (null)
GL_RENDERER = (null)
GL_VERSION = (null)
GL_SHADING_LANGUAGE_VERSION = (null)
Initial GL error code = 0
GL_ARB_gpu_shader_int64 = not supported
ERROR: Link of shader progam failed:
Compute shader(s) failed to link.
Compute link error: HW_UNSUPPORTED.
ERROR: Internal compile error, error code: E_SC_NOTSUPPORTED
Shader not supported by HW
INTERNAL ERROR: failed to link histogram waveform shader program, aborting
This indicates a bug in the program, please file a report via Github
Aborted (core dumped)

@ncicek
Copy link
Author

ncicek commented Aug 14, 2021

Here is output of clinfo on my system:

$ clinfo
Number of platforms 1
Platform Name AMD Accelerated Parallel Processing
Platform Vendor Advanced Micro Devices, Inc.
Platform Version OpenCL 2.1 AMD-APP (3302.5)
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_icd cl_amd_event_callback cl_amd_offline_devices
Platform Host timer resolution 1ns
Platform Extensions function suffix AMD

Platform Name AMD Accelerated Parallel Processing
Number of devices 0

NULL platform behavior
clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...) No platform
clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...) No platform
clCreateContext(NULL, ...) [default] No platform
clCreateContext(NULL, ...) [other] No platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL) No devices found in platform

@azonenberg
Copy link
Collaborator

This is not an OpenCL issue, this is OpenGL compute shader related. glscopeclient's renderer uses shader storage buffer objects for displaying waveforms.

Can you post glxinfo output?

@ncicek
Copy link
Author

ncicek commented Aug 14, 2021

Thank you for the quick response.
I realized that this issue doesn't happen with the default mainline driver (ie if I install amd-gpu-pro driver with --headless option, it just gives me the opencl and no driver).
So I took two glxinfo outputs attached below. One with the mainline driver (which works, no error msg) and one with amd-gpu-pro driver (gives error).
amd-gpu-pro-driver-glxinfo.txt
mainline-driver-glxinfo.txt

@ncicek
Copy link
Author

ncicek commented Aug 15, 2021

I think I see the cause.
On the amd-gpu-pro driver, the GL_ARB_shader_storage_buffer_object extension support is on "ES profile" however the mainline driver has this extension under "core" profile.

Is there any way to make it use the ES profile?

@azonenberg
Copy link
Collaborator

The amd-gpu-pro driver reports GL_ARB_shader_storage_buffer_object under core profile, and also reports OpenGL 4.6 (this extension is required in core since... 4.3 I think).

Are you using the most recent version of amd-gpu-pro for your card? Does it provide any features mainline does not that you need? I'm mostly an nvidia shop so not that familiar with AMD's drivers.

@ncicek
Copy link
Author

ncicek commented Aug 15, 2021

Yes, this was tested on latest 20.30 version of amdgpu-pro driver.
I don't really need to use amdgpu-pro driver over mainline.
However, the same error comes up on Windows when I test the latest windows build (downloaded from github). On Windows there is no mainline driver alternative so that makes this more important.

Any ideas? Issue seems to be common to amd's closed-source opengl driver on both windows and linux side.

C:\Users\xxx\Desktop\glscopeclient>glscopeclient.exe --debug
←[33;1mWarning:←[0m glscopeclient works best with the OMP_WAIT_POLICY environment variable set to PASSIVE
Detecting CPU features...
* AVX2
* FMA

←[33;1mWarning:←[0m AVX2/AVX512 detected but disabled on MinGW64/GCC (see https://github.com/azonenberg/scopehal-apps/issues/29
5)

OpenCL support: not present at compile time. GPU acceleration disabled.

Context: OpenGL 4.2 compatibility profile
GL_VENDOR = ATI Technologies Inc.
GL_RENDERER = AMD Radeon RX 6800
GL_VERSION = 4.2.14742 Core Profile Context 21.8.1 27.20.22023.1004
GL_SHADING_LANGUAGE_VERSION = 4.60
Initial GL error code = 0
GL_ARB_gpu_shader_int64 = not supported
←[31;1mERROR:←[0m Link of shader progam failed:
Compute shader(s) failed to link.
←[31;1mCompute link error:←[0m HW_UNSUPPORTED.
←[31;1mERROR:←[0m Internal compile error, error code: E_SC_NOTSUPPORTED
Shader not supported by HW
←[31;1m←[31;1mINTERNAL ERROR:←[0m←[0m failed to link histogram waveform shader program, aborting
This indicates a bug in the program, please file a report via Github

@azonenberg
Copy link
Collaborator

Can you post the list of OpenGL extensions on the Windows system? I know there's third party utilities for this, not sure if AMD's software can do it natively.

Also, you can run glscopeclient --debug --logfile foo.txt to get output logged to a file in plain unformatted text without any of the color coding control characters.

@ncicek
Copy link
Author

ncicek commented Aug 15, 2021

Attached foo.txt
foo.txt

Attached output of glview utility.
glview-AMD Radeon RX 6800-13.txt

@TopQuark12
Copy link

I am facing a similar issue on a windows laptop with a AMD Ryzen 7 5800H processor.
Here's my log:
log.txt

@azonenberg
Copy link
Collaborator

Interesting. The log @ncicek posted looks similar to yours, and his glview dump confirms that GL_ARB_compute_shader is supported. Going to have to do some more digging...

@azonenberg
Copy link
Collaborator

No activity for almost a year, and the affected code path doesn't exist in ngscopeclient. Closing.

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

No branches or pull requests

3 participants