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

simpleCUDA2GL sample: GL_INVALID_OPERATION #61

Open
Forceflow opened this issue Jan 15, 2021 · 1 comment
Open

simpleCUDA2GL sample: GL_INVALID_OPERATION #61

Forceflow opened this issue Jan 15, 2021 · 1 comment

Comments

@Forceflow
Copy link

Forceflow commented Jan 15, 2021

When compiling and running the simpleCUDA2GL sample on windows 10 (20H2), using Visual Studio 16.8.4, this is the output:

(Interactive OpenGL Demo)
GPU Device 0: "Turing" with compute capability 7.5
Shader compilation error: Fragment info
0(4) : warning C7533: global variable gl_Color is deprecated after version 120
Shader compilation error: Fragment info
0(5) : warning C7533: global variable gl_TexCoord is deprecated after version 120
0(6) : warning C7533: global variable gl_FragColor is deprecated after version 120
Controls
(right click mouse button for Menu)
[esc] - Quit
C:\ProgramData\NVIDIA Corporation\CUDA Samples\v11.2\3_Imaging\simpleCUDA2GL\main.cpp(297) : GL Error : GL_INVALID_OPERATION
GL Error in file 'C:\ProgramData\NVIDIA Corporation\CUDA Samples\v11.2\3_Imaging\simpleCUDA2GL\main.cpp' in line 297 :  GL_INVALID_OPERATION
C:\ProgramData\NVIDIA Corporation\CUDA Samples\v11.2\bin\win64\Release\simpleCUDA2GL.exe (process 24616) exited with code 1.

The correct checkerboard image appears for one frame, then the program crashes.

The problematic lines around line 297:

#ifndef USE_TEXSUBIMAGE2D
    glUseProgram(shDrawTex);
    GLint id = glGetUniformLocation(shDrawTex, "texImage");
    glUniform1i(id, 0); // texture unit 0 to "texImage"
    SDK_CHECK_ERROR_GL();
#endif

I guess the uniform lookup/assignment is the problem or it treats the shader compilation warnings as errors, forcing the program to quit.

@Forceflow
Copy link
Author

Not solved in CUDA 11.2 update 1

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

1 participant