Re: [Mesa3d-dev] GSOC: Gallium R300 driver

2010-03-30 Thread Marek Olšák
On Tue, Mar 30, 2010 at 7:09 AM, Tom Stellard tstel...@gmail.com wrote: On Sat, Mar 27, 2010 at 02:11:54AM +0100, Marek Olšák wrote: From the driver point of view, we don't have to work on the GLSL compiler itself. The Mesa state tracker compiles GLSL to an assembler-like language

Re: [Mesa3d-dev] GSOC: Gallium R300 driver

2010-03-30 Thread Nicolai Haehnle
Reply to all this time... On Tue, Mar 30, 2010 at 8:13 AM, Marek Olšák mar...@gmail.com wrote: 1) Branching and looping This is the most important one and there are 3 things which need to be done. * Unrolling loops and converting conditionals to multiplications. This is crucial for

Re: [Mesa3d-dev] GSOC: Gallium R300 driver

2010-03-30 Thread Luca Barbieri
Another idea was to convert TGSI to a SSA form. That would make unrolling branches much easier as the Phi function would basically become a linear interpolation, loops and subroutines with conditional return statements might be trickier. The r300 compiler already uses SSA for its optimization

Re: [Mesa3d-dev] GSOC: Gallium R300 driver

2010-03-30 Thread José Fonseca
On Tue, 2010-03-30 at 08:37 -0700, Luca Barbieri wrote: Another idea was to convert TGSI to a SSA form. That would make unrolling branches much easier as the Phi function would basically become a linear interpolation, loops and subroutines with conditional return statements might be

Re: [Mesa3d-dev] GSOC: Gallium R300 driver

2010-03-30 Thread Luca Barbieri
There are several deep challenges in making TGSI - LLVM IR translation lossless -- I'm sure we'll get around to overcome them -- but I don't think that using LLVM is a requirement for this module. Having a shared IR for simple TGSI optimization module would go a long way by itself. What are

Re: [Mesa3d-dev] GSOC: Gallium R300 driver

2010-03-30 Thread Luca Barbieri
DDX/DDY could cause miscompilation, but I think that only happens if LLVM clones or causes some paths to net execute them. Someone proposed some time ago on llvmdev to add a flag to tell llvm to never duplicate an intrinsic, not sure if that went through (iirc, it was for a barrier instruction

Re: [Mesa3d-dev] gallium raw interfaces

2010-03-30 Thread Keith Whitwell
On Sun, 2010-03-28 at 23:56 -0700, Chia-I Wu wrote: On Mon, Mar 29, 2010 at 1:51 AM, Keith Whitwell keith.whitw...@googlemail.com wrote: I've just pushed a variation on a theme a couple of people have explored in the past, ie. an interface to gallium without an intervening state-tracker.

Re: [Mesa3d-dev] GSOC: Gallium R300 driver

2010-03-30 Thread Corbin Simpson
On Tue, Mar 30, 2010 at 8:37 AM, Luca Barbieri luca.barbi...@gmail.com wrote: Another idea was to convert TGSI to a SSA form. That would make unrolling branches much easier as the Phi function would basically become a linear interpolation, loops and subroutines with conditional return

Re: [Mesa3d-dev] GSOC: Gallium R300 driver

2010-03-30 Thread Corbin Simpson
On Tue, Mar 30, 2010 at 10:05 AM, Luca Barbieri luca.barbi...@gmail.com wrote: DDX/DDY could cause miscompilation, but I think that only happens if LLVM clones or causes some paths to net execute them. Someone proposed some time ago on llvmdev to add a flag to tell llvm to never duplicate an

Re: [Mesa3d-dev] GSOC: Gallium R300 driver

2010-03-30 Thread Brian Paul
This is getting off-topic, but anyway... Luca Barbieri wrote: There are several deep challenges in making TGSI - LLVM IR translation lossless -- I'm sure we'll get around to overcome them -- but I don't think that using LLVM is a requirement for this module. Having a shared IR for simple TGSI

Re: [Mesa3d-dev] GSOC: Gallium R300 driver

2010-03-30 Thread Zack Rusin
On Tuesday 30 March 2010 12:52:54 Luca Barbieri wrote: There are several deep challenges in making TGSI - LLVM IR translation lossless -- I'm sure we'll get around to overcome them -- but I don't think that using LLVM is a requirement for this module. Having a shared IR for simple TGSI

Re: [Mesa3d-dev] GSOC: Gallium R300 driver

2010-03-30 Thread José Fonseca
On Tue, 2010-03-30 at 09:52 -0700, Luca Barbieri wrote: There are several deep challenges in making TGSI - LLVM IR translation lossless -- I'm sure we'll get around to overcome them -- but I don't think that using LLVM is a requirement for this module. Having a shared IR for simple TGSI

Re: [Mesa3d-dev] GSOC: Gallium R300 driver

2010-03-30 Thread Luca Barbieri
On Tue, 2010-03-30 at 09:52 -0700, Luca Barbieri wrote: There are several deep challenges in making TGSI - LLVM IR translation lossless -- I'm sure we'll get around to overcome them -- but I don't think that using LLVM is a requirement for this module. Having a shared IR for simple TGSI

Re: [Mesa3d-dev] Status of s3tc patent in respect to open-source drivers and workarounds

2010-03-30 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Corbin Simpson wrote: On Mon, Mar 29, 2010 at 5:50 PM, Ian Romanick i...@freedesktop.org wrote: Philipp Klaus Krause wrote: Well, there is TexSubImage2D. Assuming we have a compressed texture stored internally as some S3TC format and then the

Re: [Mesa3d-dev] gallium raw interfaces

2010-03-30 Thread Luca Barbieri
An interesting option could be to provide a DirectX 10 implementation using TGSI text as the shader interface, which should be much easier than one would think at first. DirectX 10 + TGSI text would provide a very thin binary compatible layer over Gallium, unlike all existing state trackers. It

Re: [Mesa3d-dev] GSOC: Gallium R300 driver

2010-03-30 Thread Marek Olšák
On Tue, Mar 30, 2010 at 10:26 AM, Nicolai Haehnle nhaeh...@gmail.comwrote: On Tue, Mar 30, 2010 at 8:13 AM, Marek Olšák mar...@gmail.com wrote: Another idea was to convert TGSI to a SSA form. That would make unrolling branches much easier as the Phi function would basically become a linear

[Mesa3d-dev] [PATCH] st/mesa: use BITFIELD64_BIT to access shader OutputsWritten in more places

2010-03-30 Thread skeggsb
From: Ben Skeggs bske...@redhat.com --- src/mesa/state_tracker/st_atom_rasterizer.c |2 +- src/mesa/state_tracker/st_program.c |6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesa/state_tracker/st_atom_rasterizer.c