[comp.sys.sun] Graphics Processor and Frame Buffers

coco@rutgers.edu (Joe X3238) (03/31/89)

I have a 3/260 CXP with a GP2 graphics processor.  I don't know much about
the GP2 and I will need to start using it soon.  There are a few things I
don't understand :

-  What is the difference between the default frame buffer(/dev/fb) and the
   cgtwo frame buffer(/dev/cgtwo)?  The documentation says that the GP2 can
   only be bound to cgtwo frame buffers. Is this the case?  Could I (or would
   I want to) bind the GP2 to /dev/fb?

-  If gpconfig redirects /dev/fb to use GP2, what is the difference
   between these two window invokations :
	sunview
	sunview -d /dev/gpone0a

-  Does the GP2 add any performance to regular window operations such as
   resizing, moving etc.

-  Does allowing sunview to run on a frame buffer and not the GP2 give you
   anything?  e.g. sunview -d /dev/cgtwo0

-  Any other general information about experiences with programming the
   GP2 using either GPSI or the Viewport Package would be appreciated. 


	Thanks in advance,

	Joseph Coco
	Lockheed Electronics
	lecgwy!mdlrth.dnet!coco@rutgers.rutgers.edu

mccoy@ucbvax.berkeley.edu (Daniel McCoy) (04/25/89)

lecgwy!mdlrth.dnet!coco@rutgers.edu (Joe X3238) writes:
>I have a 3/260 CXP with a GP2 graphics processor.  I don't know much about
>the GP2 and I will need to start using it soon.  There are a few things I
>don't understand :
>
>-  What is the difference between the default frame buffer(/dev/fb) and the
>   cgtwo frame buffer(/dev/cgtwo)?  The documentation says that the GP2 can
>   only be bound to cgtwo frame buffers. Is this the case?  Could I (or would
>   I want to) bind the GP2 to /dev/fb?

You wouldn't want to.  /dev/fb is not a real device, see the man page for
fb(4).

>-  If gpconfig redirects /dev/fb to use GP2, what is the difference
>   between these two window invokations :
>	sunview
>	sunview -d /dev/gpone0a

The second one may have synchronization problems if you run programs under
sunview that open /dev/fb explicitly (bad) rather than finding the device
through the window system (good).

>-  Does the GP2 add any performance to regular window operations such as
>   resizing, moving etc.

Not much. 

>-  Does allowing sunview to run on a frame buffer and not the GP2 give you
>   anything?  e.g. sunview -d /dev/cgtwo0

It gives you synchronization problems if you run programs under sunview
that access /dev/gpone0a.  Also programs that play by the rules and get
the device from the window system won't know you have a GP2.

>-  Any other general information about experiences with programming the
>   GP2 using either GPSI or the Viewport Package would be appreciated. 

Avoid the Viewport Package.  Period.  The DEV_GP1 package is easier to
deal with.  Using GPSI directly is doable, but if you do, plan to spend
some time debugging buffer stuffing code.  DEV_GP1 will save you from the
most of the headaches.

Performance tips:
-For vectors, pack a lot of points into each command.
-Grouping like commands together is faster than mixing them up.
-Eat more vegetables and less fat.

	Dan McCoy 

foo@rice.edu (Mark Hall) (05/05/89)

pixar!pixar!mccoy@ucbvax.berkeley.edu (Daniel McCoy) writes:
>lecgwy!mdlrth.dnet!coco@rutgers.edu (Joe X3238) writes:
>>I have a 3/260 CXP with a GP2 graphics processor.  I don't know much about
>>the GP2 and I will need to start using it soon.  There are a few things I
>>don't understand :
>>
>>   GP2 using either GPSI or the Viewport Package would be appreciated. 
>
>Avoid the Viewport Package.  Period.  The DEV_GP1 package is easier to
>deal with.  Using GPSI directly is doable, but if you do, plan to spend
>some time debugging buffer stuffing code.  DEV_GP1 will save you from the
>most of the headaches.
>
>	Dan McCoy 

The problem with DEV_GP1 package is that IT IS UNSUPPORTED.  I had many
headaches with it a year ago. It had a bug where occasionally (in my case,
every time I was running a demo) hang up, pegging the CPU. Of course, no
one at SUN would look into it. Eventually, the 4.0 version came out and
the lockup problem seems to have been solved. Perhaps that was the last
bug :^)

Why would a vendor make hardware where you have to use an unsupported
package to get the speed out of it? At the time, CORE was the only
supported package for the GPs. For these reasons, I have been telling
graphics people to avoid SUN hardware. 

Are the newer Graphics Accelerators accessible at lower (read FAST)
levels? Or do you have to use PHIGS to use the power of the accelerator?

 - mark