Commit Graph

27410 Commits

Author SHA1 Message Date
Dave Airlie 5cf7c8e2d5 radeon: use _mesa_get_current_tex_unit 2009-10-31 15:50:12 +10:00
Brian Paul 5e9f97f0ea ARB prog parser: regenerated files 2009-10-30 19:08:19 -06:00
Brian Paul df5615de1f ARB prog parser: new set_src_reg(), set_dst_reg() helpers
These functions do sanity checks on the register file and index.
2009-10-30 19:08:18 -06:00
Brian Paul a71edc9455 mesa: better error message 2009-10-30 19:08:18 -06:00
Eric Anholt 7c8bed62e0 intel: Use GTT mapping when available for swrast.
This improves piglit quick.tests runtime from 19:33 minutes to 6:06 on
my GM45.  It should also hide most of the A17 swizzling issues, though
they'll still exist when swapping occurs (which is the kernel's problem
either way).
2009-10-30 17:35:12 -07:00
Eric Anholt d63c29ef20 x86: Fix the test for negative pixel count in optimized rgb565 spans.
There's a bunch of bogus looking stuff the count handling in this code, but
this fixes the testcases we have.
2009-10-30 17:35:11 -07:00
Eric Anholt 21a3a79371 intel: Fix up z24_x8 depth spans since the texformat merge. 2009-10-30 17:35:11 -07:00
Vinson Lee 9c3197ef0a prog/tests: Fix MSVC build.
Signed-off-by: Brian Paul <brianp@vmware.com>
2009-10-30 15:30:13 -06:00
Eric Anholt cb132406de i965: Add an index assert on get_fp_inst array like other compiler arrays. 2009-10-30 13:28:44 -07:00
Eric Anholt 2c30ee9bd6 i965: Fix BRW_WM_MAX_INSN to reflect current limits.
Part of fixing bug #24355.
2009-10-30 13:20:34 -07:00
Eric Anholt 2073006c95 intel: Set the texture format in the TFP path.
This fixes a regression in piglit's tfp test as of
11caea687e.  Additionally, set the texture
format for the RGB textures to MESA_FORMAT_XRGB8888 and support it in the
hw paths so that hopefully sw fallbacks involving TFP get better alpha
behavior.

The radeon drivers appear to need the same fix.

Bug #24803
2009-10-30 12:41:28 -07:00
Alex Deucher b568a2c808 r600: remove duplicate line 2009-10-30 15:08:09 -04:00
Alex Deucher 703a836d40 r600: fill in some missing tex formats
This improves shadowtex since the component ordering
is at least correct now, but I'm not sure how to
deal with texturing from a depth surface yet due to
differences in depth and color tile layouts.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2009-10-30 15:02:34 -04:00
Alex Deucher 57864f6e04 r600: fix a warning, update comments 2009-10-30 11:52:02 -04:00
Vinson Lee a8ed066858 progs/tests: fix MSVC build.
Signed-off-by: Brian Paul <brianp@vmware.com>
2009-10-30 09:40:04 -06:00
Andre Maasikas 5f7d5d3ea3 r600: use AUTO_INDEX for draw - saves cmd buffer space
also seems we can use INDX_OFFSET if start != 0
2009-10-30 17:18:00 +02:00
Brian Paul 409469fb70 intel: fix up some XRGB breakage
We weren't choosing the right XRGB span functions for reading the
framebuffer.  XRGB formats still aren't turned on yet though.
2009-10-30 09:13:04 -06:00
Brian Paul 730a3de9f9 mesa: fix inverted buffer object test
Fixes bug 24799.
2009-10-30 08:31:01 -06:00
Brian Paul 71cd40bccf mesa: fix incorrect format info for MESA_FORMAT_SL8
Fixes bugs 24798 and 24801.
2009-10-30 08:21:16 -06:00
Michal Krol ca9c413647 softpipe: Respect gl_rasterization_rules in primitive setup. 2009-10-30 08:05:40 +00:00
Brian Paul 4a253431ab intel: update intel_create_renderbuffer(format), add XRGB support
Pass a gl_format to intel_create_renderbuffer() instead of GLenum.
Add cases for MESA_FORMAT_XRGB8888 textures and renderbuffers.
However, we don't yet create any renderbuffers or textures with that
format.  It seems the default alpha value is zero instead of one.
Need to investigate that first.
2009-10-29 19:12:50 -06:00
Brian Paul f920d496e1 mesa: fix _mesa_texstore_argb8888() for MESA_FORMAT_XRGB8888
If we hit the general path and call _mesa_make_temp_chan_image() we
always want to get a GL_RGBA texture.  We were getting a 3-channel
GL_RGB texture before and that messed up the memory layout.
2009-10-29 17:52:01 -06:00
Alex Deucher c243e8dd23 r600: remove the no rrb messages 2009-10-29 19:44:35 -04:00
Alex Deucher b924579bd4 r600: Add support for ARB_depth_clamp 2009-10-29 19:42:52 -04:00
Brian Paul d0b6147291 intel: remove memcpy_get_tex_image() code
This has been lifted into core Mesa where it can be used for all drivers
that use the _mesa_get_teximage() fallback for ctx->Driver.GetTexImage().
2009-10-29 16:31:57 -06:00
Brian Paul fcbf663640 mesa: lift memcpy_get_tex_image() code from intel driver into core Mesa
The code should work for any driver.
2009-10-29 16:31:57 -06:00
Brian Paul bde7874317 mesa: refactor _mesa_get_teximage() code
Break different formats into different functions to make it easier to read.
2009-10-29 16:31:57 -06:00
Brian Paul 217a40d8d9 i965: indentation fix 2009-10-29 16:31:57 -06:00
Brian Paul 26d22b094b i965: make brw_sf_prog_key::sprite_origin_lower_left one bit
Shrinks size of key to 8 bytes from 12.
Note that progs/demos/spriteblast.c is still broken.
2009-10-29 16:31:56 -06:00
Brian Paul 035b21f365 i965: make brw_wm_prog_key a little smaller
GLushort is big enough for the swizzle and origin fields.
The key could probably be made smaller still by re-ordering things.
I'll hold off on that until after the outputswritten64 branch is merged.
The key will get a little larger again with the GLbitfield64 fields.
2009-10-29 16:31:56 -06:00
Eric Anholt 8a9afe71b8 i915: Fix 1D texture mapping in the t coordinate.
Fixes piglit tex1d-2dborder test.
2009-10-29 14:56:52 -07:00
Eric Anholt 4b377ae292 i915: Correct and make use of the defines for 32-bit depth texture modes.
Previously, S8_Z24 depth textures would always be treated as intensity.
Fixes piglit depth-tex-modes.
2009-10-29 14:56:52 -07:00
Brian Paul 861fec163c i965: avoid shader translation on window resize
If the fragment shader doesn't use FRAG_ATTRIB_WPOS (gl_FragCoord) we
don't need to worry about the window size and origin in
brw_wm_populate_key().

This avoids re-generating the i965 shader code when a window is resized.

Issue spotted by Keith Whitwell.
2009-10-29 15:33:43 -06:00
Brian Paul 198ec96d36 i965: define, use BRW_MAX_DRAW_BUFFERS
i965 might support more than 4 color draw buffers.  But if not, this protects
from breakage if the Mesa limit is raised.
2009-10-29 15:33:43 -06:00
Brian Paul 7648c80ac8 i965: remove unused var 2009-10-29 15:33:43 -06:00
Brian Paul 9ef33b8685 i965: don't use context state in emit_fb_write()
Put the state that we care about in the hash key.
Issue spotted by Keith Whitwell.
2009-10-29 15:33:43 -06:00
Brian Paul a8d233e509 i965: use macros to get/set prog_instruction::Aux field
This makes things a bit easier to remember/understand.
2009-10-29 15:33:43 -06:00
Brian Paul a0959bcee5 i965: minor code reformatting 2009-10-29 15:33:43 -06:00
José Fonseca c6164ff155 mesa: Add MESA_FORMAT_Z24_X8. 2009-10-29 20:03:51 +00:00
Zack Rusin a7fa56a64b st/xorg: fix scaling ov xv data, plus some cleanups 2009-10-29 15:13:17 -04:00
Eric Anholt f8f40b53a6 i915: Implement min/max LOD clamping with the hardware.
This gets us expected behavior for clamping between mipmap levels, and
avoids relayout of textures for doing clamping.

Fixes piglit lodclamp-between.
2009-10-29 12:06:04 -07:00
Eric Anholt 3744472441 i965: Replace a MIN(MAX()) with CLAMP(). 2009-10-29 12:06:03 -07:00
Brian Paul ea414e3318 intel: check for single memcpy() in memcpy_get_tex_image() 2009-10-29 11:04:24 -06:00
Eric Anholt 92e7c6a258 i965: Fix fallout from ARB_depth_clamp enablement that broke glDepthRange.
If a backwards glDepthRange was supplied (as with the old Quake no-z-clearing
hack), the hardware would have always clamped because we weren't clamping to
the min of near/far and the max of near/far.  Also, we shouldn't be clamping
to near/far at all when not in depth clamp mode (this usually didn't matter
since near/far are usually the same as the 0.0, 1.0 clamping you do for
fixed-point depth).

This should fix funny depth issues in PlaneShift, and fixes piglit
depth-clamp-range
2009-10-29 10:01:17 -07:00
Eric Anholt 32ec3f2673 mesa: Mostly fix swrast's ARB_depth_clamp support.
I'd written a testcase for the hard part of the extension enablement, so
naturally the easy stuff was completely broken.  There are still issues,
as I'm seeing FLOAT_TO_UINT(max_f) == 0x0 when max_f == 1.0, but it gets
piglit depth-clamp-range closer to success.
2009-10-29 10:01:17 -07:00
Eric Anholt 6eb6a0e9cb intel: Don't bother MI_FLUSHing on glFlush in the DRI2 case.
We only need it when drawing to the front buffer, which we never do for
DRI2.  No significant performance difference, but the flush is definitely
gone from the end of every batchbuffer.
2009-10-29 10:01:17 -07:00
Eric Anholt fb0084e69e intel: Clean up merge leftover from the DRI2 swap throttling. 2009-10-29 10:01:16 -07:00
Brian Paul 1596f714d2 intel: remove debug code 2009-10-29 10:56:13 -06:00
Brian Paul 2b628d43c0 mesa: consolidate some code in _mesa_GetCompressedTexImageARB() 2009-10-29 10:53:26 -06:00
Brian Paul dcb4716802 intel: added fast memcpy path for glGetTexImage() 2009-10-29 10:50:26 -06:00