It is true that a gl_shader_program with ID 0 will be a fixed-function
fragment program; a gl_program with ID 0 but NULL gl_shader_program
means that it's a fixed-function vertex shader.
But that's not terribly interesting or relevant to what we're doing.
We just need to know that ID 0 means "fixed function".
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
if (prog) {
shader_num = prog->Name;
- /* The fixed function fragment shader generates GLSL IR with a Name
- * of 0, and nothing else does.
- */
if (prog->Label) {
shader_name = prog->Label;
- } else if (shader_num == 0 &&
- (brw->shader_time.types[i] == ST_FS8 ||
- brw->shader_time.types[i] == ST_FS16)) {
+ } else if (shader_num == 0) {
shader_name = "ff";
} else {
shader_name = "glsl";