mesa.git
14 years agotgsi: Fix missing test before check
Jakob Bornecrantz [Wed, 22 Sep 2010 20:29:15 +0000 (22:29 +0200)]
tgsi: Fix missing test before check

As introduced with commit d21301675c249602e19310d5b62fad424f2f2ac2

NOTE: This is a candidate for the 7.9 branch.

14 years agoir_to_mesa: Only compare vector_elements present for any_nequal/all_equal
Eric Anholt [Wed, 22 Sep 2010 20:07:57 +0000 (13:07 -0700)]
ir_to_mesa: Only compare vector_elements present for any_nequal/all_equal

Fixes: glsl-mat-from-int-ctor-03
14 years agoglsl: Fix copy'n'wasted ir_noop_swizzle conditions.
Eric Anholt [Wed, 22 Sep 2010 18:43:58 +0000 (11:43 -0700)]
glsl: Fix copy'n'wasted ir_noop_swizzle conditions.

It considered .xyyy a noop for vec4 instead of .xyzw, and similar for vec3.

14 years agoglsl: Rework assignments with write_masks to have LHS chan count match RHS.
Eric Anholt [Wed, 22 Sep 2010 18:47:03 +0000 (11:47 -0700)]
glsl: Rework assignments with write_masks to have LHS chan count match RHS.

It turns out that most people new to this IR are surprised when an
assignment to (say) 3 components on the LHS takes 4 components on the
RHS.  It also makes for quite strange IR output:

(assign (constant bool (1)) (x) (var_ref color) (swiz x (var_ref v) ))
(assign (constant bool (1)) (y) (var_ref color) (swiz yy (var_ref v) ))
(assign (constant bool (1)) (z) (var_ref color) (swiz zzz (var_ref v) ))

But even worse, even we get it wrong, as shown by this line of our
current step(float, vec4):

(assign (constant bool (1)) (w)
(var_ref t)
(expression float b2f (expression bool >=
    (swiz w (var_ref x))(var_ref edge))))

where we try to assign a float to the writemasked-out x channel and
don't supply anything for the actual w channel we're writing.  Drivers
right now just get lucky since ir_to_mesa spams the float value across
all the source channels of a vec4.

Instead, the RHS will now have a number of components equal to the
number of components actually being written.  Hopefully this confuses
everyone less, and it also makes codegen for a scalar target simpler.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
14 years agod3d1x: add Wine dlls (tri, tex working, but no other testing)
Luca Barbieri [Wed, 22 Sep 2010 17:33:54 +0000 (19:33 +0200)]
d3d1x: add Wine dlls (tri, tex working, but no other testing)

14 years agod3d1x: define GUIDs in the normal way
Luca Barbieri [Wed, 22 Sep 2010 17:31:54 +0000 (19:31 +0200)]
d3d1x: define GUIDs in the normal way

14 years agod3d1x: fix API name
Luca Barbieri [Wed, 22 Sep 2010 17:31:34 +0000 (19:31 +0200)]
d3d1x: fix API name

14 years agod3d1x: redesign the HWND resolver interface
Luca Barbieri [Wed, 22 Sep 2010 11:51:53 +0000 (13:51 +0200)]
d3d1x: redesign the HWND resolver interface

This one should be powerful enough to hook up Wine.

14 years agod3d1x: fix GUID declarations
Luca Barbieri [Wed, 22 Sep 2010 17:04:36 +0000 (19:04 +0200)]
d3d1x: fix GUID declarations

14 years agod3d1x: destroy native_display on adapter destruction
Luca Barbieri [Wed, 22 Sep 2010 14:29:36 +0000 (16:29 +0200)]
d3d1x: destroy native_display on adapter destruction

14 years agodri2: Make createImageFromName() take a __DRIscreen instead of __DRIcontext
Kristian Høgsberg [Wed, 22 Sep 2010 19:07:15 +0000 (15:07 -0400)]
dri2: Make createImageFromName() take a __DRIscreen instead of __DRIcontext

We can't expect to have a context when this is called, and we don't need one
so just require a __DRIscreen instead.

Reported by Yu Dai <yu.dai@intel.com>

14 years agor600g: fix multiple occlusion query on same id
Jerome Glisse [Wed, 22 Sep 2010 18:59:09 +0000 (14:59 -0400)]
r600g: fix multiple occlusion query on same id

