PDA

View Full Version : Is that possible to directly use PTX instruction ?



robotech_er
09-23-2011, 07:16 AM
I downloaded a PTX_ISA manual (version 2.1) from nvidia's website, and found some useful instructions not included by GLSL, such as clz(),count leading zero, listed in PTX means direct HW support and can be fast. why does not GLSL get these instructions included? (also not included in the ogl ASM extension, nv_vertex|pixel_program.)
So, Is that possible to directly use PTX instruction ( or other local HW instruction set, if exist ) in GLSL though some method like use inline assembly in c? i have been searching for resolutions but have not get one.thanks in advance.

Onumis
09-23-2011, 07:28 AM
PTX is meant to be used with the CUDA Driver API.

You can't use PTX with GLSL, they are different things. You can have CUDA, openGL interop if you like.

What you can do in GLSL is entirely defined in the API:
http://www.opengl.org/documentation/glsl/

It has many functions already defined, but they usualy were intended to assist commum shading operations.

robotech_er
09-23-2011, 08:18 AM
thanks,Onumis,I will check cuda interop later.