Skip to main content
GameDev.net gamedev.net
🔒 Locked

GLSL Forced into Software

Started by jwrayth Mar 18, 2009 at 9:46 AM 2 replies 600+ views
Original Post
jwrayth
jwrayth
I've written a simple shader to blend between two textures. Tested it in Lumina and Shader Designer, and it works in Hardware and runs nice and fast. Whenever I attempt to use the shader in my own application, the framerate drops by about half. I assume the Shader is being pushed into software for some reason. Now here is the problem, what could cause a shader to run in Software other than the code of the shader itself? Since it works in hardware on 2 other Applications. I'm a bit lost on how to troubleshoot this. What else could possibly force this to run in Software? Shader Info Log and Program Info Log come back after Compile / Linking with no message. ===EDIT=== Don't worry, I'm just an idiot. As soon as I posted this I figured out the problem. A bug in my shader management system meant it re-linked my shader every so many frames. I'm an idiot :) [Edited by - jwrayth on March 18, 2009 10:04:12 AM]
BlackSeeds
BlackSeeds
if you have a NVIDIA card successfully compiled and linked shaders print no message,

ATI gives you a nice "shader(s) compiled and linked successfully..."

so if you have an NVIDIA graphics card and get no message then the shader has compiled fine, and theoretically the shader should be running in hardware.

from my experience running in software yields incorrect results and I can immediately tell the shader is not working correctly.

you say the frame rate drops by "half" but what is this in comparison to? also what is your shader doing and are the results you see looking correct?
Ingrater
Ingrater
The only software fallbacks I ever noticed was on ATI cards. And then the framerate didn't drop only half id did drop to about 0.5 fps. Is the window of your application larger than in the applications you tested the shader? If so maybe it's simply because more fillrate is needed and more pixels have to be processed.
http://3d.benjamin-thaut.de
Yann L
Yann L
Quote:
Original post by jwrayth
Whenever I attempt to use the shader in my own application, the framerate drops by about half. I assume the Shader is being pushed into software for some reason.

Eventhough you solved the problem, just this for future reference: if your pixel shaders fall back to software (which is very unlikely, unless you specifically ask for it through NVEmulate) then the framerate will not be cut in half. It will be cut by a factor of 100 to 1000.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.