No shader compiler output file

I've installed the 2.8 SDK and am using the PVRUnisco Editor and SGX5xx compilers.  When I try to compile some simple glsl files (like sample files from the SDK) the compiler runs and gives back profile information, but I never get an output file in the directory specified.  Is this compiler actually supposed to produce output?


Here's an example .glsl fragment shader I tried to compile:



precision mediump float;

 

varying vec2 v_texCoord;

 

uniform sampler2D s_texture;

 

void main() {
    gl_FragColor = texture2D(s_texture, v_texCoord);
}

And here's the command that was run:


C:Shaders>"C:Program Files (x86)Imagination TechnologiesPOWERVR SDKPVRUniSCoOGLESWindows_x86_32PVRUniSCo_SGX540.exe" "C:Shaderssimple_fragment_shader.glsl" "C:Shaderssimple_fragment_shader.fsc" -f

After I run this, there's nothing in the directory.  When I run it in the tool, it says it was successful.

What am I doing wrong?  Do I need a special compiler from my chip vendor? Is this a problem because of 64-bit Windows? (Seems like it runs just fine...).  Some other problem?


Thanks...

Hi,





The compiler we provide with the SDK is supplied to give cycle count estimates. It cannot be used to generate shader binaries for any devices using POWERVR hardware.





We can provide you with a shader compiler for your target device, but the binaries it produces are tied to a very particular setup (hardware revision, driver revision etc), which means using them is not as portable as compiling shaders on-line (on device) from source.





If you’re not familiar with the extension, it may be worth looking at GL_OES_get_program_binary . You can use this extension to retrieve a compiled binary on a given device so that it can be cached for later use. This means you can deploy shader source to all target POWERVR platforms, but they can also benefit from the performance of using pre-compiled shaders.


There is a Training Course in the SDK called BinaryShader that demonstrates the use of this extension. Joe2011-06-14 10:32:26

Hi Joe, this is what I suspected, thanks for your help.  As a side note, I was unable to find any confirmation or explanation of this fact on the web or in the product docs… perhaps this post will serve that purpose for the next person to come along.


 

I'll check out the extension mechanism, I think that would work well.

 

Thanks,

-P

Joe, one more question. Does the offline compiler (either SDK or custom to a particular chip) contain any optimizations (e.g. loop unrolling, etc.) or other advanced features that I wouldn’t get access to when using the extension mechanism you described?  Or would I get essenially the same code?

 

Thanks...

The optimizations performed in the offline and online compilers are the same. The binary you can retrieve using the extension will perform just as well.