Commit Graph

44414 Commits

Author SHA1 Message Date
Brian Paul ee231b30a8 st/mesa: improved is_interleaved_arrays() checking
Check that the difference in array pointers/offsets from the 0th
array are less than the stride, for both VBOs and user-space arrays.
Previously, we were only doing this for the later.

This tightens up the interleaved array test and fixes a problem with
the llvmpipe driver where we were creating way too many vertex fetch
variants only because the pipe_vertex_element::src_offset values were
changing frequently.  This change results in a 5x speed-up for one of
the viewperf tests.

Also, clean up the function to make it easier to understand.
2011-06-14 17:19:53 -06:00
Alex Deucher 24a760e9cb r600c: add tiling support for evergreen+
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-06-14 18:40:37 -04:00
Marek Olšák 7d488ade23 r600g: fix RGB32F texturing 2011-06-14 20:47:57 +02:00
Marek Olšák df6355512a r600g: fix indentation and comments 2011-06-14 20:37:57 +02:00
Eric Anholt 10e418f381 mesa: Switch generate_mipmaps_compressed() to using TexImage2D to upload.
The code was playing fast and loose with rowstrides, which meant that
if a driver chose anything different for its alignment requirements,
the generated mipmaps came out garbage.  Unlike the uncompressed case,
we can't generate mipmaps directly into image->Data, so by using
TexImage2D we cut out most of the weird logic that existed to generate
in-place into ->Data.  The up/downside is that the driver recovery
code for the fact that _mesa_generate_mipmaps whacked ->Data has to be
turned off for compressed now.

