Commit Graph

34635 Commits

Author SHA1 Message Date
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
Eric Anholt 719f84d9ab i965: Fix up the FS backend for the variable array indexing pass.
We need to re-run channel expressions afterwards as it generates new
vector expressions, and we need to successfully support conditional
assignment (brw_CMP takes 2 operands, not 1).
2010-09-28 09:33:30 -07:00
Eric Anholt 57edd7c5c1 i965: Fix valgrind complaint about base_ir for new FS debugging. 2010-09-28 09:33:30 -07:00
Eric Anholt 1723fdb3f0 i965: Apply the same set of lowering passes to new FS as to Mesa IR.
While much of this we will want to support natively, this should make
the task of reaching the Mesa IR backend's quality easier.

Fixes:
glsl-fs-main-return.
2010-09-28 09:33:30 -07:00
Eric Anholt e10508812a i965: Actually track the "if" depth in loop in the new FS backend.
Fixes:
glsl-fs-if-nested-loop.
2010-09-28 09:33:30 -07:00
Eric Anholt fceb78e3cc i965: Fix negation in the new FS backend.
Fixes:
glsl1-Negation
glsl1-Negation2
2010-09-28 09:33:30 -07:00
Jerome Glisse 7ee8fa0421 r600g: switch to new design
New design seems to be on parity according to piglit,
make it default to get more exposure and see if there
is any show stopper in the coming days.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-28 11:37:30 -04:00
Jerome Glisse b534eb16a2 r600g: fix remaining piglit issue in new design
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-28 11:12:03 -04:00
Jerome Glisse 5a38cec7c8 r600g: use ptr for blit depth uncompress function
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-28 09:51:08 -04:00
Christoph Bumiller e0b93c5beb nv50: fix GP state bind and validate 2010-09-28 11:22:59 +02:00
Dave Airlie 175261a1f1 r600g: on evergreen the centroid isn't set in this register. 2010-09-28 19:02:46 +10:00
Zhenyu Wang 45b37c4b12 i965: fallback bitmap operation on sandybridge
Need to bring back correct fb write with header to set pixel
write mask. Fallback for now.
2010-09-28 15:58:21 +08:00
Zhenyu Wang 3074b61f64 i965: fix occlusion query on sandybridge
Fix pipe control command for depth stall and PS_DEPTH_COUNT write.
2010-09-28 15:58:21 +08:00
Zhenyu Wang ec99833e92 i965: fix point sprite on sandybridge
Need to set point sprite function in fixed SF state now on sandybridge.
2010-09-28 15:58:21 +08:00
Zhenyu Wang 4b6b0bf24a i965: fix scissor state on sandybridge
Fix incorrect scissor rect struct and missed scissor state pointer
setting for sandybridge.
2010-09-28 15:58:21 +08:00
Zhenyu Wang 3f3059fcc0 i965: enable polygon offset on sandybridge
Depth offset function is moved to SF stage on sandybridge.
2010-09-28 15:58:21 +08:00
Zhenyu Wang 15a8e7ec90 i965: fix pixel w interpolation on sandybridge 2010-09-28 15:58:21 +08:00
Zhenyu Wang 85fa900b93 i965: don't do calculation for delta_xy on sandybridge
Sandybridge doesn't have Xstart/Ystart in payload header.
2010-09-28 15:58:21 +08:00
Zhenyu Wang c58bf2cee5 i965: only allow SIMD8 kernel on sandybridge now
Until we fixed SIMD16 kernel, force to SIMD8 on sandybridge now.
2010-09-28 15:58:21 +08:00
Zhenyu Wang 18c3b754f9 i965: sandybridge pipe control workaround before write cache flush
Must issue a pipe control with any non-zero post sync op before
write cache flush = 1 pipe control.
2010-09-28 15:58:21 +08:00
Zhenyu Wang c8033f1b1e i965: Add all device ids for sandybridge 2010-09-28 15:58:20 +08:00
Zhenyu Wang 81aae67e58 i965: fix const register count for sandybridge
Sandybridge's PS constant buffer payload size is decided from
push const buffer command, incorrect size would cause wrong data
in payload for position and vertex attributes. This fixes coefficients
for tex2d/tex3d.
2010-09-28 15:58:20 +08:00
Zhenyu Wang 956f866030 i965: Fix sampler on sandybridge
Sandybridge has not much change on texture sampler with Ironlake.
2010-09-28 15:58:20 +08:00
Zhenyu Wang c5a3b25bb9 i965: fix jump count on sandybridge
Jump count is for 64bit long each, so one instruction requires 2
like on Ironlake.
2010-09-28 15:58:20 +08:00
Zhenyu Wang 9c39a9fcb2 i965: VS use SPF mode on sandybridge for now
Until conditional instructions were fixed, use SPF mode instead for now.
2010-09-28 15:58:20 +08:00
Zhenyu Wang 7401a98e29 i965: add sandybridge viewport state bo into validation list 2010-09-28 15:58:20 +08:00
Zhenyu Wang a0b1d7b2b8 i965: ignore quads for GS kernel on sandybridge
Sandybridge's VF would convert quads to polygon which not required
for GS then. Current GS state still would cause hang on lineloop.
2010-09-28 15:58:20 +08:00
Zhenyu Wang 67dafa4b56 i965: ff sync message change for sandybridge 2010-09-28 15:58:20 +08:00
Zhenyu Wang fa589770e8 i965: fix point size setting in header on sandybridge 2010-09-28 15:58:20 +08:00
Zhenyu Wang 03218a0093 i965: force zero in clipper to ignore RTAIndex on sandybridge 2010-09-28 15:58:20 +08:00
Zhenyu Wang 41c31c2ebd i965: Fix color interpolation on sandybridge
Don't double store position in vertex attribute. This makes color
interpolation right by using barycentric coordinates.
2010-09-28 15:58:20 +08:00
Zhenyu Wang 8c31a4c3cf i965: enable accumulator update in PS kernel too on sandybridge
Accumulator update flag must be set for implicit update on sandybridge.
2010-09-28 15:58:19 +08:00
Zhenyu Wang b016a78b98 i965: new state dump for sandybridge
Dump new state object on sandybridge for cc viewport, clip viewport,
depth stencil, cc and blend state.
2010-09-28 15:58:19 +08:00
Zhenyu Wang bf60f35934 i965: disasm quarter and write enable instruction control on sandybridge 2010-09-28 15:58:19 +08:00
Eric Anholt fe2d4a5ea0 i965: Add support for POW in gen6 FS.
Fixes glsl-algebraic-pow-2 in brw_wm_glsl.c mode.
2010-09-28 15:58:19 +08:00
Eric Anholt 2f914053bc i965: Set up inputs to the fragment shader according to FP InputsRead.
Sending down data that doesn't get read doesn't make any sense, and
would make handling things like gl_FrontFacing and gl_PointCoord
harder.
2010-09-28 15:58:19 +08:00
Eric Anholt a66e9a4d86 i965: Add support for attribute interpolation on Sandybridge.
Things are simpler these days thanks to barycentric interpolation
parameters being handed in in the payload.
2010-09-28 15:58:19 +08:00
Vinson Lee 79d5657770 dri: Add GET_PROGRAM_NAME definition for Mac OS X. 2010-09-28 00:27:31 -07:00
Tom Stellard b3e95dc45c r300/compiler: Use rc_for_all_reads_src() in "dead constants" pass 2010-09-27 23:17:11 -07:00
Tom Stellard 40d256295c r300/compiler: radeon_remove_constants.c: fix indentation 2010-09-27 23:17:11 -07:00
Tom Stellard a716952184 r300/compiler: Print immediate values after "dead constants" pass 2010-09-27 23:17:11 -07:00
Tom Stellard 798355d429 r300/compiler: Add more helper functions for iterating through sources
rc_for_all_reads_src() and rc_pair_for_all_reads_arg() pass references to
instruction sources to the callback so they can be modified directly.
2010-09-27 23:17:11 -07:00
Dave Airlie 34dba5f05a r600g: fix db flush breaking config state 2010-09-28 14:32:13 +10:00
Marek Olšák e4fd65e9d7 r300g: fix swizzling of texture border color
NOTE: This is a candidate for the 7.9 branch.
2010-09-28 05:34:51 +02:00
Marek Olšák 13359e6a4b r300g: add support for 3D NPOT textures without mipmapping
The driver actually creates a 3D texture aligned to POT and does all
the magic with texture coordinates in the fragment shader. It first
emulates REPEAT and MIRRORED wrap modes in the fragment shader to get
the coordinates into the range [0, 1]. (already done for 2D NPOT)
Then it scales them to get the coordinates of the NPOT subtexture.

NPOT textures are now less of a lie and we can at least display
something meaningful even for the 3D ones.

Supported wrap modes:
- REPEAT
- MIRRORED_REPEAT
- CLAMP_TO_EDGE (NEAREST filtering only)
- MIRROR_CLAMP_TO_EDGE (NEAREST filtering only)
- The behavior of other CLAMP modes is undefined on borders, but they usually
  give results very close to CLAMP_TO_EDGE with mirroring working perfectly.

This fixes:
- piglit/fbo-3d
- piglit/tex3d-npot
2010-09-28 05:34:51 +02:00
Marek Olšák 7128e1625b r300/compiler: fix shadow sampling with swizzled coords
Taking the W component from coords directly ignores swizzling. Instead,
take the component which is mapped to W in the TEX instruction parameter.
The same for Z.

NOTE: This is a candidate for the 7.9 branch.
2010-09-28 05:34:51 +02:00
Marek Olšák c2ea7ffb0a r300/compiler: do not use copy propagation if SaturateMode is used
NOTE: This is a candidate for the 7.9 branch.
2010-09-28 05:34:51 +02:00
Marek Olšák 6f747567ec r300/compiler: fix projective mapping of 2D NPOT textures
NOTE: This is a candidate for the 7.9 branch.
2010-09-28 05:34:51 +02:00
Marek Olšák 82f8e43bfa r300g: code cleanups
Some random stuff I had here.

1) Fixed some misleading comments.
2) Removed fake_npot, since it's redundant.
3) lower_texture_rect -> scale_texcoords
4) Reordered and reindented some TEX transform code.
2010-09-28 05:34:51 +02:00
Eric Anholt 94d44c33c0 i965: Add support for dFdx()/dFdy() to the FS backend.
Fixes:
glsl-fwidth
glsl-derivs-swizzle
2010-09-27 18:31:53 -07:00
Eric Anholt 3610e0c1a0 i965: Fix vector splitting RHS channel selection with sparse writemasks.
Fixes:
glsl-fs-all-02
glsl-fs-dot-vec2
2010-09-27 18:29:15 -07:00
Eric Anholt 169ff0cc9d i965: Handle all_equal/any_nequal in the new FS.
These are generated for scalar operands instead of plain equal/nequal.
But for scalars, they're the same anyway.  +30 piglits.
2010-09-27 16:12:18 -07:00
Eric Anholt a5c6c8a31b i965: Remove swizzling of assignment to vector-splitting single-channel LHS.
We'd end up reading some non-x component of the float RHS.  +53 piglits.
2010-09-27 16:09:50 -07:00
Eric Anholt 11ba8bafdb i965: Fix up writemasked assignments in the new FS.
Not sure how I managed to get tests to succeed without this.  +54 piglits.
2010-09-27 16:07:42 -07:00
Eric Anholt 5e8ed7a79b glsl: Add validation that a swizzle only references valid channels.
Caught the bug in the previous commit.
2010-09-27 15:52:56 -07:00
Eric Anholt 668cdbe129 glsl: Fix broadcast_index of lower_variable_index_to_cond_assign.
It's trying to get an int smeared across all channels, not trying to
get a 1:1 mapping of a subset of a vector's channels.  This usually
ended up not mattering with ir_to_mesa, since it just smears floats
into every chan of a vec4.

Fixes:
glsl1-temp array with swizzled variable indexing
2010-09-27 15:52:56 -07:00
Ian Romanick 8b2d5f431f Remove unnescessary initializations of UpdateTexturePalette
This is already NULL'ed in _mesa_init_driver_functions.
2010-09-27 15:23:14 -07:00
Ian Romanick 78db8c8b66 Regenerate files changed by previous commit 2010-09-27 15:23:14 -07:00
Ian Romanick 02984e3536 Remove GL_EXT_cull_vertex
This is only used in the i915 driver where it provides little benefit
for very few applications that use it with fixed function TNL.
2010-09-27 15:23:14 -07:00
Ian Romanick 4b1f98241f Remove GL_MESA_packed_depth_stencil
This extension was never enabled in any driver.
2010-09-27 15:23:14 -07:00
Ian Romanick 7f11d471e6 mesa: Force GL_SGIS_generate_mipmap to always be enabled
As per discussions at XDS.
2010-09-27 15:23:13 -07:00
Ian Romanick 4da5f1b7c5 mesa: Force GL_ARB_copy_buffer to always be enabled
As per discussions at XDS.
2010-09-27 15:23:13 -07:00
Luca Barbieri a73c6ce67b d3d1x: work around crash in widl 2010-09-28 00:18:25 +02:00
Luca Barbieri 9126826594 d3d11: fix reference counting so devices get freed 2010-09-27 23:43:53 +02:00
Brian Paul de2dfce0d9 softpipe: fix swizzling of texture border color
We ask the texture tile cache to swizzle the color for us since that's
where the view/swizzling info is available.
2010-09-27 15:06:23 -06:00
Brian Paul 3446af0179 llvmpipe: fix swizzling of texture border color
The pipe_sampler_view's swizzle terms also apply to the texture border
color.  Simply move the apply_sampler_swizzle() call after we fetch
the border color.

Fixes many piglit texwrap failures.
2010-09-27 15:06:23 -06:00
Jerome Glisse 0282682e98 r600g: fix occlusion query after change to block structure
block->reg point to register value not block->pm4 which point
to packet.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-27 17:00:07 -04:00
Brian Paul 029c099b54 softpipe: allocate tile data on demand
Changes in v2:
- Invalidate last_tile_addr on any change, fixing regressions
- Correct coding style

Currently softpipe ends up allocating more than 200 MB of memory
for each context due to the tile caches.

Even worse, this memory is all explicitly cleared, which means that the
kernel must actually back it with physical RAM right away.

This change allocates tile memory on demand.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-09-27 14:32:05 -06:00
Luca Barbieri a359eb80c5 d3d1x: fix Map 2010-09-27 22:20:53 +02:00
Luca Barbieri f976cd0c9e d3d1x: rework DXGI for occlusion testing and default width/height 2010-09-27 22:20:53 +02:00
Luca Barbieri e01e2e1883 d3d1x: put proper calling convention in headers, fixes 64-bit builds 2010-09-27 22:20:53 +02:00
Luca Barbieri b821fdd563 d3d1x: properly support specifying MipLevels as 0 2010-09-27 22:20:53 +02:00
Luca Barbieri db6f1d0436 d3d1x: support centroid interpolation 2010-09-27 22:20:53 +02:00
Luca Barbieri ff531c5b05 ureg: support centroid interpolation 2010-09-27 22:20:52 +02:00
Luca Barbieri 94c2be73f4 d3d1x: link to libdrm for X11 platform too
Thanks to Xavier Chantry.
2010-09-27 22:20:52 +02:00
Luca Barbieri f1afa8794e d3d11: ignore StructureByteStride
D3D11 applications are allowed to pass a random value if the buffer
is not structured
2010-09-27 22:20:52 +02:00
Luca Barbieri dfc546c047 d3d11: advertise IDXGIDevice1, not just IDXGIDevice
Fixes failure to create device in DirectX SDK samples.
2010-09-27 22:20:52 +02:00
Jerome Glisse 5e07483ed9 r600g: fix routing btw vertex & pixel shader
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-27 15:13:14 -04:00
Jerome Glisse 1617daaf49 r600g: fix pointsprite & resource unbinding
When asking to bind NULL resource assume it's unbinding
so free resource and unreference assoicated buffer.
Also fix pointsprite parameter.

Fix glsl-fs-pointcoord & fp-fragment-position

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-27 15:00:17 -04:00
Jerome Glisse 99c422ef5a r600g: build packet header once
Build packet header once and allow to add fake register support so
we can handle things like indexed set of register (evergreen sampler
border registers for instance.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-27 11:53:34 -04:00
Jerome Glisse 58a31758e3 r600g: fix index buffer drawing
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-27 09:59:52 -04:00
Luca Barbieri 99486bfc5b d3d1x: link progs with CXXFLAGS 2010-09-27 14:26:12 +02:00
Luca Barbieri 31d8f64f3f d3d1x: fix progs linking if not all EGL platforms are enabled 2010-09-27 14:24:33 +02:00
Luca Barbieri 9ba4b30eae d3d1x: add private gitignore file 2010-09-27 14:24:33 +02:00
Luca Barbieri 8d0ed47d94 d3d1x: fix parallel build 2010-09-27 14:11:12 +02:00
Luca Barbieri e507e4ec05 gallium: add $(PROGS_DEPS) as dependencies for $(PROGS)
Commit 80ee3a440c added a PROGS_DEPS
definition, but no uses, even though it seems clearly intended
to be a set of additional dependencies for $(PROGS).

Correct this.
2010-09-27 14:11:12 +02:00
Tilman Sauerbeck 4c6344f569 r600g: Fixed two texture surface leaks in r600_blit_uncompress_depth().
Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
2010-09-27 08:37:12 +02:00
Dave Airlie 7eab5ef425 r600g: add evergreen texture resource properly.
adding sampler border looks impossible with current design, another day, another corner case not worked out.
2010-09-27 14:35:41 +10:00
Vinson Lee 84b2773f00 r600g: Silence uninitialized variable warnings.
Fixes these GCC warnings.
r600_shader.c: In function 'tgsi_tex':
r600_shader.c:1611: warning: 'src2_chan' may be used uninitialized in this function
r600_shader.c:1611: warning: 'src_chan' may be used uninitialized in this function
2010-09-26 14:34:05 -07:00
Marek Olšák 311ab3d468 r300g: fix macrotiling on R350
MACRO_SWITCH on R350 appears to use the RV350 mode by default. Who knew?

NOTE: This is a candidate for the 7.9 branch.
2010-09-26 22:38:52 +02:00
Jerome Glisse d2f24c4d75 r600g: use depth decompression in new path
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-26 16:29:33 -04:00
Jerome Glisse 4ca1a92b7f r600g: move around variables to share depth uncompression code
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-26 16:29:33 -04:00
Joakim Sindholt 16baa465a2 radeong: fix leaks 2010-09-26 19:39:05 +02:00
Joakim Sindholt b51f6e7c23 util/u_blitter: fix leak 2010-09-26 19:03:02 +02:00
Bas Nieuwenhuizen bc8b8d06b6 r600g: set ENABLE_KILL on evergreen too 2010-09-26 12:23:41 -04:00
Bas Nieuwenhuizen c622174f73 r600g: set ENABLE_KILL in the shader state in the new design 2010-09-26 12:21:02 -04:00
Jerome Glisse a852615946 r600g: disable early cull optimization when occlusion query running
When occlusion query are running we want to have accurate
fragment count thus disable any early culling optimization
GPU has.

Based on work from Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-26 12:06:46 -04:00
Vinson Lee 6f16e497af r600g: Include p_compiler.h instead of malloc.h. 2010-09-26 03:23:31 -07:00
Vinson Lee 15f16328be r600g: Remove unused variables.
Fixes these GCC warnings.
radeon.c: In function 'radeon_new':
radeon.c:59: warning: unused variable 'k'
radeon.c:59: warning: unused variable 'j'
radeon.c:59: warning: unused variable 'id'
radeon.c:59: warning: unused variable 'i'
2010-09-26 03:18:12 -07:00
Vinson Lee 51bfd4e34a r600g: Don't return a value in function returning void.
Fixes this GCC warning.
radeon_state.c: In function 'radeon_state_fini':
radeon_state.c:140: warning: 'return' with a value, in function returning void
2010-09-26 03:10:58 -07:00
Vinson Lee 4743c7fbe7 r300g: Remove unused variable.
Fixes this GCC warning.
r300_state.c: In function 'r300_create_rs_state':
r300_state.c:925: warning: unused variable 'i'
2010-09-26 03:08:14 -07:00