When calling query begin using same query id we need to discard
previous query results.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
14 years agor600g: disable shader rebuild optimization & account cb flush packet
Jerome Glisse [Wed, 22 Sep 2010 18:00:53 +0000 (14:00 -0400)]
r600g: disable shader rebuild optimization & account cb flush packet

Shader rebuild should be more clever, we should store along each
shader all the value that change shader program rather than using
flags in context (ie change sequence like : change vs buffer, draw,
change vs buffer, switch shader will trigger useless shader rebuild).

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
14 years agollvmpipe: fix sprite texcoord setup for non-projective texturing
Brian Paul [Wed, 22 Sep 2010 17:20:48 +0000 (11:20 -0600)]
llvmpipe: fix sprite texcoord setup for non-projective texturing

Normally the Mesa state tracker uses TXP instructions for texturing.
But if a fragment shader uses texture2D() that's a TEX instruction.
In that case we were incorrectly computing the texcoord coefficients
in the point sprite setup code.  Some new comments in the code explain
things.

14 years agoconfigs: remove egl-swrast target from linux-dri config
Brian Paul [Wed, 22 Sep 2010 15:30:16 +0000 (09:30 -0600)]
configs: remove egl-swrast target from linux-dri config

14 years agointel: Fix GL_ARB_shading_language_120 commit
Kristian Høgsberg [Wed, 22 Sep 2010 15:01:11 +0000 (11:01 -0400)]
intel: Fix GL_ARB_shading_language_120 commit

Fix commit e7087175f8a04f777403366fb34b58edd00f4d60.  Move the reference to
GL_VERSION_2_1_functions to intel_extensions.c where it's available,
don't try to enable a non-existing extension and advertise 1.20 for all
intel chipsets, not just GEN4 and up.

14 years agor600g: flush color buffer after draw command
Jerome Glisse [Wed, 22 Sep 2010 14:32:44 +0000 (10:32 -0400)]
r600g: flush color buffer after draw command

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
14 years agollvmpipe: Make rgb/alpha bland func/factors match, when there is no alpha.
José Fonseca [Wed, 22 Sep 2010 14:02:10 +0000 (15:02 +0100)]
llvmpipe: Make rgb/alpha bland func/factors match, when there is no alpha.

Makes AoS blending easier, and state more canonical.

14 years agollvmpipe: Special case complementary and identify blend factors in SoA.
José Fonseca [Wed, 22 Sep 2010 13:48:28 +0000 (14:48 +0100)]
llvmpipe: Special case complementary and identify blend factors in SoA.

One multiplication instead of two.

Also fix floating point random number generation and verification.

TODO: Do the same for AoS blending.

14 years agogallivm: Add unorm support to lp_build_lerp()
José Fonseca [Sat, 11 Sep 2010 12:21:44 +0000 (13:21 +0100)]
gallivm: Add unorm support to lp_build_lerp()

Unfortunately this can cause segfault with LLVM 2.6, if x is a constant.

14 years agoutil: Flush stdout on util_format.
José Fonseca [Sat, 11 Sep 2010 12:20:27 +0000 (13:20 +0100)]
util: Flush stdout on util_format.

14 years agod3d1x: fix segfault when hashing
Luca Barbieri [Wed, 22 Sep 2010 11:54:07 +0000 (13:54 +0200)]
d3d1x: fix segfault when hashing

14 years agod3d1x: fix warning
Luca Barbieri [Wed, 22 Sep 2010 11:25:45 +0000 (13:25 +0200)]
d3d1x: fix warning

14 years agod3d1x: fix cf analysis
Luca Barbieri [Wed, 22 Sep 2010 11:24:55 +0000 (13:24 +0200)]
d3d1x: fix cf analysis

14 years agod3d1x: link with CXXFLAGS
Luca Barbieri [Wed, 22 Sep 2010 11:22:00 +0000 (13:22 +0200)]
d3d1x: link with CXXFLAGS

Otherwise, -m32 doesn't make it there.

14 years agod3d1x: add missing memory barrier
Luca Barbieri [Wed, 22 Sep 2010 11:21:13 +0000 (13:21 +0200)]
d3d1x: add missing memory barrier

14 years agod3d1x: don't build progs automatically
Luca Barbieri [Wed, 22 Sep 2010 09:35:05 +0000 (11:35 +0200)]
d3d1x: don't build progs automatically

progs requires winsys, which hasn't yet been built by the time we
go into state_trackers.

It may be a good idea to also move it into tests.

After a normal build, run make in src/gallium/state_trackers/d3d1x/progs
to build them.

14 years agowinsys: automatically build sw winsys needed by EGL and d3d1x
Luca Barbieri [Wed, 22 Sep 2010 07:37:23 +0000 (09:37 +0200)]
winsys: automatically build sw winsys needed by EGL and d3d1x

A cleaner solution would be preferable, but this does no harm and works.

14 years agoglx: decouple dri2.c and GLX, fixing Gallium EGL and d3d1x build
Luca Barbieri [Wed, 22 Sep 2010 05:44:59 +0000 (07:44 +0200)]
glx: decouple dri2.c and GLX, fixing Gallium EGL and d3d1x build

The Gallium EGL state tracker reuses dri2.c but not the GLX code.

Currently there is a bit of code in dri2.c that is incorrectly tied
to GLX: instead, make it call an helper that both GLX and Gallium EGL
implement, like dri2InvalidateBuffers.

This avoids a link error complaining that dri2GetGlxDrawableFromXDrawableId
is undefined.

Note that we might want to move the whole event translation elsewhere,
and probably stop using non-XCB DRI2 altogether, but this seems to be
the minimal fix.

14 years agonvfx: remove gl_PointCoord hack
Luca Barbieri [Wed, 22 Sep 2010 05:17:38 +0000 (07:17 +0200)]
nvfx: remove gl_PointCoord hack

Now Gallium has the proper fix, thanks to Brian Paul.

14 years agod3d1x: attempt to fix/workaround bug #30322
Luca Barbieri [Wed, 22 Sep 2010 05:15:15 +0000 (07:15 +0200)]
d3d1x: attempt to fix/workaround bug #30322

This may just be hiding some other bug though, since the types are supposed
to be the same (and it compiles for me).

Anyway, this interface will likely need to changed, since it seems Wine needs
a more powerful one capable of expressing window subregions and called at
every Present.

14 years agor600g: disable dirty handling on texture from depth code.
Dave Airlie [Wed, 22 Sep 2010 04:27:58 +0000 (14:27 +1000)]
r600g: disable dirty handling on texture from depth code.

nothing was every dirtying the object again, the mesa-demos
reflect test was just stalling.

this fixes glean readPixSanity.

14 years agor600g: make stencil readback work
Dave Airlie [Wed, 22 Sep 2010 04:19:16 +0000 (14:19 +1000)]
r600g: make stencil readback work

need to write two components to get stencil components as well

14 years agor600g: cleanup some of the DB blit code
Dave Airlie [Wed, 22 Sep 2010 02:57:45 +0000 (12:57 +1000)]
r600g: cleanup some of the DB blit code

add cb/db flush states to the blit code.
add support for the rv6xx that need special treatment.
according to R6xx_7xx_3D.pdf

set r700 CB_SHADER_CONTROL reg in blit code
docs say dual export should be disabled for DB->CB

14 years agor600g: fix typo in struct member name
Dave Airlie [Tue, 21 Sep 2010 03:16:32 +0000 (13:16 +1000)]
r600g: fix typo in struct member name

14 years agor600g: occlusion query for new design
Jerome Glisse [Wed, 22 Sep 2010 00:24:51 +0000 (20:24 -0400)]
r600g: occlusion query for new design

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
14 years agomesa: don't advertise bogus GL_ARB_shading_language_120 extension
Brian Paul [Wed, 22 Sep 2010 00:13:02 +0000 (18:13 -0600)]
mesa: don't advertise bogus GL_ARB_shading_language_120 extension

Instead of using the invalid GL_ARB_shading_language_120 extension to
determine the GLSL version, use a new ctx->Const.GLSLVersion field.
Updated the intel and r600 drivers, but untested.

See fd.o bug 29910

