From: Brian Paul <brian.paul@tungstengraphics.com>
To: Discuss issues related to the xorg tree <xorg@lists.freedesktop.org>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: State of Linux graphics
Date: Thu, 01 Sep 2005 09:24:35 -0600 [thread overview]
Message-ID: <43171D33.9020802@tungstengraphics.com> (raw)
In-Reply-To: <1125547173.4798.289.camel@evo.keithp.com>
Just a few comments...
Keith Packard wrote:
> Again, the question is whether a mostly-software OpenGL implementation
> can effectively compete against the simple X+Render graphics model for
> basic 2D application operations, and whether there are people interested
> in even trying to make this happen.
I don't know of anyone who's writen a "2D-centric" Mesa driver, but
it's feasible. The basic idea would be to simply fast-path a handful
of basic OpenGL paths that correspond to the basic X operations:
1. Solid rect fill: glScissor + glClear
2. Blit/copy: glCopyPixels
3. Monochrome glyphs: glBitmap
4. PutImage: glDrawPixels
Those OpenGL commands could be directly implemented with whatever
mechanism is used in conventional X drivers. I don't think the
overhead of going through the OpenGL/Mesa API would be significant.
If Xgl used those commands and you didn't turn on fancy blending, etc.
the performance should be fine. If the hardware supported blending,
that could be easily exposed too. The rest of OpenGL would go through
the usual software paths (slow, but better than nothing).
It might be an interesting project for someone. After one driver was
done subsequent ones should be fairly easy.
>>| ... However, at the
>>| application level, GL is not a very friendly 2D application-level API.
>>
>>The point of OpenGL is to expose what the vast majority of current
>>display hardware does well, and not a lot more. So if a class of apps
>>isn't "happy" with the functionality that OpenGL provides, it won't be
>>happy with the functionality that any other low-level API provides. The
>>problem lies with the hardware.
>
>
> Not currently; the OpenGL we have today doesn't provide for
> component-level compositing or off-screen drawable objects. The former
> is possible in much modern hardware, and may be exposed in GL through
> pixel shaders, while the latter spent far too long mired in the ARB and
> is only now on the radar for implementation in our environment.
>
> Off-screen drawing is the dominant application paradigm in the 2D world,
> so we can't function without it while component-level compositing
> provides superior text presentation on LCD screens, which is an
> obviously increasing segment of the market.
Yeah, we really need to make some progress with off-screen rendering
in our drivers (either Pbuffers or renderbuffers). I've been working
on renderbuffers but we really need that overdue memory manager.
>>Jon's right about this: If you can accelerate a given simple function
>>(blending, say) for a 2D driver, you can accelerate that same function
>>in a Mesa driver for a comparable amount of effort, and deliver a
>>similar benefit to apps. (More apps, in fact, since it helps
>>OpenGL-based apps as well as Cairo-based apps.)
>
> Yes, you *can*, but the amount of code needed to perform simple
> pixel-aligned upright blends is a tiny fraction of that needed to deal
> with filtering textures and *then* blending. All of the compositing code
> needed for the Render extension, including accelerated (MMX) is
> implemented in 10K LOC. Optimizing a new case generally involves writing
> about 50 lines of code or so.
If the blending is for screen-aligned rects, glDrawPixels would be a
far easier path to optimize than texturing. The number of state
combinations related to texturing is pretty overwhelming.
Anyway, I think we're all in agreement about the desirability of
having a single, unified driver in the future.
-Brian
next prev parent reply other threads:[~2005-09-01 15:26 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-30 16:03 State of Linux graphics Jon Smirl
2005-08-30 17:26 ` David Reveman
2005-08-30 18:13 ` Jon Smirl
2005-08-30 22:38 ` Dave Airlie
2005-08-31 6:33 ` Allen Akin
2005-08-31 8:11 ` Anshuman Gholap
2005-08-31 17:20 ` David Reveman
2005-08-31 17:48 ` Jim Gettys
2005-08-31 18:23 ` Jon Smirl
2005-08-31 19:06 ` Allen Akin
2005-08-31 19:14 ` Jim Gettys
2005-08-31 18:29 ` Keith Packard
2005-08-31 20:06 ` Allen Akin
2005-08-31 20:20 ` Ian Romanick
2005-09-01 1:04 ` James Cloos
2005-08-31 21:06 ` Keith Packard
2005-09-01 1:58 ` Allen Akin
2005-09-01 3:11 ` Ian Romanick
2005-09-01 6:00 ` Antonio Vargas
2005-09-01 10:20 ` Alan Cox
2005-09-01 13:57 ` Antonio Vargas
2005-09-01 6:11 ` Allen Akin
2005-09-01 3:59 ` Keith Packard
2005-09-01 15:24 ` Brian Paul [this message]
2005-09-01 15:59 ` Jim Gettys
2005-09-01 16:39 ` Andreas Hauser
2005-09-01 20:18 ` Jim Gettys
2005-09-01 20:38 ` Jon Smirl
2005-09-01 21:29 ` Sean
2005-09-01 16:09 ` Alan Cox
2005-09-01 16:04 ` Brian Paul
2005-09-01 17:21 ` Ian Romanick
2005-09-01 17:26 ` Keith Whitwell
2005-09-01 20:03 ` Allen Akin
2005-08-31 3:11 ` Daniel Stone
2005-08-31 4:29 ` Jon Smirl
2005-08-31 4:50 ` Jon Smirl
[not found] ` <1125464500.8730.68.camel@localhost.localdomain>
2005-08-31 5:17 ` Jon Smirl
2005-08-31 5:23 ` Jon Smirl
2005-08-31 5:40 ` Jon Smirl
2005-08-31 6:15 ` Eric Anholt
2005-08-31 13:38 ` Jon Smirl
-- strict thread matches above, loose matches on Subject: below --
2005-09-02 2:44 rep stsb
2005-09-03 4:00 mcartoaje
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43171D33.9020802@tungstengraphics.com \
--to=brian.paul@tungstengraphics.com \
--cc=linux-kernel@vger.kernel.org \
--cc=xorg@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox