![]() ![]() |
Nov 3 2007, 06:08 PM
Post
#1
|
|
|
Member ![]() ![]() Group: Members Posts: 4 Joined: 3-November 07 Member No.: 1,796 |
These questions are referencing pack and unpack functionality which is exposed in assembly level GPU programming. Here is example of the pack instructions supported by EXT_gpu_program4,
PK2H : pack two 16-bit floats PK2US : pack two floats as unsigned 16-bit PK4B : pack four floats as signed 8-bit PK4UB : pack four floats as unsigned 8-bit Questions 1.) Does Cg 1.5 have a direct interface to the shader hardware pack/unpack functionality (as in a function call)? 2.) If not, is there some kind of direct code template which will be optimized by the compiler and result in hardware pack/unpack instructions? 3.) If Cg 1.5 has no ability to use pack/unpack will Cg 2.0 have this functionality, with either method (1.) or (2.)? 4.) Is there an ETA for the release of Cg 2.0? By end of 2007, by 1st quarter 2008, etc? 5.) Since Cg 1.5 doesn't support SM4.0 features, I currently have to use GLSL for some shaders. I just noticed the EXT_Cg_shader addition to GLSL functionality. Is there a way in GLSL to use the pack/unpack functionality either with method (1.) direct function call, or (2.) code template which will get compiled to a hardware pack/unpack via compile time optimization. 6.) Is pack/unpack even supported at the hardware level now with GeForce 8 or are they emulated with multiple integer operations? 7.) If pack/unpack is not exposed officially in any way other than low level assembly, are all other developers just writing shaders which make us of pack/unpack in assembly? Or is there some kind of hidden, unofficial / unsupported method to do this? Thanks in advance for any type of feedback here! -------------------- Timothy Farrar :: www.farrarfocus.com/atom
|
|
|
|
Nov 5 2007, 07:49 PM
Post
#2
|
|
|
Advanced Member ![]() ![]() ![]() Group: Members Posts: 133 Joined: 14-August 07 Member No.: 416 |
1.) Does Cg 1.5 have a direct interface to the shader hardware pack/unpack functionality (as in a function call)? Yes, the pack_2half/pack_2ushort/pack_4byte/pack_4ubyte and unpack_2half/unpack_2ushort/unpack_4byte/unpack_4ubyte functions provide direct access to this functionality QUOTE 6.) Is pack/unpack even supported at the hardware level now with GeForce 8 or are they emulated with multiple integer operations? Geforce 8 maps these builtins to appropriate shift and mask operations. It also provides floatToRawIntBits and intBitsToFloat if you want to do this sort of packing (or other patterns) yourself |
|
|
|
![]() ![]() |
|
Copyright © 2008 NVIDIA® Corporation. Terms of Use | Legal Info | Privacy Policy | Time is now: 29th July 2010 - 06:20 PM |