PDA

View Full Version : GL_ARB_get_program_binary



V-man
11-06-2010, 06:45 PM
The extension is supported when I check for it but when I call
glGetIntegerv(0x87FE/*GL_NUM_PROGRAM_BINARY_FORMATS*/, &numberOfBinaryFormats);

it tosses GL_INVALID_ENUM.
Do I have to make a GL 3.3 context?
I am only making a GL 2.1 context.

//EDIT : ok, I made a GL 3.3 context with WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB and I'm still getting the same [censored].

Alfonse Reinheart
11-06-2010, 08:22 PM
The extension is supported, so the call should be valid. So this is clearly a driver bug.

V-man
11-07-2010, 10:32 AM
int u=10;
glGetIntegerv(GL_PROGRAM_BINARY_FORMATS, &u);

doesn't write a value to my u variable and fails.

glGetProgramiv(HProgramObject, GL_PROGRAM_BINARY_LENGTH, &binaryLength);
works also.

glGetProgramBinary works also.

And as for reloading the binary :
glProgramBinary works but the link status says "unknown program binary".

V-man
11-07-2010, 12:42 PM
Someone on his webpage says he gets 0x8E21 so that's what I put and it works for me.
I guess I'll forget about
glGetIntegerv(GL_NUM_PROGRAM_BINARY_FORMATS
and
glGetIntegerv(GL_PROGRAM_BINARY_FORMATS

for now.
Hope nVidia fixes it.

Aleksandar
11-08-2010, 01:56 PM
Thank you V-man for drawing attention to something that worked previously. With the first GL4.1 beta drivers NVIDIA released, binary shaders worked perfectly.

After first enthusiastic effort to find out how it works, I ceased to play with binary shaders. After your post I tried to revive (more than 3 months) old examples and ... as you mentioned, it doesn't work correctly with the latest drivers (260.99 on Vista 32-bit).

1. glGetIntegerv(GL_NUM_PROGRAM_BINARY_FORMATS, &numBinaryFormats) leaves numBinaryFormats uninitialized (unchanged).

2. The more serious error is generated by glGetProgramiv(m_ID, GL_LINK_STATUS, &success). It crushes the application if the version of the binary shader is adequate.

Chris Lux
11-09-2010, 02:34 AM
could you try the 260.93 or 261.00 drivers? They come with a newer OpenGL 4.1 implementation from Nvidia.

260.93
http://developer.nvidia.com/object/nsight-downloads.html

261.00
http://developer.download.nvidia.com/com....00_general.exe (http://developer.download.nvidia.com/compute/cuda/3_2/drivers/devdriver_3.2_winvista-win7_32_261.00_general.exe)
http://developer.download.nvidia.com/com....00_general.exe (http://developer.download.nvidia.com/compute/cuda/3_2/drivers/devdriver_3.2_winvista-win7_64_261.00_general.exe)
http://developer.download.nvidia.com/com....00_general.exe (http://developer.download.nvidia.com/compute/cuda/3_2/drivers/devdriver_3.2_winxp_32_261.00_general.exe)
http://developer.download.nvidia.com/com....00_general.exe (http://developer.download.nvidia.com/compute/cuda/3_2/drivers/devdriver_3.2_winxp_64_261.00_general.exe)

Thx
-chris

Aleksandar
11-09-2010, 10:57 AM
Thank you for reminding me about unofficial 261.00 drivers. I have tried them too, and, as expected, they behave identically.
I'll try 262.99. They just arrived. But so far the first and last drivers that behaved correctly according to binary shaders were 259.09.

P.S. Oh, 262.99 are WHQL-certified drivers for the GTX580 only. :(

Chris Lux
11-09-2010, 12:03 PM
You can get them to install on the 400 line by adding the following lines to the corresponding sections in the nv_disp.inf file.



[NVIDIA_SetA_Devices.NTamd64.6.1]
%NVIDIA_DEV.06C0.01% = Section012, PCI\VEN_10DE&DEV_06C0
%NVIDIA_DEV.06C4.01% = Section012, PCI\VEN_10DE&DEV_06C4
%NVIDIA_DEV.06CD.01% = Section012, PCI\VEN_10DE&DEV_06CD


[Strings]
DiskID1 = "NVIDIA Windows Vista / Windows 7 (64 bit) Driver Library Installation Disk 1"
NVIDIA = "NVIDIA"
NVIDIA_A = "NVIDIA"
NVIDIA_B = "NVIDIA "
NVIDIA_DEV.06C0.01 = "NVIDIA GeForce GTX 480"
NVIDIA_DEV.06C4.01 = "NVIDIA GeForce GTX 465"
NVIDIA_DEV.06CD.01 = "NVIDIA GeForce GTX 470"

Aleksandar
11-09-2010, 01:27 PM
OK! Thank you!
But I really doubt they change anything but adding a support for GTX580.

Thanks anyway!

V-man
11-09-2010, 03:40 PM
Thank you V-man for drawing attention to something that worked previously. With the first GL4.1 beta drivers NVIDIA released, binary shaders worked perfectly.

After first enthusiastic effort to find out how it works, I ceased to play with binary shaders. After your post I tried to revive (more than 3 months) old examples and ... as you mentioned, it doesn't work correctly with the latest drivers (260.99 on Vista 32-bit).

1. glGetIntegerv(GL_NUM_PROGRAM_BINARY_FORMATS, &numBinaryFormats) leaves numBinaryFormats uninitialized (unchanged).

2. The more serious error is generated by glGetProgramiv(m_ID, GL_LINK_STATUS, &success). It crushes the application if the version of the binary shader is adequate.

I'm also on Vista 32 bit and I was using 260.99 (available to the public). glGetProgramiv(m_ID, GL_LINK_STATUS never crashed on me. The only important thing was the binary format so that I could "GET" from GL and "SET" to GL the binary shader.
0x8E21 is the magic number!

I am still coding. I will soon see how fast launching my app will be.

Piers Daniell
11-09-2010, 05:33 PM
The queries for GL_NUM_PROGRAM_BINARY_FORMATS and GL_PROGRAM_BINARY_FORMATS are currently broken in the latest NVIDIA drivers. This will be fixed with new drivers coming out soon. In the meantime you can assume GL_NUM_PROGRAM_BINARY_FORMATS returns 1 and GL_PROGRAM_BINARY_FORMATS returns 0x8E21 as you correctly figured out. Sorry for this inconvenience.

jpchristin
11-23-2010, 02:09 PM
Anyone knows when this will be fixed ?

Aleksandar
11-25-2010, 01:39 PM
I've just installed 263.06 and everything stays the same.
Assume GL_NUM_PROGRAM_BINARY_FORMATS is 1 and keep going! ;)

Does glGetProgramiv(m_ID, GL_LINK_STATUS, &success) crush on your configuration if you are using old binary shaders?

V-man
12-02-2010, 03:40 PM
Do you mean binary shaders from your previous driver?

If you mean the same driver, I don't have any crashes loading a binary and calling glGetProgramiv(m_ID, GL_LINK_STATUS, &success).

Chris Lux
12-02-2010, 04:33 PM
There are again newer drivers (265.90 Quadro). They again come with a newer OpenGL 4.1 implementation from Nvidia.

265.90
http://www.nvidia.com/object/quadro-win7-winvista-64bit-265.90-driver.html

To install them on GeForce cards you can use the same solution as above.

Regards
-chris

Aleksandar
12-03-2010, 11:03 AM
Do you mean binary shaders from your previous driver? If you mean the same driver, I don't have any crashes loading a binary and calling glGetProgramiv(m_ID, GL_LINK_STATUS, &success).
No, I meant loading binary shaders from the first (beta) version that supported them. Of course that it should succeed for the same driver version. But in the case of incompatibility issues, linking should not succeed and that is a signal to recompile shaders. Well, glGetProgramiv crushes if old binary shaders are tried to be linked (much shorter record than in the current version), on NV 8600GT/8600M GT/9600GT with both XP and Vista 32-bit. But it works (somehow) on GTX470.

Newer mind, I've just asked. I'll try new 265.90 drivers.

Aleksandar
12-05-2010, 01:01 PM
The queries for GL_NUM_PROGRAM_BINARY_FORMATS and GL_PROGRAM_BINARY_FORMATS are fixed up in 265.90 drivers.
The problem with GL_LINK_STATUS on 8xxx/9xxx cards still persists.