Re: [Mesa3d-dev] [PATCH] st/mesa: do not advertise S3TC if the external lib is not available

2010-02-27 Thread Marek Olšák
OK thanks, I pushed what you suggested.

-Marek

On Sat, Feb 27, 2010 at 9:44 PM, José Fonseca  wrote:

> On Sat, 2010-02-27 at 09:15 -0800, Marek Olšák wrote:
> > Hi,
> >
> > S3TC shouldn't be advertised without the external lib and the attached
> > patch fixes that. Please review.
>
> Hi Marek,
>
> Actually it is a bit more subtle.
>
> S3TC can and should be advertised if the pipe driver supports ST3C
> decompression and *compression*.
>
> No real hardware has circuitry for S3TC compression, granted. But the
> vwmare svga gallium driver does it, by deferring everything to the host.
>
> It was the best solution we found to supporting S3TC without having to
> rely on closed source or questionable bits in the guest.
>
> So the right fix should be:
>
> screen->is_format_supported(screen, PIPE_FORMAT_DXT5_RGBA,
>PIPE_TEXTURE_2D,
>PIPE_TEXTURE_USAGE_SAMPLER, 0) &&
> (ctx->Mesa_DXTn || screen->is_format_supported(screen,
> PIPE_FORMAT_DXT5_RGBA, PIPE_TEXTURE_2D, PIPE_TEXTURE_USAGE_RENDERTARGET,
> 0)
>
> Jose
>
>
--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev


Re: [Mesa3d-dev] [PATCH] st/mesa: do not advertise S3TC if the external lib is not available

2010-02-27 Thread José Fonseca
On Sat, 2010-02-27 at 09:15 -0800, Marek Olšák wrote:
> Hi,
> 
> S3TC shouldn't be advertised without the external lib and the attached
> patch fixes that. Please review.

Hi Marek,

Actually it is a bit more subtle.

S3TC can and should be advertised if the pipe driver supports ST3C
decompression and *compression*.

No real hardware has circuitry for S3TC compression, granted. But the
vwmare svga gallium driver does it, by deferring everything to the host.

It was the best solution we found to supporting S3TC without having to
rely on closed source or questionable bits in the guest.

So the right fix should be:

screen->is_format_supported(screen, PIPE_FORMAT_DXT5_RGBA,
PIPE_TEXTURE_2D, 
PIPE_TEXTURE_USAGE_SAMPLER, 0) &&
(ctx->Mesa_DXTn || screen->is_format_supported(screen,
PIPE_FORMAT_DXT5_RGBA, PIPE_TEXTURE_2D, PIPE_TEXTURE_USAGE_RENDERTARGET,
0)

Jose


--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev


[Mesa3d-dev] [PATCH] st/mesa: do not advertise S3TC if the external lib is not available

2010-02-27 Thread Marek Olšák
Hi,

S3TC shouldn't be advertised without the external lib and the attached patch
fixes that. Please review.

-Marek
From 94c58ff449b3818a378ad4ab5787151bc0a9ea6f Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Marek=20Ol=C5=A1=C3=A1k?= 
Date: Sat, 27 Feb 2010 03:20:58 +0100
Subject: [PATCH] st/mesa: do not advertise S3TC if the external lib is not available

---
 src/mesa/state_tracker/st_extensions.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index d5f5854..7b720b3 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -298,7 +298,8 @@ void st_init_extensions(struct st_context *st)
}
 
/* s3tc support */
-   if (screen->is_format_supported(screen, PIPE_FORMAT_DXT5_RGBA,
+   if (ctx->Mesa_DXTn &&
+   screen->is_format_supported(screen, PIPE_FORMAT_DXT5_RGBA,
PIPE_TEXTURE_2D, 
PIPE_TEXTURE_USAGE_SAMPLER, 0)) {
   ctx->Extensions.EXT_texture_compression_s3tc = GL_TRUE;
-- 
1.6.3.3

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev