Commit Graph

34635 Commits

Author SHA1 Message Date
Vinson Lee a0a8e24385 r600g: Fix SCons build. 2010-10-04 15:56:55 -07:00
Jerome Glisse b25c52201b r600g: remove dead label & fix indentation
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-10-04 17:25:19 -04:00
Jerome Glisse 243d6ea609 r600g: rename radeon_ws_bo to r600_bo
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-10-04 17:25:19 -04:00
Jerome Glisse 674452faf9 r600g: use r600_bo for relocation argument, simplify code
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-10-04 17:25:19 -04:00
Jerome Glisse d22a1247d8 r600g: allow r600_bo to be a sub allocation of a big bo
Add bo offset everywhere needed if r600_bo is ever a sub bo
of a bigger bo.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-10-04 17:25:19 -04:00
Jerome Glisse 294c9fce1b r600g: rename radeon_ws_bo to r600_bo
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-10-04 17:25:19 -04:00
Krzysztof Smiechowicz 68c7994ab5 nvfx: Pair os_malloc_aligned() with os_free_aligned().
From AROS.
2010-10-04 11:43:29 -07:00
Dave Airlie 3d45d57044 r600g: TODO domain management
no wonder it was slow, the code is deliberately forcing stuff into GTT,
we used to have domain management but it seems to have disappeared.
2010-10-04 16:41:49 +10:00
Dave Airlie 1c2b3cb1e9 r600g: fix wwarning in bo_map function 2010-10-04 16:26:46 +10:00
Dave Airlie 6dc051557d r600g: the code to check whether a new vertex shader is needed was wrong
this code was memcmp'ing two structs, but refcounting one of them afterwards,
so any subsequent memcmp was never going to work.

again this stops unnecessary uploads of vertex program,
2010-10-04 16:24:59 +10:00
Dave Airlie 92aba9c1f5 r600g: break out of search for reloc bo after finding it.
this function was taking quite a lot of pointless CPU.
2010-10-04 15:58:39 +10:00
Eric Anholt 14bf92ba19 i965: Fix glean/texSwizzle regression in previous commit.
Easy enough patch, who needs a full test run.  Oh, that's right.  Me.
2010-10-03 00:24:09 -07:00
Eric Anholt a7fa00dfc5 i965: Set up swizzling of shadow compare results for GL_DEPTH_TEXTURE_MODE.
The brw_wm_surface_state.c handling of GL_DEPTH_TEXTURE_MODE doesn't
apply to shadow compares, which always return an intensity value.  The
texture swizzles can do the job for us.

Fixes:
glsl1-shadow2D(): 1
glsl1-shadow2D(): 3
2010-10-02 23:48:14 -07:00
Eric Anholt 4fb0c92c69 i965: Add support for EXT_texture_swizzle to the new FS backend. 2010-10-02 23:44:44 -07:00
Marek Olšák 8f7177e0de r300g: add support for L8A8 colorbuffers
Blending with DST_ALPHA is undefined. SRC_ALPHA works, though.
I bet some other formats have similar limitations too.
2010-10-02 23:19:38 +02:00
Marek Olšák e75bce026c r300g: add support for R8G8 colorbuffers
The hw swizzles have been obtained by a brute force approach,
and only C0 and C2 are stored in UV88, the other channels are
ignored.

R16G16 is going to be a lot trickier.
2010-10-02 21:42:22 +02:00
Dave Airlie 71a079fb4e mesa/st: initial attempt at RG support for gallium drivers
passes all piglit RG tests with softpipe.
2010-10-02 17:03:15 +10:00
Kenneth Graunke f317713432 i965: Fix incorrect batchbuffer size in gen6 clip state command.
FORCE_ZERO_RTAINDEX should be in the fourth (and final) dword.
2010-10-01 21:53:28 -07:00
Eric Anholt 64a9fc3fc1 i965: Don't try to emit code if we failed register allocation. 2010-10-01 17:19:04 -07:00
Eric Anholt 6397addd61 i965: Fix off-by-ones in handling the last members of register classes.
Luckily, one of them would result in failing out register allocation
when the other bugs were encountered.  Applies to
glsl-fs-vec4-indexing-temp-dst-in-nested-loop-combined, which still
fails register allocation, but now legitimately.
2010-10-01 17:19:04 -07:00
Eric Anholt afb64311e3 i965: Add a sanity check for register allocation sizes. 2010-10-01 17:19:03 -07:00
Eric Anholt 5ee0941316 i965: When producing a single channel swizzle, don't make a temporary.
This quickly cuts 8% of the instructions in my glsl demo.
2010-10-01 17:19:03 -07:00
Eric Anholt a0799725f5 i965: Restore the forcing of aligned pairs for delta_xy on chips with PLN.
By doing so using the register allocator now, we avoid wasting a
register to make the alignment happen.
2010-10-01 17:19:03 -07:00
Alex Deucher fb0eed84ca r600c: fix segfault in evergreen stencil code
Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=30551
2010-10-01 20:14:25 -04:00
Vinson Lee 7af2a22d1f r600g: Remove unnecessary headers. 2010-10-01 17:06:33 -07:00
Vinson Lee 20846a8ce1 r600g: Remove unused variable.
Fixes this GCC warning.
r600_shader.c: In function 'tgsi_split_literal_constant':
r600_shader.c:818: warning: unused variable 'index'
2010-10-01 17:02:01 -07:00
Ian Romanick 1ca6cbec1b rgtc: Detect RGTC formats as color formats and as compressed formats 2010-10-01 16:55:35 -07:00
Ian Romanick 5ebbabc5cc mesa: Trivial correction to comment 2010-10-01 16:55:35 -07:00
Ian Romanick 69c78bf2c2 mesa: Fix misplaced #endif
If FEATURE_texture_s3tc is not defined, FXT1 formats would erroneously
fall through to the MESA_FORMAT_RGBA_FLOAT32 case.
2010-10-01 16:55:35 -07:00
Ian Romanick 7c6147014a ARB_texture_rg: Add GL_COMPRESSED_{RED,RG} cases in _mesa_is_color_format 2010-10-01 16:55:35 -07:00
Ian Romanick e2a054b70c mesa: Add ARB_texture_compression_rgtc as an alias for EXT_texture_compression_rgtc
Change the name in the extension tracking structure to ARB (from EXT).
2010-10-01 16:55:35 -07:00
Vinson Lee e5fd15199d savage: Remove unnecessary header. 2010-10-01 16:57:19 -07:00
Vinson Lee 841503fddf glsl: Remove unnecessary header. 2010-10-01 16:27:58 -07:00
Ian Romanick c77cd9ec10 i965: Enable GL_ARB_texture_rg 2010-10-01 15:49:13 -07:00
Ian Romanick 9ef390dc14 mesa: Enable GL_ARB_texture_rg in software paths 2010-10-01 15:49:13 -07:00
Ian Romanick 421f4d8dc1 ARB_texture_rg: Allow RED and RG textures as FBO color buffer attachments 2010-10-01 15:49:13 -07:00
Ian Romanick 5d1387b2da ARB_texture_rg: Add R8, R16, RG88, and RG1616 internal formats 2010-10-01 15:49:13 -07:00
Ian Romanick 214a33f610 ARB_texture_rg: Handle RED and RG the same as RGB for tex env 2010-10-01 15:49:13 -07:00
Ian Romanick cd5dea6401 ARB_texture_rg: Add GL_RED as a valid GL_DEPTH_TEXTURE_MODE 2010-10-01 15:49:13 -07:00
Ian Romanick cc6f13def5 ARB_texture_rg: Add GL_TEXTURE_{RED,GREEN}_SIZE query support 2010-10-01 15:49:12 -07:00
Ian Romanick 3ebbc176f9 ARB_texture_rg: Correct some errors in RED / RG internal format handling
Fixes several problems:

The half-float, float, and integer internal formats depend on
ARB_texture_rg and other extensions.

RG_INTEGER is not a valid internal format.

Generic compressed formats depend on ARB_texture_rg, not
EXT_texture_compression_rgtc.

Use GL_RED instead of GL_R.
2010-10-01 15:49:12 -07:00
Ian Romanick bb45ab0a96 ARB_texture_rg: Add GLX protocol support 2010-10-01 15:49:12 -07:00
Nicolas Kaiser 96efa8a923 i965g: use Elements macro instead of manual sizeofs
Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-10-01 16:41:13 -06:00
Eric Anholt e9bcc83289 i965: Fix up copy'n'pasteo from moving coordinate setup around for gen4. 2010-10-01 14:09:00 -07:00
Eric Anholt bfd9715c3c i965: Add real support for pre-gen5 texture sampling to the new FS.
Fixes 36 testcases, including glsl-fs-shadow2d*-bias which fail on the
Mesa IR backend.
2010-10-01 14:02:48 -07:00
richard 92eb07a281 evergreen : fix z format setting, enable stencil. 2010-10-01 16:10:02 -04:00
Eric Anholt 8f63a44636 i965: Pre-gen6, map VS outputs (not FS inputs) to URB setup in the new FS.
We should fix the SF to actually give us just the data we need, but
this fixes regressions in the new FS until then.

Fixes:
glsl-kwin-blur
glsl-routing
2010-10-01 12:21:51 -07:00
Eric Anholt ff5ce9289b i965: Also increment attribute location when skipping unused slots.
Fixes glsl1-texcoord varying.
2010-10-01 12:19:21 -07:00
Eric Anholt 354c40a624 i965: Fix the gen6 jump size for BREAK/CONT in new FS.
Since gen5, jumps are in increments of 64 bits instead of increments
of 128-bit instructions.
2010-10-01 12:19:21 -07:00
Eric Anholt efc4a6f790 i965: Add gen6 attribute interpolation to new FS backend.
Untested, since my hardware is not booting at the moment.
2010-10-01 12:19:21 -07:00
Jerome Glisse 29b491bd03 r600g: indentation fixes
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-10-01 10:26:58 -04:00
Dave Airlie 738aa29289 r600g: setup basic loop consts on r600 + evergreen.
this sets up a single loop constant like r600c does.
2010-10-01 16:06:31 +10:00
Dave Airlie 7777c997e0 r600g: only set the Z export if shader exports it. 2010-10-01 16:06:30 +10:00
Alex Deucher 0c39a53aa6 r600c: pull over 6xx/7xx vertex fixes for evergreen 2010-10-01 00:51:37 -04:00
Dave Airlie 539a2978ed r600g: flush SH cache on constant change on evergreen 2010-10-01 14:43:02 +10:00
Dave Airlie b67aa5311f r600g: fix evergreen draw-buffers
just a typo in the register headers.
2010-10-01 14:24:14 +10:00
Dave Airlie 14c95bb4ee r600g: add cb flushing for extra buffers + depth buffer on r600/evergreen 2010-10-01 14:05:02 +10:00
Dave Airlie ac225c76a6 r600g: sync vertex/texture cache on resources on evergreen
this gets rid of lots of the instability on evergreen,
which isn't surprising since it really broken not to flush caches.
2010-10-01 14:04:32 +10:00
Dave Airlie d662195f00 r600g: fixup vertex format picking.
there are some vertex formats defined in r600c not in the docs.
2010-10-01 13:36:56 +10:00
Dave Airlie e973221538 r600g: add assembler support for other vtx fetch fields.
this shouldn't change behaviour, just push the choice of what
to do out to the shader.
2010-10-01 13:36:56 +10:00
Eric Anholt 1d073cb2d9 i965: Split the gen4 and gen5 sampler handling apart.
Trying to track the insanity of the different argument layouts for
normal/shadow crossed with normal/lod/bias one generation at a time is
enough.

