CUDA graphics interop vs GLSL

I’m wondering about ‘basic’ OpenGL graphics using CUDA.

With GLSL I can write a vertex shader and a fragment shader.
In the vertex shader, GLSL providers me with data associated with each vertex (e.g. position and normal). This step can be easily done in CUDA.
Then, data from the vertex shader is passed to the fragment shader. This data can be interpolated data! This means that GLSL can use barycentric coordinates to pass interpolated vertex data (e.g. UVs) from the vertex shader to the fragment shader. Does CUDA have a similar thing?

More specifically, GPU memory (buffers) can be shared between OpenGL and CUDA. Then, one can execute a CUDA kernel and process this buffer. But can it get the vertex interpolated data information?

On the subject, are there any features in GLSL that I can’t implement using CUDA, and in general, how do the two compare? (For example, can CUDA make GLSL redundant?)

GLSL does not make CUDA redudant, and CUDA does not make GLSL redundant. In applications that have both graphics and GPU compute portions, GLSL is a good starting point if the main focus is graphics, while CUDA with OpenGL interop is a good starting point if the main focus is compute. That is just a rule of thumb of course.

Since no one answered, I’ll attempt to answer this basic question myself.

It appears that indeed we can’t write a fragment shader in CUDA. This makes me wonder why CUDA and OpenCL don’t release their own OpenGL implementation that support them (in order to promote them). I don’t think I would have liked to implement efficiently this part of the pipeline myself.

This is one thing that makes GLSL necessary. Of course, by itself it can’t reach the complexity and maturity of CUDA, e.g. sharing memory between threads and debugging.