Sonic and Sega Retro Message Board: GL_ATI_text_fragment_shader on Mac OS X / PowerPC - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
Page 1 of 1
    Locked
    Locked Forum

GL_ATI_text_fragment_shader on Mac OS X / PowerPC

#1 User is offline GerbilSoft 

Posted 14 February 2011 - 06:03 AM

  • RickRotate'd.
  • Posts: 2027
  • Joined: 11-January 03
  • Gender:Male
  • Location:USA
  • Project:Gens/GS
  • Wiki edits:158
So my test platform for Mac OS X is a Power Mac G4 (MDD) running OS X 10.5.7 with 2x G4 CPUs running at 1.25 GHz. Its video card is a Radeon 9000, which doesn't support GL_ARB_fragment_program; however, it does support GL_ATI_text_fragment_shader. I attempted to port the paused shader to GL_ATI_text_fragment_shader, but it seems something didn't work right.

(Note: Before anyone says anything, these screenshots are showing savestates, not actual emulation. The CPU emulation cores are still written in x86 assembler, but the VDP core [C++] works fine on PPC.)

First, the S3&K title screen when using the software-rendered pause tint: (left == unpaused, right == paused)


Next, the S3&K title screen when using the GL_ATI_text_fragment_shader version: (left == no-op; right == pause tint)


(The no-op version is effectively a shader that does nothing. I included a screenshot of it to make it easier to see what's going on.)

Here's the relevant source code.

GL_ARB_fragment_program version (works correctly):

CODE
!!ARBfp1.0
OPTION ARB_precision_hint_fastest;
PARAM grayscale = {0.299, 0.587, 0.114, 0.0};
TEMP t0, color;
TEX t0, fragment.texcoord[0], texture[0], 2D;
DP3 color, t0, grayscale;
ADD_SAT color.z, color.z, color.z;
MOV result.color, color;
END

GL_ATI_text_fragment_shader version (fails horribly):

CODE
!!ATIfs1.0
StartConstants;
  CONSTANT c0 = {0.299, 0.587, 0.114};
EndConstants;
StartOutputPass;
  SampleMap r0, t0.str;
  DOT3 r0.rgb, r0, c0;
  ADD r0.b.sat, r0.b, r0.b;
EndPass;

Any ideas as to why the GL_ATI_text_fragment_shader version isn't working correctly?

EDIT: But wait, there's more: Ubuntu 9.10 / PowerPC apparently has GL_ATI_fragment_shader, which is the same thing, except instead of having a textual representation of the shader, you have to build it with multiple function calls. I'll try porting the shader to GL_ATI_fragment_shader later and see if that works. If it does, then it's fairly obvious that OS X's Radeon driver is broken.
This post has been edited by GerbilSoft: 14 February 2011 - 06:43 AM

Page 1 of 1
    Locked
    Locked Forum

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users