Fixes: glsl1-texture2D() with bias.
(first test passing in this code that doesn't pass without it!)
2010-09-30 20:23:40 -07:00
Eric Anholt 5f237a1ccb i965: Use the lowering pass for texture projection.
We should end up with the same code, but anyone else with this issue
could share the handling (which I got wrong for shadow comparisons in
the driver before).
2010-09-30 20:23:40 -07:00
Eric Anholt aae338104f glsl: Add a lowering pass for texture projection. 2010-09-30 20:23:36 -07:00
Dave Airlie 35cfe286d6 r600g: realign evergreen code with r600 code.
fixes segfault in depth-tex-modes-glsl and OA startup.
2010-10-01 11:15:13 +10:00
Alex Deucher a3e9998614 r600c: add reloc for CB_COLOR0_ATTRIB
We'll need a reloc for tiling eventually,
so add it now.
2010-09-30 20:55:54 -04:00
Dave Airlie 5eccdc62b9 r600g: add reloc for evergreen color attrib
we'll need this for color tiling on evergreen.
2010-10-01 10:52:09 +10:00
Dave Airlie 40ccb235d6 r600g: drop depth quirk on evergreen
none of the EG cards need the quirk.
2010-10-01 10:30:17 +10:00
Dave Airlie 05d1d86907 r600g: add winsys support for CTL constants.
These need to be emitted, we also need them to do proper vtx start,
instead of abusing index offset.
2010-10-01 10:30:16 +10:00
Dave Airlie 084c29baed r600g: fix evergreen depth flushing.
although evergreen can apparantly sample direct from 24-bit,
just make it work with the current method for now.
2010-10-01 10:17:20 +10:00
Dave Airlie 7ae4da8056 r600g: use Elements macro instead of manual sizeofs 2010-10-01 10:17:20 +10:00
Brian Paul 66992463ac draw: check for null sampler pointers
http://bugs.freedesktop.org/show_bug.cgi?id=30516
2010-09-30 16:42:17 -06:00
Brian Paul 542d6cb1b8 gallivm: added some comments 2010-09-30 16:42:17 -06:00
John Doe 40181aef60 r600g: keep a mapping around for each bo
Save a lot of call into the kernel and thus improve performances.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-30 17:53:36 -04:00
John Doe dde1391cc9 r600g: don't double count dirty block
This avoid to overcount the number of dwords we need and
thus avoid maximazation of cs buffer use.

Signed-off-by: Jerome Glisse <jglisse@redhat.com
2010-09-30 17:38:18 -04:00
Jerome Glisse 113f1cdfce evergreeng: avoid overlapping border color btw VS & PS
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-30 17:07:28 -04:00
Eric Anholt c6960e4471 i965: Fix new FS handling of builtin uniforms with packed scalars in structs.
We were pointing each element at the .x channel of the
ParameterValues.

Fixes glsl1-linear fog.
2010-09-30 13:45:42 -07:00
Eric Anholt a7cddd7de3 mesa: Don't reference a W component in setting up a vec3 uniform component.
The 965 driver would try to set up storage for the W component, and
the offsets would get mixed up.
2010-09-30 13:45:42 -07:00
Eric Anholt 6f6542a483 i965: Fix whole-structure/array assignment in new FS.
We need to walk the type tree to get the right register types for
structure components.  Fixes glsl-fs-statevar-call.
2010-09-30 13:45:42 -07:00
Tom Fogal 3661f757ee Revert "Prefer intrinsics to handrolled atomic ops."
This reverts commit 5f66b340aa, quickly
fixing 30514.
2010-09-30 14:41:53 -06:00
Jerome Glisse 9d4ae914e2 r600g: fix constant & literal src splitting, also fix mplayer gl2 shader
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-30 16:33:12 -04:00
Tom Fogal 5f66b340aa Prefer intrinsics to handrolled atomic ops. 2010-09-30 13:20:57 -06:00
Tom Fogal 76a60faf52 Implement x86_64 atomics for compilers w/o intrinsics.
Really old gcc's (3.3, at least) don't have support for the
intrinsics we need.  This implements a fallback for that case.
2010-09-30 13:20:51 -06:00
Adam Jackson 0c86e1f294 i965: Update renderer strings for sandybridge
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-09-30 14:08:35 -04:00
Jerome Glisse 153105cfbf r600g: use constant buffer instead of register for constant
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-30 13:47:29 -04:00
Brian Paul 874f3a57ce gallivm: check for level=0 case in lp_build_minify()
This lets us avoid the shift and max() operations.
2010-09-30 10:53:30 -06:00
José Fonseca 4e6f5e8d43 gallivm: More comprehensive border usage logic. 2010-09-30 17:42:01 +01:00
Chia-I Wu e2b51b7c5b st/egl: Drop context argument from egl_g3d_get_egl_image.
Fix a regression since 17eace581d.
2010-09-30 23:45:27 +08:00
Nicolas Kaiser 4160d947d2 st: remove duplicated include
Remove duplicated include.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-09-30 09:36:31 -06:00
Nicolas Kaiser bad10b961a math: remove duplicated includes
Remove duplicated includes.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-09-30 09:36:31 -06:00
Nicolas Kaiser 9674929bce main: remove duplicated includes
Remove duplicated includes.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-09-30 09:36:31 -06:00
Nicolas Kaiser 8c92a80b62 dri/savage: remove duplicated include
Remove duplicated include.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-09-30 09:36:30 -06:00
Nicolas Kaiser 1663e6da2f dri/radeon: remove duplicated includes
Remove duplicated includes.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-09-30 09:36:30 -06:00
Nicolas Kaiser a7670be8a1 dri/r600: remove duplicated include
Remove duplicated include.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-09-30 09:36:30 -06:00
Nicolas Kaiser 223c4b4188 dri/r300: remove duplicated include
Remove duplicated include.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-09-30 09:36:30 -06:00
Nicolas Kaiser 705d98deb8 dri/r128: remove duplicated include
Remove duplicated include.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-09-30 09:36:29 -06:00
Nicolas Kaiser f094b35207 dri/mga: remove duplicated include
Remove duplicated include.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-09-30 09:36:29 -06:00
Nicolas Kaiser 1a98a46304 dri/intel: remove duplicated include
Remove duplicated include.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-09-30 09:36:29 -06:00
Nicolas Kaiser c24144f41f dri/i965: remove duplicated include
Remove duplicated include.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-09-30 09:36:24 -06:00
Nicolas Kaiser f831212eab dri/i915: remove duplicated include
Remove duplicated include.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-09-30 09:36:24 -06:00
Nicolas Kaiser b958dabe16 dri/i810: remove duplicated include
Remove duplicated include.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-09-30 09:36:24 -06:00
Nicolas Kaiser c24e062fdb dri/common: remove duplicated include
Remove duplicated include.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-09-30 09:36:24 -06:00
Nicolas Kaiser 7eed3dba58 glx: remove duplicated include
Remove duplicated include.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-09-30 09:36:23 -06:00
Nicolas Kaiser 3f28dbd9bb gallium/winsys: remove duplicated include
Remove duplicated include.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-09-30 09:36:23 -06:00
Nicolas Kaiser 218d973786 gallium/st: remove duplicated includes
Remove duplicated includes.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-09-30 09:36:23 -06:00
Nicolas Kaiser 6f136094f4 gallium/softpipe: remove duplicated include
Remove duplicated include.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-09-30 09:36:23 -06:00
Nicolas Kaiser d2149f6f22 gallium/llvmpipe: remove duplicated include
Remove duplicated include.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-09-30 09:36:23 -06:00
Nicolas Kaiser 3e472bee2d gallium/i915: remove duplicated include
Remove duplicated include.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-09-30 09:36:22 -06:00
Nicolas Kaiser b719c91c82 gallium/util: remove duplicated include
Remove duplicated include.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-09-30 09:36:21 -06:00
Nicolas Kaiser 237fa8a81c gallium/rtasm: remove duplicated include
Remove duplicated include.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-09-30 09:36:21 -06:00
Nicolas Kaiser 3b7b1db661 egl: remove duplicated include
Remove duplicated include.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-09-30 09:36:21 -06:00
Nicolas Kaiser 7d0b89fda0 swrast: remove duplicated include
Remove duplicated include.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-09-30 09:36:20 -06:00
Francisco Jerez 065163bcd2 dri/nv10: Use fast Z clears. 2010-09-30 16:48:28 +02:00
Francisco Jerez bdd19da218 dri/nouveau: Remove unnecessary flush. 2010-09-30 16:48:20 +02:00
Francisco Jerez 6f39280ba9 dri/nouveau: Have a smaller amount of larger scratch buffers.
Larger VBOs avoid many kernel trips to get them in sync with the GPU.
2010-09-30 16:46:46 +02:00
Chia-I Wu ebeb4a7e8a mapi: Fix compiler warnings.
Do not use "void *" in arithmetics.
2010-09-30 17:09:59 +08:00
Chia-I Wu d63b2622f1 st/egl: Skip single-buffered configs in EGL.
Let DRI2 report single-buffered configs and skip them in EGL.  This is
based on the patch by Luca Barbieri.
2010-09-30 17:04:56 +08:00
Chia-I Wu 6b2f1561ad egl: Check extensions.
Do not call into the driver if the extension for the called function is
not enabled.
2010-09-30 16:55:07 +08:00
Zhenyu Wang 72b368ae69 i965: always set tiling for fbo depth buffer on sandybridge
Sandybridge requires depth buffer must be tiling.

Fix 'fbo_firecube' demo.
2010-09-30 10:51:26 +08:00
Marek Olšák 83278d384e r300g: fix conditional rendering in non-wait path
NOTE: This is a candidate for the 7.9 branch.
2010-09-30 02:44:30 +02:00
Eric Anholt ad1506c5ac i965: Remove my "safety counter" code from loops.
I've screwed this up enough times that I don't think it's worth it.
This time, it was that I was doing it once per top-level body
instruction instead of just once at the end of the loop body.
2010-09-29 16:40:31 -07:00
Eric Anholt b90c7d1713 i965: Add live interval analysis and hook it up to the register allocator.
Fixes 13 piglit cases that failed at register allocation before.
2010-09-29 16:40:31 -07:00
Eric Anholt e1261d3c49 i965: First cut at register allocation using graph coloring.
The interference is totally bogus (maximal), so this is equivalent to
our trivial register assignment before.  As in, passes the same set of
piglit tests.
2010-09-29 16:40:31 -07:00
Eric Anholt 9ff90b7230 ra: First cut at a graph-coloring register allocator for mesa.
Notably missing is choice of registers to spill.
2010-09-29 16:40:31 -07:00
Eric Anholt 21148e1c0a i965: Clean up the virtual GRF handling.
Now, virtual GRFs are consecutive integers, rather than offsetting the
next one by the size.  We need the size information to still be around
for real register allocation, anyway.
2010-09-29 16:40:31 -07:00
Dave Airlie 4378c17c88 r600g: return string for chip family
use same strings as r600c.
2010-09-30 09:17:20 +10:00
Dave Airlie dbcd652602 r600g: clean up some code from move to new paths.
mainly remove 2 suffix from function names
2010-09-30 09:12:57 +10:00
Dave Airlie 2bc9d3f498 r600g: add L8A8 unorm.
fixes texEnv warnings.
2010-09-30 09:04:50 +10:00
Dave Airlie 534f7d5749 r600g: port r300g fix for X* formats in texformat code 2010-09-30 09:04:50 +10:00
Eric Anholt 0efea25c4b i956: Make new FS discard do its work in a temp, not the null reg!
Fixes:
glsl-fs-discard-02 (GPU hang)
glsl1-discard statement (2)
2010-09-29 15:52:36 -07:00
Eric Anholt 3da98c1ca5 i965: Fix use of undefined mem_ctx in vector splitting. 2010-09-29 15:51:05 -07:00
José Fonseca e3ccfd4e03 gallivm: Use SSE4.1's ROUNDSS/ROUNDSD for scalar rounding. 2010-09-29 22:29:23 +01:00
José Fonseca 21f392c971 python/retrace: Handle set_index_buffer and draw_vbo. 2010-09-29 22:29:22 +01:00
José Fonseca c7f33624f9 trace: Fix set_index_buffer and draw_vbo tracing. 2010-09-29 22:29:22 +01:00
Vinson Lee 02b8fb3ed5 r300/compiler: Move declaration before code.
Fixes this GCC warning on linux-x86 build.
r3xx_vertprog.c: In function ‘ei_if’:
r3xx_vertprog.c:396: warning: ISO C90 forbids mixed declarations and code
2010-09-29 14:22:20 -07:00
Vinson Lee 7c7fdef3b1 r300/compiler: Move declaration before code.
Fixes these GCC warnings on linux-x86 build.
r500_fragprog_emit.c: In function ‘emit_paired’:
r500_fragprog_emit.c:237: warning: ISO C90 forbids mixed declarations and code
r500_fragprog_emit.c: In function ‘emit_tex’:
r500_fragprog_emit.c:367: warning: ISO C90 forbids mixed declarations and code
r500_fragprog_emit.c: In function ‘emit_flowcontrol’:
r500_fragprog_emit.c:415: warning: ISO C90 forbids mixed declarations and code
r500_fragprog_emit.c: In function ‘r500BuildFragmentProgramHwCode’:
r500_fragprog_emit.c:633: warning: ISO C90 forbids mixed declarations and code
2010-09-29 14:13:49 -07:00
Vinson Lee ae664daa25 r300/compiler: Move declaration before code.
Fixes these GCC warnings on linux-x86 build.
r500_fragprog.c: In function ‘r500_transform_IF’:
r500_fragprog.c:45: warning: ISO C90 forbids mixed declarations and code
r500_fragprog.c: In function ‘r500FragmentProgramDump’:
r500_fragprog.c:256: warning: ISO C90 forbids mixed declarations and code
2010-09-29 14:04:06 -07:00
Vinson Lee a4f296d618 r300/compiler: Move declaration before code.
Fixes these GCC warnings on linux-x86 build.
r300_fragprog_emit.c: In function ‘emit_alu’:
r300_fragprog_emit.c:143: warning: ISO C90 forbids mixed declarations and code
r300_fragprog_emit.c:156: warning: ISO C90 forbids mixed declarations and code
r300_fragprog_emit.c: In function ‘finish_node’:
r300_fragprog_emit.c:271: warning: ISO C90 forbids mixed declarations and code
r300_fragprog_emit.c: In function ‘emit_tex’:
r300_fragprog_emit.c:344: warning: ISO C90 forbids mixed declarations and code
2010-09-29 13:56:27 -07:00
Vinson Lee b96a391d14 r300/compiler: Remove declaration before code.
Fixes these GCC warnings on linux-x86 build.
r300_fragprog_swizzle.c: In function ‘r300_swizzle_is_native’:
r300_fragprog_swizzle.c:120: warning: ISO C90 forbids mixed declarations and code
r300_fragprog_swizzle.c: In function ‘r300_swizzle_split’:
r300_fragprog_swizzle.c:159: warning: ISO C90 forbids mixed declarations and code
2010-09-29 13:44:10 -07:00
Vinson Lee dafbf480db r300/compiler: Move declaration before code.
Fixes this GCC warning on linux-x86 build.
radeon_rename_regs.c: In function ‘rc_rename_regs’:
radeon_rename_regs.c:112: warning: ISO C90 forbids mixed declarations and code
2010-09-29 13:40:45 -07:00
Vinson Lee 0d0273142a r300/compiler: Move declaration before code.
Fixes this GCC warning on linux-x86 build.
radeon_remove_constants.c: In function ‘rc_remove_unused_constants’:
radeon_remove_constants.c💯 warning: ISO C90 forbids mixed declarations and code
2010-09-29 13:34:56 -07:00
Vinson Lee 4cd4fd37aa r300/compiler: Move declaration before code.
Fixes these GCC warning on linux-x86 build.
radeon_optimize.c: In function ‘constant_folding’:
radeon_optimize.c:419: warning: ISO C90 forbids mixed declarations and code
radeon_optimize.c:425: warning: ISO C90 forbids mixed declarations and code
radeon_optimize.c:432: warning: ISO C90 forbids mixed declarations and code
2010-09-29 13:30:34 -07:00
Vinson Lee 38c31de445 r600g: Fix SCons build. 2010-09-29 13:14:34 -07:00
Vinson Lee 07a38505c6 r300/compiler: Move declaration before code.
Fixes these GCC warnings on linux-x86 build.
radeon_dataflow_deadcode.c: In function ‘push_branch’:
radeon_dataflow_deadcode.c:112: warning: ISO C90 forbids mixed declarations and code
radeon_dataflow_deadcode.c: In function ‘update_instruction’:
radeon_dataflow_deadcode.c:183: warning: ISO C90 forbids mixed declarations and code
radeon_dataflow_deadcode.c: In function ‘rc_dataflow_deadcode’:
radeon_dataflow_deadcode.c:352: warning: ISO C90 forbids mixed declarations and code
radeon_dataflow_deadcode.c:379: warning: ISO C90 forbids mixed declarations and code
2010-09-29 13:13:09 -07:00
Jerome Glisse 6abd7771c6 r600g: more cleanup
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-29 15:40:32 -04:00
Vinson Lee 7e536371f9 r600g: Update SConscript.
Fixes SCons build.
2010-09-29 12:16:39 -07:00
Vinson Lee a9d5808232 r300/compiler: Move declaration before code.
Fixes this GCC warning on linux-x86 build.
radeon_pair_regalloc.c: In function ‘rc_pair_regalloc_inputs_only’:
radeon_pair_regalloc.c:330: warning: ISO C90 forbids mixed declarations and code
2010-09-29 12:15:14 -07:00
Vinson Lee 22c06a08e7 r600g: Update SConscript.
Fixes SCons build.
2010-09-29 12:09:21 -07:00
Vinson Lee 4f80a2d170 r300/compiler: Move declaration before code.
Fixes these GCC warnings on linux-x86 build.
radeon_pair_schedule.c: In function ‘emit_all_tex’:
radeon_pair_schedule.c:244: warning: ISO C90 forbids mixed declarations and code
radeon_pair_schedule.c: In function ‘destructive_merge_instructions’:
radeon_pair_schedule.c:291: warning: ISO C90 forbids mixed declarations and code
radeon_pair_schedule.c:438: warning: ISO C90 forbids mixed declarations and code
radeon_pair_schedule.c: In function ‘scan_read’:
radeon_pair_schedule.c:619: warning: ISO C90 forbids mixed declarations and code
radeon_pair_schedule.c: In function ‘scan_write’:
radeon_pair_schedule.c:645: warning: ISO C90 forbids mixed declarations and code
radeon_pair_schedule.c: In function ‘schedule_block’:
radeon_pair_schedule.c:673: warning: ISO C90 forbids mixed declarations and code
radeon_pair_schedule.c: In function ‘rc_pair_schedule’:
radeon_pair_schedule.c:730: warning: ISO C90 forbids mixed declarations and code
2010-09-29 12:02:02 -07:00
Jerome Glisse 1235becaa1 r600g: cleanup
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-29 15:06:04 -04:00
Vinson Lee 845bda34d0 r600g: Update SConscript.
This is a follow-up to commit 9c284b5cae.

Fixes SCons build.
2010-09-29 11:52:55 -07:00
Marek Olšák 94e9ab975c r300g: add support for formats beginning with X, like X8R8G8B8
This is actually a format translator fix.
2010-09-29 20:43:44 +02:00
Vinson Lee 4e07aadabb r300/compiler: Move declaration before code.
Fixes these GCC warnings on linux-x86 build.
radeon_pair_translate.c: In function ‘set_pair_instruction’:
radeon_pair_translate.c:153: warning: ISO C90 forbids mixed declarations and code
radeon_pair_translate.c:170: warning: ISO C90 forbids mixed declarations and code
radeon_pair_translate.c: In function ‘rc_pair_translate’:
radeon_pair_translate.c:336: warning: ISO C90 forbids mixed declarations and code
radeon_pair_translate.c:341: warning: ISO C90 forbids mixed declarations and code
2010-09-29 11:41:14 -07:00
Vinson Lee 45d22a9b20 r300/compiler: Move declaration before code.
Fixes these GCC warnings on linux-x86 build.
radeon_program_alu.c: In function ‘r300_transform_trig_simple’:
radeon_program_alu.c:882: warning: ISO C90 forbids mixed declarations and code
radeon_program_alu.c:932: warning: ISO C90 forbids mixed declarations and code
radeon_program_alu.c: In function ‘radeonTransformTrigScale’:
radeon_program_alu.c:996: warning: ISO C90 forbids mixed declarations and code
radeon_program_alu.c: In function ‘r300_transform_trig_scale_vertex’:
radeon_program_alu.c:1033: warning: ISO C90 forbids mixed declarations and code
2010-09-29 11:32:11 -07:00
Jerome Glisse 9c284b5cae r600g: delete old path
Lot of clean can now happen.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-29 14:28:48 -04:00
Vinson Lee 483971e649 r300/compiler: Move declaration before code.
Fixes this GCC warning on linux-x86 build.
radeon_emulate_loops.c: In function ‘rc_emulate_loops’:
radeon_emulate_loops.c:517: warning: ISO C90 forbids mixed declarations and code
2010-09-29 11:19:55 -07:00
Vinson Lee 760d7c5d7d r300/compiler: Move declaration before code.
Fixes these GCC warnings with linux-x86 build.
radeon_emulate_branches.c: In function ‘handle_if’:
radeon_emulate_branches.c:65: warning: ISO C90 forbids mixed declarations and code
radeon_emulate_branches.c:71: warning: ISO C90 forbids mixed declarations and code
radeon_emulate_branches.c: In function ‘handle_else’:
radeon_emulate_branches.c:94: warning: ISO C90 forbids mixed declarations and code
radeon_emulate_branches.c: In function ‘handle_endif’:
radeon_emulate_branches.c:201: warning: ISO C90 forbids mixed declarations and code
radeon_emulate_branches.c: In function ‘fix_output_writes’:
radeon_emulate_branches.c:267: warning: ISO C90 forbids mixed declarations and code
radeon_emulate_branches.c:284: warning: ISO C90 forbids mixed declarations and code
radeon_emulate_branches.c: In function ‘rc_emulate_branches’:
radeon_emulate_branches.c:307: warning: ISO C90 forbids mixed declarations and code
2010-09-29 11:10:08 -07:00
Vinson Lee aa62416ae1 mesa: Fix printf format warning.
Fixes this GCC warning.
math/m_debug_xform.c: In function '_math_test_all_transform_functions':
math/m_debug_xform.c:320: warning: format not a string literal and no format arguments
2010-09-29 10:46:46 -07:00
Vinson Lee 9c841abebc mesa: Fix printf format warning.
Fixes this GCC warning.
math/m_debug_norm.c: In function '_math_test_all_normal_transform_functions':
math/m_debug_norm.c:365: warning: format not a string literal and no format arguments
2010-09-29 10:44:17 -07:00
Vinson Lee ae0cd81189 mesa: Fix printf format warning.
Fixes this GCC warning.
math/m_debug_clip.c: In function '_math_test_all_cliptest_functions':
math/m_debug_clip.c:363: warning: format not a string literal and no format arguments
2010-09-29 10:30:04 -07:00
Jerome Glisse 5646964b13 r600g: use a hash table instead of group
Instead of creating group of register use a hash table
to lookup into which block each register belongs. This
simplify code a bit.

Signed-off-by: Jerome Glisse <jglisse@redhat.com
2010-09-29 12:44:32 -04:00
Brian Paul 0cb545a7f2 draw: pass sampler state down to llvm jit state
Fixes a regression caused from the change to make min/max lod dynamic
state.

https://bugs.freedesktop.org/show_bug.cgi?id=30437
2010-09-29 10:34:43 -06:00
José Fonseca fdcc168a16 llvmpipe: Decouple sampler view and sampler state updates.
Fixes glean pbo crash.

It would be possible to avoid crashing without decoupling, but given
that state trackers give no guarantee that number of views is consistent,
that would likely cause too many state updates (or miss some).
2010-09-29 14:16:35 +01:00
Kristian Høgsberg 4b70fe8421 glx: Only remove drawables from the hash when we actually delete them
https://bugs.freedesktop.org/show_bug.cgi?id=30457
2010-09-29 08:32:29 -04:00
Dave Airlie 08839c4055 Revert "r600g: add initial vertex translate support."
This reverts commit 914b669b08.

I didn't mean to commit this yet, will redo in new state system once
we clean it up.
2010-09-29 20:04:00 +10:00
Zhenyu Wang d4da253b29 Revert "i965: Always set tiling for depth buffer on sandybridge"
This reverts commit 0a1910c267.

oops, shouldn't apply tiling depth buffer for other chips as well.
2010-09-29 15:18:37 +08:00
Tom Stellard b27a809266 r300/compiler: Don't merge instructions that write output regs and ALU result
https://bugs.freedesktop.org/show_bug.cgi?id=30415

NOTE: This is a candidate for the 7.9 branch.
2010-09-28 23:52:41 -07:00
Tom Stellard 1b76dde0cd r300/compiler: Don't use rc_error() unless the error is unrecoverable
https://bugs.freedesktop.org/show_bug.cgi?id=30416

NOTE: This is a candidate for the 7.9 branch.
2010-09-28 23:52:41 -07:00
Tom Stellard d40ff5510c r300/compiler: Fix segfault in error path
https://bugs.freedesktop.org/show_bug.cgi?id=30415

NOTE: This is a candidate for the 7.9 branch.
2010-09-28 23:52:41 -07:00
Zhenyu Wang 73dab75b41 i965: fallback lineloop on sandybridge for now
Until we fixed GS hang issue.
2010-09-29 14:35:19 +08:00
Zhenyu Wang 0a1910c267 i965: Always set tiling for depth buffer on sandybridge
Sandybridge only support tiling depth buffer, always set tiling bit.

Fix 'fbo_firecube' demo.
2010-09-29 14:02:37 +08:00
Dave Airlie 28b57c56e2 r600g: remove old assert from new codepath
this fixes draw-elements-base-vertex
2010-09-29 14:52:39 +10:00
Dave Airlie 914b669b08 r600g: add initial vertex translate support. 2010-09-29 14:41:16 +10:00
Kenneth Graunke 565ff67688 glsl: "Copyright", not "Constantright"
Clearly this started out as ir_copy_propagation.cpp, but the search and
replace was a bit overzealous.
2010-09-28 21:17:33 -07:00
Eric Anholt 1747aa6755 i965: Add support for builtin uniforms to the new FS backend.
Fixes 8 piglit tests.
2010-09-28 16:31:10 -07:00
Eric Anholt daacaac3c8 mesa: Move the list of builtin uniform info from ir_to_mesa to shared code.
I'm still not pleased with how builtin uniforms are handled, but as
long as we're relying on the prog_statevar stuff this seems about as
good as it'll get.
2010-09-28 16:26:58 -07:00
Eric Anholt 9ac910cfcd i965: Clean up obsolete FINISHME comment. 2010-09-28 16:26:58 -07:00
Eric Anholt ff0eb45f47 i965: Fix array indexing of arrays of matrices.
The deleted code was meant to be handling indexing of a matrix, which
would have been a noop if it had been correct.
2010-09-28 16:26:49 -07:00
Dave Airlie 301ab49605 r600g: move radeon.h members around to add back map flushing. 2010-09-29 09:19:22 +10:00
Dave Airlie 53b3933ce6 r600g: add evergreen texture border support to new path 2010-09-29 09:19:22 +10:00
Dave Airlie 23be883c9b r600g: add back evergreen name. 2010-09-29 09:19:22 +10:00
Eric Anholt 17f3b8097d i965: Don't try to emit interpolation for unused varying slots.
Fixes:
glsl-fs-varying-array
glsl-texcoord-array
glsl-texcoord-array-2
glsl-vs-varying-array
2010-09-28 14:53:36 -07:00
Eric Anholt 5272c6a7a2 i965: Do interpolation for varying matrices and arrays in the FS backend.
Fixes:
glsl-array-varying-01
glsl-vs-mat-add-1
glsl-vs-mat-div-1
glsl-vs-mat-div-2
glsl-vs-mat-mul-2
glsl-vs-mat-mul-3
2010-09-28 14:50:59 -07:00
Eric Anholt 586b4b500f glsl: Also update implicit sizes of varyings at link time.
Otherwise, we'll often end up with gl_TexCoord being 0 length, for
example.  With ir_to_mesa, things ended up working out anyway, as long
as multiple implicitly-sized arrays weren't involved.
2010-09-28 14:37:26 -07:00
Eric Anholt b9a59f0358 i965: Add support for ARB_fragment_coord_conventions to the new FS backend.
Fixes:
glsl-arb-frag-coord-conventions
glsl-fs-fragcoord
2010-09-28 13:42:52 -07:00
Eric Anholt 701c5f11c9 i965: Add support for ir_loop counters to the new FS backend.
Fixes:
glsl1-discard statement in for loop
glsl-fs-loop-two-counter-02
glsl-fs-loop-two-counter-04
2010-09-28 13:31:01 -07:00
Tilman Sauerbeck 35f94b1942 r600g: Cleaned up index buffer reference handling in the draw module.
This fixes a buffer leak.

Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
2010-09-28 22:12:23 +02:00
Eric Anholt 89f6783d17 i965: Add support for MRT to the new FS backend.
Fixes these tests using gl_FragData or just gl_FragDepth:
glsl1-Preprocessor test (extension test 1)
glsl1-Preprocessor test (extension test 2)
glsl-bug-22603
2010-09-28 12:37:21 -07:00
Eric Anholt 86fd11262c i965: Add support for non-color render target write data to new FS backend.
This is the first time these payload bits have made sense to me,
outside of brw_wm_pass* structure.

Fixes: glsl1-gl_FragDepth writing
2010-09-28 12:37:21 -07:00
Vinson Lee f46a61554f scons: Add program/sampler.cpp to SCons build.
This is a follow-up to commit a32893221c.

Fixes MinGW SCons build.
2010-09-28 12:03:45 -07:00
Eric Anholt 2999a44968 i965: Set up sampler numbers in the FS backend.
+10 piglits
2010-09-28 11:37:08 -07:00
Eric Anholt a32893221c mesa: Pull ir_to_mesa's sampler number fetcher out to shared code. 2010-09-28 11:37:08 -07:00
Jerome Glisse 723a655ed3 r600g: avoid rebuilding the vertex shader if no change to input format
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-28 14:34:25 -04:00
Jerome Glisse fe790a3c34 r600g: suspend/resume occlusion query around clear/copy
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-28 14:24:18 -04:00
Eric Anholt 9e96c737f8 i965: Subtract instead of adding when computing y delta in new FS backend.
Fixes 7 piglit cases.
2010-09-28 10:19:54 -07:00
Eric Anholt 5f7bd68149 i965: Add support for gl_FrontFacing to the new FS backend.
Fixes:
glsl1-gl_FrontFacing var (1)
glsl1-gl_FrontFacing var (2)
2010-09-28 10:10:44 -07:00
Eric Anholt ef8e002c75 i965: Fix up part of my Sandybridge attributes support patch.
I confused the array sizing for number of files for the number of regs
in a file.
2010-09-28 10:10:42 -07:00
Eric Anholt f1dba03056 i965: Fix all non-snb regression in the snb attribute interpolation commit.
This apparently had never been tested elsewhere before being merged to
master.
2010-09-28 10:10:42 -07:00
Eric Anholt 6bf12c8b73 i965: Add support for struct, array, and matrix uniforms to FS backend.
Fixes 16 piglit cases.
2010-09-28 09:33:31 -07:00
Eric Anholt ba481f2046 i965: Add support for dereferencing structs to the new FS backend.
Fixes: glsl1-struct(2)
2010-09-28 09:33:31 -07:00
Eric Anholt 07fc8eed8f i965: Set the variable type when dereferencing an array.
We don't set the type on the array virtual reg as a whole, so here's
the right place.

Fixes:
glsl1-GLSL 1.20 arrays
glsl1-temp array with constant indexing, fragment shader
glsl1-temp array with swizzled variable indexing
2010-09-28 09:33:31 -07:00