-2

Are there intrinsics/instructions on GPUs specific for the common operations of OpenGL/DirectX, such as triangle filling, texture mapping, clipping, etc? And if so, can they be accessed using OpenCL or CUDA code running on the GPU?

Edit: I was wondering if operations like triangle filling, etc. in OpenGL make use of specific GPU instructions that cannot be accessed from OpenCL or CUDA, so that it is impossible to implement them as efficiently in OpenCL/CUDA, as they would be using OpenGL (with a render-to-texture context).

tmlen
  • 8,533
  • 5
  • 31
  • 84

1 Answers1

1

OpenGL context allows you to access graphics pipeline, which is not accessible when creating compute context. There are no direct intrinsics as both API has it's own language which gets mapped to PTX or some hardware specific instructions.

Triangle filling is definitely not a single instruction. You can implement texture mapping and clipping in compute shaders if you want.

Please clarify what is your intent as you may have some fundamental mis-understanding.

Ketan
  • 1,017
  • 8
  • 17