Fixes 6 piglit tests about compressed mipmap gen.
2011-06-14 11:17:39 -07:00
Eric Anholt b0c4db68b2 mesa: Remove uncompressed code from generate_mipmaps_compressed(). 2011-06-14 11:17:39 -07:00
Eric Anholt 2bfd81df0a mesa: Remove compressed code from generate_mipmaps_uncompressed(). 2011-06-14 11:17:39 -07:00
Eric Anholt ba55ccd312 mesa: Split _mesa_generate_mipmap along compressed/uncompressed lines.
The path taken is wildly different based on this (do we generate from
a temporary image, or from level-1's data), and we appear to have
stride bugs in the compressed case that are tough to disentangle.

This just duplicates the code for the moment, the followon commit will
do the actual changes.  Only real code change here is handling
maxLevel in one common place.
2011-06-14 11:17:39 -07:00
Eric Anholt b9fbb9df22 intel: Fix miptree height alignment for compressed NPOT textures.
This is effectively just "round up when dividing by 4" compared to the
previous code.  Fixes the broken stripe at the top of
fbo-generatemipmap-formats GL_EXT_texture_compression_rgtc.
2011-06-14 11:17:39 -07:00
Eric Anholt 56965aa007 intel: Drop dead preinitialization of align_w, align_h. 2011-06-14 11:17:39 -07:00
Eric Anholt f94fef83db intel: Drop the cpp argument to intel_miptree_create(). 2011-06-14 11:17:39 -07:00
Eric Anholt 6dcc398ac0 intel: Calculate compress_byte in intel_miptree_create.
One less argument and thing to get wrong.
2011-06-14 11:17:39 -07:00
Eric Anholt 9c5fdbb721 intel: Use the gl_format to get the base_format for miptree create.
One less argument to this insanely long function call.
2011-06-14 11:17:39 -07:00
Eric Anholt 9a523a48af intel: Drop the internal_format field of the mipmap tree.
This has been replaced with the gl_format now.
2011-06-14 11:17:38 -07:00
Eric Anholt 0fac09a87c intel: Make the intel_miptree_match_image format check more specific.
We don't care just about the internalFormat/cpp/compressed, but about
the specific format chosen.  We have no support for format
translations as part of texture validation, and furthermore it has
restrictions in the GL specification.  However, we should be making
consistent decisions for this check anyway.
2011-06-14 11:17:38 -07:00
Eric Anholt afbe605eff i915: Drop dead argument to translate_texture_format(). 2011-06-14 11:17:38 -07:00
Eric Anholt 4a60b0c8d2 intel: Add block alignment for RGTC textures.
We were using the default 4x2 alignment instead of the 4x4 required
for RGTC textures.
2011-06-14 11:17:26 -07:00
Eric Anholt d5809115b5 intel: Add the MESA_FORMAT as a field of the miptree.
We only had internal_format before, which is way more irritating to
work with.
2011-06-14 11:15:43 -07:00
Eric Anholt 51ce86b781 intel: Fix 2x2 and 1x1 compressed teximages from _mesa_generate_mipmap()
Generally image uploads to a the region occur at TexImage time, but
that's not the case for fallback _mesa_generate_mipmap(), and in this
path we were forgetting to align the width when dividing height.  We
were just leaving out parts of the compressed block at 2x2 and 1x1
levels.

Fixes gen-compressed-teximage.
2011-06-14 11:15:29 -07:00
Marek Olšák 13dcf3f20d r600g: disable shader_texture_lod until there is driver support 2011-06-14 20:03:04 +02:00
Adam Jackson 130e7ead87 llvmpipe: SSE2 fastpaths for b8g8r8x8 {un,}swizzle
Copy-and-paste from the bgra cases.  The C paths attempt to avoid
copying the 'x' channel, but it's harmless, you might as well.  Good for
about 5% in glxgears (740 to 780 fps).

Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-06-14 11:51:13 -04:00
Christoph Bumiller a8b9a75b92 nv50: fix copy/paste error in nv50_gmtyprog_validate
Used the vertprog instead of gmtyprog.
2011-06-14 17:15:08 +02:00
Jeremy Huddleston a128355ecb apple: Set the glapi dispatch table on context bind
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-14 00:48:20 -07:00
Marek Olšák c17fb8539f configure.ac: cleanup the gallium-r300 option 2011-06-14 04:11:26 +02:00
Marek Olšák e823ab1b00 st/xorg: remove unused variable 2011-06-14 03:49:26 +02:00
Marek Olšák f318a15f45 r600g: do not link with softpipe 2011-06-14 01:45:11 +02:00
Marek Olšák b5b7d2acc6 r300g: do not link with softpipe 2011-06-14 01:45:11 +02:00
Marek Olšák be2b9bdcee xorg-radeon: rename to xorg-r300 2011-06-14 01:45:11 +02:00
Marek Olšák 63e38bd0f6 target-helpers: remove copy-pasted function inline_noop_helper 2011-06-14 01:45:11 +02:00
Vadim Girlin 9346d895e7 r600g: skip SPI setup for position and face inputs
fixes fdo bug 38145

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-14 09:17:16 +10:00
Dave Airlie 2743851c1a r600g: move depth texture flushing out of line.
this needs a piglit run.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-14 09:17:16 +10:00
Eric Anholt 296e6b9038 meta: Fix glCopyTexImage(GL_LUMINANCE) from non-GL_LUMINANCE source.
glReadPixels() was performing RGB -> L conversion differently from the
glTexImage() style conversion appropriate for glCopyTexImage().

Fixes gles2conform copy_texture.
2011-06-13 15:56:36 -07:00
Eric Anholt df46eb8ec0 intel: Fix mipmap and format handling of blit glCopyPixels().
Fixes fbo-mipmap-copypix.
2011-06-13 15:56:36 -07:00
Eric Anholt ef0d548838 intel: Do the drawable x/y offset in intel_renderbuffer_map() for spans.
We were mapping the renderbuffer once, then walking over all the
buffers to map just the texture ones using the other texture mapping
function that handled the x/y offset to the image in the region.  But
then we would go and overwrite *those* mappings with the original
mappings for depth/stencil, which was wrong.

Instead, just walk over the attachments once and map the attachments.
Wasn't that easy?
2011-06-13 15:56:36 -07:00
Eric Anholt fb60e2061b intel: Use rb->Data and rb->RowStride to handle spans Y flipping.
This is already pointing at 0 or Height - 1 and with an appropriate
pitch, so no need to recompute those values per customization of the
spans code.  Cuts 3 out of 21kb of the compiled size.

Reviewed-by: Chad Versace <chad@chad-versace.us>
2011-06-13 15:56:36 -07:00
Eric Anholt d29117752f intel: Clean up intel_render_texture with a rename and a helper function.
The "newImage" isn't particularly new -- it might be the same texture
that was attached to the same attachment point before.  This function
also gets called when just rebinding back to an FBO with a texture
attachment.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chad Versace <chad@chad-versace.us>
2011-06-13 15:56:36 -07:00
Eric Anholt b17aab5753 intel: Move the draw_x/draw_y to the renderbuffer where it belongs.
It was originally located in the region because the tracking of
depth/color buffers was on the regions, and getting back to the irb
would have been tricky.  Now, we're keying off of the renderbuffer in
more places, which means we can move these fields where they belong.

This could fix potential rendering failure with a single texture
having multiple images attached to different renderbuffers across
shareCtx (as far as I can tell, this was the only failure we could
cause, since anything else should trigger intel_render_texture in
between, for example a BindFramebuffer).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chad Versace <chad@chad-versace.us>
2011-06-13 15:56:36 -07:00
Brian Paul 4fa01d705f dri: include swrast.h, not s_texrender.h 2011-06-13 16:07:55 -06:00
Jeremy Huddleston 816b8acfe8 glx: Remove check for gc->vtable->destroy
gc->vtable->destroy is always set and is used unconditionally
in other places, so don't bother checking for it first.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-13 14:51:01 -07:00
Jeremy Huddleston c6cf82fb55 apple: applegl_destroy_context: Pass along the correct display
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-13 14:51:01 -07:00
Jeremy Huddleston e903cc17bb apple: Dead code removal
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-13 14:51:01 -07:00
Jeremy Huddleston b44d13e67b glapi: Add check for NULL symbol_prefix in gentable and fix warnings
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-13 14:50:37 -07:00
Daniel Vetter df8d26ec09 i915g: add a few more render target formats
Snatched from xvmc.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-06-13 23:05:43 +02:00
Brian Paul 755f2e2ae5 mesa: move texrender.c to swrast
This stuff is really for software rendering, it's not core Mesa.
A small step toward pushing the FetchTexel() stuff down into swrast.

Reviewed-by: Eric Anholt <eric@anholt.net>
2011-06-13 13:45:39 -06:00
Brian Paul 8852e35e29 vbo: minor simplification in print_draw_arrays() debug function 2011-06-13 13:45:39 -06:00
Brian Paul e6e1864f1c mesa: move invariant code out of loop in get_tex_rgba() 2011-06-13 13:45:39 -06:00
Mathias Fröhlich 2f0b44f981 r600g: Put shaders into immutable buffers.
Put the shader programs into an immutable buffer object.
Also make sure that those object can be taken from the user
space buffer object pool.
2011-06-13 11:33:20 -04:00
Mathias Fröhlich b0f1767d77 r600g: Allow VRAM for the initial domain for every buffer binding. 2011-06-13 11:33:14 -04:00
Mathias Fröhlich e1f88016ec r600g: Set the domains value also for recycled buffer objects. 2011-06-13 11:31:55 -04:00
Mathias Fröhlich e2529442e6 r600g: Fix typo.
Fix an obvious typo in the yet unused part of the shader setup.
2011-06-13 11:31:13 -04:00