NOTE: This is a candidate for the 7.9 branch (but let's wait and see if
there's any regressions).

14 years agoglut: Define eventParser for non-Windows only.
Vinson Lee [Tue, 21 Sep 2010 22:17:52 +0000 (15:17 -0700)]
glut: Define eventParser for non-Windows only.

Fixes this GCC warning on MinGW build.
glut_input.c:295: warning: 'eventParser' defined but not used

14 years agoglut: Define markWindowHidden for non-Windows only.
Vinson Lee [Tue, 21 Sep 2010 22:11:00 +0000 (15:11 -0700)]
glut: Define markWindowHidden for non-Windows only.

Fixes this GCC warning on MinGW build.
glut_event.c:255: warning: 'markWindowHidden' defined but not used

14 years agosoftpipe: add missing calls to set draw vertex samplers/views
Brian Paul [Tue, 21 Sep 2010 21:29:26 +0000 (15:29 -0600)]
softpipe: add missing calls to set draw vertex samplers/views

Part of the fix for running softpipe w/ LLVM-enabled draw module.

14 years agogallivm: fix lp_build_sample_compare()
Brian Paul [Tue, 21 Sep 2010 21:25:31 +0000 (15:25 -0600)]
gallivm: fix lp_build_sample_compare()

The old code didn't really make sense.  We only need to compare the
X channel of the texture (depth) against the texcoord.

For (bi)linear sampling we should move the calls to this function
and compute the final result as (s1+s2+s3+s4) * 0.25.  Someday.

This fixes the glean glsl1 shadow2D() tests.  See fd.o bug 29307.

14 years agod3d1x: ignore errors while building docs
Luca Barbieri [Tue, 21 Sep 2010 21:21:35 +0000 (23:21 +0200)]
d3d1x: ignore errors while building docs

Some versions of dot apparently lack pdf output.

14 years agor600g: fix multi buffer rendering
Jerome Glisse [Tue, 21 Sep 2010 20:56:59 +0000 (16:56 -0400)]
r600g: fix multi buffer rendering

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
14 years agoglsl2: fix typo in error msg
Brian Paul [Tue, 21 Sep 2010 20:56:58 +0000 (14:56 -0600)]
glsl2: fix typo in error msg

14 years agod3d1x: fix GCC 4.1/4.2 build
Luca Barbieri [Tue, 21 Sep 2010 20:47:09 +0000 (22:47 +0200)]
d3d1x: fix GCC 4.1/4.2 build

14 years agod3d1x: add template parameters to base class ctor calls for GCC 4.4
Luca Barbieri [Tue, 21 Sep 2010 20:34:40 +0000 (22:34 +0200)]
d3d1x: add template parameters to base class ctor calls for GCC 4.4

GCC 4.5 is fine without them, but GCC 4.4 requires them.
Should fully fix the build on GCC 4.4

14 years agod3d1x: fix build with compilers other than GCC 4.5
Luca Barbieri [Tue, 21 Sep 2010 20:08:37 +0000 (22:08 +0200)]
d3d1x: fix build with compilers other than GCC 4.5

There was some libstdc++-specific code that would only build with GCC 4.5
Now it should be much more compatible, at the price of reimplementing
the generic hash function.

14 years agogallium/docs: The RET opcode may appear anywhere in a subroutine.
Tilman Sauerbeck [Tue, 21 Sep 2010 19:57:35 +0000 (21:57 +0200)]
gallium/docs: The RET opcode may appear anywhere in a subroutine.

Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
14 years agoi965: Track the windowizer's dispatch for kill pixel, promoted, and OQ
Eric Anholt [Tue, 21 Sep 2010 19:05:37 +0000 (12:05 -0700)]
i965: Track the windowizer's dispatch for kill pixel, promoted, and OQ

Looks like the problem was we weren't passing the depth to the render
target as expected, so the chip would wedge.  Fixes GPU hang in
occlusion-query-discard.

Bug #30097

14 years agoi965: Also enable CC statistics when doing OQs.
Eric Anholt [Tue, 21 Sep 2010 17:53:34 +0000 (10:53 -0700)]
i965: Also enable CC statistics when doing OQs.

This is required by the spec, so respect that.

14 years agoi965: Share the KIL_NV implementation between glsl and non-glsl.
Eric Anholt [Tue, 21 Sep 2010 17:35:50 +0000 (10:35 -0700)]
i965: Share the KIL_NV implementation between glsl and non-glsl.

14 years agor600g: directly allocate bo for user buffer
Jerome Glisse [Tue, 21 Sep 2010 18:36:44 +0000 (14:36 -0400)]
r600g: directly allocate bo for user buffer

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
14 years agoglsl: Add definition of gl_TextureMatrix inverse/transpose builtins.
Eric Anholt [Tue, 21 Sep 2010 17:08:38 +0000 (10:08 -0700)]
glsl: Add definition of gl_TextureMatrix inverse/transpose builtins.

Fixes glsl2/builtin-texturematrix.
Bug #30196.

14 years agollvmpipe: When failing free fs shader too.
José Fonseca [Tue, 21 Sep 2010 16:51:06 +0000 (17:51 +0100)]
llvmpipe: When failing free fs shader too.

14 years agollvmpipe: Describe how to profile llvmpipe.
José Fonseca [Tue, 21 Sep 2010 16:50:30 +0000 (17:50 +0100)]
llvmpipe: Describe how to profile llvmpipe.

14 years agodraw: new draw_fs.[ch] files
Brian Paul [Tue, 21 Sep 2010 16:07:52 +0000 (10:07 -0600)]
draw: new draw_fs.[ch] files

14 years agoMerge branch 'sprite-coord'
Brian Paul [Tue, 21 Sep 2010 15:57:25 +0000 (09:57 -0600)]
Merge branch 'sprite-coord'

14 years agoglx: Hold on to drawables if we're just switching to another context
Kristian Høgsberg [Tue, 21 Sep 2010 13:56:05 +0000 (09:56 -0400)]
glx: Hold on to drawables if we're just switching to another context

https://bugs.freedesktop.org/show_bug.cgi?id=30234

14 years agod3d1x: actually enable and fix blob apis
Luca Barbieri [Tue, 21 Sep 2010 14:00:45 +0000 (16:00 +0200)]
d3d1x: actually enable and fix blob apis

14 years agod3d1x: add missing file
Luca Barbieri [Tue, 21 Sep 2010 13:51:02 +0000 (15:51 +0200)]
d3d1x: add missing file

14 years agod3d1x: fix compilation with recent Wine versions installed
Luca Barbieri [Tue, 21 Sep 2010 13:39:42 +0000 (15:39 +0200)]
d3d1x: fix compilation with recent Wine versions installed

Recent Wine versions provide a d3d11shader.h, which is however empty
and was getting used instead of our non-empty one.

Correct the include path order to fix this.

14 years agod3d1x: add blob and signature extraction APIs
Luca Barbieri [Tue, 21 Sep 2010 00:39:52 +0000 (02:39 +0200)]
d3d1x: add blob and signature extraction APIs

NOTE: untested, needs a testing tool!

14 years agollvmpipe: fix flatshading in new line code
Keith Whitwell [Tue, 21 Sep 2010 13:28:51 +0000 (14:28 +0100)]
llvmpipe: fix flatshading in new line code

Calculate interpolants before rearranging the vertices.

14 years agod3d1x: add new Direct3D 10/11 COM state tracker for Gallium
Luca Barbieri [Sun, 12 Sep 2010 00:49:36 +0000 (02:49 +0200)]
d3d1x: add new Direct3D 10/11 COM state tracker for Gallium

This is a new implementation of the Direct3D 11 COM API for Gallium.

Direct3D 10 and 10.1 implementations are also provided, which are
automatically generated with s/D3D11/D3D10/g plus a bunch of #ifs.

While this is an initial version, most of the code is there (limited
to what Gallium can express), and tri, gears and texturing demos
are working.

The primary goal is to realize Gallium's promise of multiple API
support, and provide an API that can be easily implemented with just
a very thin wrapper over Gallium, instead of the enormous amount of
complex code needed for OpenGL.

The secondary goal is to run Windows Direct3D 10/11 games on Linux
using Wine.
Wine dlls are currently not provided, but adding them should be
quite easy.

Fglrx and nvidia drivers can also be supported by writing a Gallium
driver that talks to them using OpenGL, which is a relatively easy
task.
Thanks to the great design of Direct3D 10/11 and closeness to Gallium,
this approach should not result in detectable overhead, and is the
most maintainable way to do it, providing a path to switch to the
open Gallium drivers once they are on par with the proprietary ones.

Currently Wine has a very limited Direct3D 10 implementation, and
completely lacks a Direct3D 11 implementation.

Note that Direct3D 10/11 are completely different from Direct3D 9
and earlier, and thus warrant a fully separate implementation.

The third goal is to provide a superior alternative to OpenGL for
graphics programming on non-Windows systems, particularly Linux
and other free and open systems.

Thanks to a very clean and well-though design done from scratch,
the Direct3D 10/11 APIs are vastly better than OpenGL and can be
supported with orders of magnitude less code and development time,
as you can see by comparing the lines of code of this commit and
those in the existing Mesa OpenGL implementation.

This would have been true for the Longs Peak proposal as well, but
unfortunately it was abandoned by Khronos, leaving the OpenGL
ecosystem without a graphics API with a modern design.

A binding of Direct3D 10/11 to EGL would solve this issue in the
most economical way possible, and this would be great to provide
in Mesa, since DXGI, the API used to bind Direct3D 10/11 to Windows,
is a bit suboptimal, especially on non-Windows platforms.

Finally, a mature Direct3D 10/11 implementation is intrinsically going
to be faster and more reliable than an OpenGL implementation, thanks
to the dramatically smaller API and the segregation of all nontrivial
work to object creation that the application must perform ahead of
time.

Currently, this commit contains:
- Independently created headers for Direct3D 10, 10.1, 11 and DXGI 1.1,
  partially based on the existing Wine headers for D3D10 and DXGI 1.0
- A parser for Direct3D 10/11 DXBC and TokenizedProgramFormat (TPF)
- A shader translator from TokenizedProgramFormat to TGSI
- Implementation of the Direct3D 11 core interfaces
- Automatically generated implementation of Direct3D 10 and 10.1
- Implementation of DXGI using the "native" framework of the EGL st
- Demos, usable either on Windows or on this implementation
  - d3d11tri, a clone of tri
  - d3d11tex, a (multi)texturing demo
  - d3d11gears, an improved version of glxgears
  - d3d11spikysphere, a D3D11 tessellation demo (currently Windows-only)
- A downloader for the Microsoft HLSL compiler, needed to recompile
  the shaders (compiled shader bytecode is also included)

To compile this, configure at least with these options:
--with-state-trackers=egl,d3d1x --with-egl-platforms=x11
plus some gallium drivers (such as softpipe with --enable-gallium-swrast)

The Wine headers (usually from a wine-dev or wine-devel package) must
be installed.
Only x86-32 has been tested.

You may need to run "make" in the subdirectories of src/gallium/winsys/sw
and you may need to manually run "sudo make install" in
src/gallium/targets/egl

To test it, run the demos in the "progs" directory.
Windows binaries are included to find out how demos should work, and to
test Wine integration when it will be done.

Enjoy, and let me know if you manage to compile and run this, or
which issues you are facing if not.

Using softpipe is recommended for now, and your mileage with hardware
drivers may vary.
However, getting this to work on hardware drivers is also obviously very
important.

Note that currently llvmpipe is buggy and causes all 3 gears to be
drawn with the same color.
Use export GALLIUM_DRIVER=softpipe to avoid this.

Thanks to all the Gallium contributors and especially the VMware
team, whose work made it possible to implement Direct3D 10/11 much
more easily than it would have been otherwise.

14 years agor600g: Removed debug code.
Tilman Sauerbeck [Tue, 21 Sep 2010 06:13:03 +0000 (08:13 +0200)]
r600g: Removed debug code.

Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
14 years agor600g: fix eg texture borders.
Dave Airlie [Tue, 21 Sep 2010 09:57:58 +0000 (19:57 +1000)]
r600g: fix eg texture borders.

texture border regs are indexed on evergreen.

14 years agor600g: fixup evergreen miptree setup.
Dave Airlie [Tue, 21 Sep 2010 09:57:15 +0000 (19:57 +1000)]
r600g: fixup evergreen miptree setup.

eg seems to have a higher pitch aligmment requirement and uses r700 cube setup

this fixes a couple of piglit tests here.

14 years agor300/compiler: Refactor the pair instruction data structures
Tom Stellard [Thu, 16 Sep 2010 17:31:19 +0000 (10:31 -0700)]
r300/compiler: Refactor the pair instruction data structures

Use rc_pair_ prefix for all pair instruction structs

Create a named struct for pair instruction args

Replace structs radeon_pair_instruction_{rgb,alpha} with struct
radeon_pair_sub_instruction.  These two structs were nearly identical
and were creating a lot of cut and paste code.  These changes are the
first step towards removing some of that code.

14 years agor600g: set back to correct codepaths.
Dave Airlie [Tue, 21 Sep 2010 01:32:15 +0000 (11:32 +1000)]
r600g: set back to correct codepaths.

Jerome please use git diff and git show before pushing.

14 years agor600g: deal with overflow of VTX/TEX CF clauses.
Dave Airlie [Tue, 21 Sep 2010 01:24:49 +0000 (11:24 +1000)]
r600g: deal with overflow of VTX/TEX CF clauses.

running piglit's texrect-many caused the vtx to overflow.

14 years agotgsi: Remove duplicate case value.
Vinson Lee [Tue, 21 Sep 2010 01:20:04 +0000 (18:20 -0700)]
tgsi: Remove duplicate case value.

14 years agodri/nouveau: Fix software mipmap generation on 1x1 textures.
Francisco Jerez [Fri, 17 Sep 2010 18:58:43 +0000 (20:58 +0200)]
dri/nouveau: Fix software mipmap generation on 1x1 textures.

14 years agodri/nv10-nv20: Fix texturing in some cases after a base level change.
Francisco Jerez [Fri, 17 Sep 2010 18:56:48 +0000 (20:56 +0200)]
dri/nv10-nv20: Fix texturing in some cases after a base level change.

14 years agodri/nouveau: Cleanup more references to old FBOs and VBOs.
Francisco Jerez [Fri, 17 Sep 2010 14:35:49 +0000 (16:35 +0200)]
dri/nouveau: Cleanup more references to old FBOs and VBOs.

14 years agodri/nouveau: Remove unnecessary assertion.
Francisco Jerez [Fri, 17 Sep 2010 13:25:03 +0000 (15:25 +0200)]
dri/nouveau: Remove unnecessary assertion.

14 years agodri/nv04: Use nvgl_wrap_mode().
Francisco Jerez [Fri, 17 Sep 2010 13:03:14 +0000 (15:03 +0200)]
dri/nv04: Use nvgl_wrap_mode().

14 years agotgsi: Actually care what check_soa_dependencies says
Jakob Bornecrantz [Tue, 21 Sep 2010 00:16:31 +0000 (02:16 +0200)]
tgsi: Actually care what check_soa_dependencies says

Thanks to José for the more complete list of supported opcodes.

NOTE: This is a candidate for the 7.9 branch.

14 years agotgsi: Don't ignore indirect registers in tgsi_check_soa_dependencies
José Fonseca [Tue, 21 Sep 2010 00:16:19 +0000 (02:16 +0200)]
tgsi: Don't ignore indirect registers in tgsi_check_soa_dependencies

NOTE: This is a candidate for the 7.9 branch.

14 years agoFix typos in comments and debug output strings.
Timo Wiren [Mon, 20 Sep 2010 22:27:34 +0000 (15:27 -0700)]
Fix typos in comments and debug output strings.

Bug #30208.

14 years agodraw: check bitshift against PIPE_MAX_SHADER_OUTPUS
Brian Paul [Mon, 20 Sep 2010 21:34:02 +0000 (15:34 -0600)]
draw: check bitshift against PIPE_MAX_SHADER_OUTPUS

14 years agollvmpipe: check bitshift against PIPE_MAX_SHADER_OUTPUTS
Brian Paul [Mon, 20 Sep 2010 21:33:49 +0000 (15:33 -0600)]
llvmpipe: check bitshift against PIPE_MAX_SHADER_OUTPUTS

14 years agor600g: add back reference check when mapping buffer
Jerome Glisse [Mon, 20 Sep 2010 21:21:37 +0000 (17:21 -0400)]
r600g: add back reference check when mapping buffer

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
14 years agodraw: fix test for using the wide-point stage
Brian Paul [Mon, 20 Sep 2010 19:48:29 +0000 (13:48 -0600)]
draw: fix test for using the wide-point stage

As it was, we weren't obeying the draw->pipeline.point_sprite state.
Fixes point sprites in llvmpipe driver.

14 years agor600g: use pipe context for flushing inside map
Jerome Glisse [Mon, 20 Sep 2010 19:35:19 +0000 (15:35 -0400)]
r600g: use pipe context for flushing inside map

This allow to share code path btw old & new, also
remove check on reference this might make things
a little slower but new design doesn't use reference
stuff.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
14 years agollvmpipe: implement sprite coord origin modes
Brian Paul [Mon, 20 Sep 2010 19:48:02 +0000 (13:48 -0600)]
llvmpipe: implement sprite coord origin modes

14 years agopython/tests: Fixed tri.py for API and TGSI syntax changes.
Tilman Sauerbeck [Sun, 19 Sep 2010 17:25:21 +0000 (19:25 +0200)]
python/tests: Fixed tri.py for API and TGSI syntax changes.

Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
14 years agollvmpipe: rename sprite field, add sprite_coord_origin
Brian Paul [Mon, 20 Sep 2010 19:29:55 +0000 (13:29 -0600)]
llvmpipe: rename sprite field, add sprite_coord_origin

14 years agor600g: Implemented the Z and W component write for the SCS opcode.
Tilman Sauerbeck [Mon, 20 Sep 2010 19:27:59 +0000 (21:27 +0200)]
r600g: Implemented the Z and W component write for the SCS opcode.

Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
14 years agollvmpipe: clean-up, comments in setup_point_coefficient()
Brian Paul [Mon, 20 Sep 2010 19:26:27 +0000 (13:26 -0600)]
llvmpipe: clean-up, comments in setup_point_coefficient()

14 years agor600g: Honour destination operand's writemask in the SCS implementation.
Tilman Sauerbeck [Sun, 19 Sep 2010 08:06:34 +0000 (10:06 +0200)]
r600g: Honour destination operand's writemask in the SCS implementation.

If we are not going to write to the X or Y components of the destination
vector we also don't need to prepare to compute SIN or COS.

Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
14 years agollvmpipe: reformatting, remove trailing whitespace, etc
Brian Paul [Mon, 20 Sep 2010 19:07:59 +0000 (13:07 -0600)]
llvmpipe: reformatting, remove trailing whitespace, etc

14 years agollvmpipe: indentation fix
Brian Paul [Mon, 20 Sep 2010 18:55:29 +0000 (12:55 -0600)]
llvmpipe: indentation fix

14 years agollvmpipe: maintain fragment shader state for draw module
Brian Paul [Mon, 20 Sep 2010 18:52:16 +0000 (12:52 -0600)]
llvmpipe: maintain fragment shader state for draw module

14 years agosoftpipe: fix whitespace
Luca Barbieri [Mon, 20 Sep 2010 18:49:03 +0000 (20:49 +0200)]
softpipe: fix whitespace

14 years agotgsi: add switch/case opcodes to tgsi_opcode_tmp.h
Luca Barbieri [Mon, 20 Sep 2010 17:19:50 +0000 (19:19 +0200)]
tgsi: add switch/case opcodes to tgsi_opcode_tmp.h

14 years agosoftpipe: make z/s test always pass if no zsbuf, instead of crashing
Luca Barbieri [Mon, 20 Sep 2010 17:22:44 +0000 (19:22 +0200)]
softpipe: make z/s test always pass if no zsbuf, instead of crashing

D3D10 specifies this.

14 years agogallium: avoid the C++ keyword "template" in sw_winsys.h
Luca Barbieri [Mon, 20 Sep 2010 18:13:30 +0000 (20:13 +0200)]
gallium: avoid the C++ keyword "template" in sw_winsys.h

14 years agogallivm: remove debug code
Brian Paul [Mon, 20 Sep 2010 17:21:44 +0000 (11:21 -0600)]
gallivm: remove debug code

14 years agollvmpipe: fix query bug when no there's no scene
Brian Paul [Mon, 20 Sep 2010 16:50:15 +0000 (10:50 -0600)]
llvmpipe: fix query bug when no there's no scene

14 years agost/mesa: fix assertion failure in GetTexImage for cubemaps
Marek Olšák [Fri, 17 Sep 2010 00:43:38 +0000 (02:43 +0200)]
st/mesa: fix assertion failure in GetTexImage for cubemaps

Can be reproduced with mesa/demos/src/tests/blitfb.

NOTE: This is a candidate for the 7.9 branch.