[haiku-appserver] Re: profiling / acc / ROPs

  • From: "DarkWyrm" <bpmagic@xxxxxxxxxxxxxxx>
  • To: haiku-appserver@xxxxxxxxxxxxx
  • Date: Sat, 29 Jan 2005 08:14:17 -0500 EST

> Hi Stephan,

I'm not Stephan, but I can answer at least some of your questions. :)

> I will be deviating a bit from the subject maybe, but I just have to 
> ask this:
> I noticed your latest commit comments, and you mentioned  B_OP_COPY 
> there as well.
> 
> Please, help me out here:
> ->Where can I find this define?
GraphicsDefs.h

> ->is it a standard BeOS (R5/Dano) define?
Yes.

> ->Please give me a list of all options?
enum drawing_mode {
        B_OP_COPY,
        B_OP_OVER,
        B_OP_ERASE,
        B_OP_INVERT,
        B_OP_ADD,
        B_OP_SUBTRACT,
        B_OP_BLEND,
        B_OP_MIN,
        B_OP_MAX,
        B_OP_SELECT,
        B_OP_ALPHA
};

> ->Also note the values they correspond to?
The above is a cut & paste of the entry from GraphicsDefs.h -- it's an 
enumerated type with no specified numerical values to correspond to the 
entries.

> And:
> ->Exactly for what are you using this? For filling rectangles? Or 
> other
> /more things?
They are used to specify drawing modes whenever a call is made to the 
DisplayDriver class. Client applications use them in the BView graphics 
calls, whether it's FillRect or StrokeShape.

> I am asking this because I am suspecting something interesting here: 
> If 
> I am correct the drivers could accelerate this for you, but only if 
> we 
> extend the interface a bit:
> Currently these are used in the drivers:
> ->blit, rect_fill and fill_span: GXcopy (0xcc)
> ->invert_rect: GXinvert (0x55)
> 
> If you are having the same values then (with an update especially for 
> Haiku) we could relay them to the driver if you call these hooks. You 
> can choose from a 'pallette' of 16 of them if I recall correctly. 
> Actually, while we use 'fixed' ROP's (Raster OPerations), Linux XFree 
> drivers indeed let the system/apps set the ROP...
Do you mean that we would have to extend the graphics driver interface? 
I don't know if we can do that now or if it has to wait until R2. It 
would be nice to be able to accelerate anything that we can that's 
practical to do so.

That reminds me. What kinds of things *can* a graphics card accelerate?

--DW


Other related posts: