Commit Graph

26700 Commits

Author SHA1 Message Date
José Fonseca 7a2271c659 util: Make assert a no-op on non-debug builds.
This ensures that an assertion like

  assert(expensive_test());

won't have any penalty on release builds. It also implies that no vital
code should be in assert expressions.
2009-10-04 22:03:16 +01:00
José Fonseca 77ef705058 llvmpipe: Ensure tile cache transfers are mapped before flushing it. 2009-10-04 22:03:16 +01:00
José Fonseca 589ec337f0 llvmpipe: Autogenerate lp_tile_soa.c from u_format.csv.
This is just a temporary change until we code generate the tile read/write
functions in runtime. The new code avoids an extra memcpy that exists in
u_tile.c functions, from which lp_tile_soa.c was originally based.

This achieves up to 5% improvement, particularly in frames with
little geometry overlap.
2009-10-04 22:03:16 +01:00
José Fonseca 7a7dfb09aa util: Fix cpuid invocation for x86_64. 2009-10-04 22:03:15 +01:00
José Fonseca eb2e41f0c6 llvmpipe: Remove loop testing from format testing.
Loop building will be rewritten.
2009-10-04 22:03:15 +01:00
José Fonseca 10981c0a76 llvmpipe: Match header's protection macro with filename. 2009-10-04 22:03:15 +01:00
José Fonseca cd0a396813 llvmpipe: Adjust format assertion.
We support array layout too -- if it has a single channel.
2009-10-04 22:03:15 +01:00
Corbin Simpson 2a929a08ab r300g: xRGB and RGBx formats.
We now have 48 GLX visuals. Pretty soon, we'll have 90+ visuals,
only five of which ever get tested. :3
2009-10-04 09:30:30 -07:00
Chris Wilson f194d2737b intel: Suppress a compiler warning for an pointer->int cast
intel_pixel_read.c: In function ‘do_blit_readpixels’:
intel_pixel_read.c:221: warning: cast from pointer to integer of
different size

Cast via an intermediate (GLintptr) instead and hope the result fits
within GLuint... [It should as we simply do not support textures *that*
large!]

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-10-03 23:08:39 +01:00
Chris Wilson 470ec8d42e intel: Assert that relocation offsets are within the target
This should catch the common programming error where we attempt to
emit a relocation to beyond the end of the target buffer.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-10-03 23:06:39 +01:00
José Fonseca cbb57bf726 llvmpipe: Fetch tile only if a color buffer is bound. 2009-10-03 19:42:22 +01:00
Nicolai Hähnle 7d2699aedc prog_parameter: Document the fact that Size may be > 4
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-10-03 19:30:05 +02:00
Nicolai Hähnle 81e5188f66 r300g: Do not abort on fragment program compiler error
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-10-03 19:29:48 +02:00
Nicolai Hähnle 59b20b760d r300g: Fix memory leak in radeon_texture_from_shared_handle
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-10-03 18:07:34 +02:00
Sedat Dilek aa6aa77a1b r300g: Build in the trace and softpipe driver for xorg state tracker
Same as in src/gallium/winsys/drm/intel/xorg/Makefile

Thanks MrCooper for explanations on IRC

[ Summary amended by Michel Dänzer to clarify that this is related to the xorg
  state tracker ]
2009-10-03 18:01:58 +02:00
Michel Dänzer b330cebe01 radeon: Cope better with texture images with no miptrees.
Fixes crash with compiz magnifier plugin.
2009-10-03 18:01:58 +02:00
Michel Dänzer f741c1eed4 swrast: Move up state validation in _swrast_ReadPixels.
This ensures the driver won't map the wrong set of textures.
2009-10-03 18:01:58 +02:00
Michel Dänzer 4a6759b778 meta: Make sure texImage->TexFormat is valid for CopyTex(Sub)Image. 2009-10-03 18:01:57 +02:00
Nicolai Hähnle 26df8af4fe r300g: Remove an unnecessarily created pipe buffer (and thus fix a leak)
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-10-03 17:51:09 +02:00
Nicolai Hähnle fce2095a90 st/dri: Install APPLE_vertex_array_object functions
Besides from being necessary to use that extension, it also fixes a crash
when deleting the currently bound vertex array object.

Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-10-03 17:42:50 +02:00
Nicolai Hähnle 751aa58e01 r300g: Reset vbo_offset after allocation of a new buffer
This fixes the glxgears bug, among other things.

Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-10-03 17:27:50 +02:00
Nicolai Hähnle ebbd65eb06 st/dri: Install ARB_vertex_array_object functions
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-10-03 11:45:19 +02:00
Brian Paul be16acaafa mesa: optimized _mesa_meta_BlitFramebuffer() for src=texture case
If the src renderbuffer is actually a texture, we can directly use that
texture as the src and avoid a copy.
2009-10-02 14:00:02 -06:00
Eric Anholt 4182b58169 i965: Use a little stack space to avoid a malloc in wm_get_binding_table. 2009-10-02 11:42:19 -07:00
Eric Anholt 6d0fc3cfde mesa: Remove another unexplained Flush call, this time from BindFramebuffer.
Combined with the previous fix, it takes cairo-gl firefox-talos-gfx time
from 120 seconds to 90 seconds on my GM45.
2009-10-02 11:42:07 -07:00
Eric Anholt f019577f0c Revert "Flush driver, not just tnl module."
This reverts commit df058298e1.  It didn't
explain why it was required, doesnt appear to be required, and is a
significant performance penalty for cairo-gl firefox.

Conflicts:

	src/mesa/main/fbobject.c
2009-10-02 11:41:29 -07:00
Eric Anholt 3d78a86cd7 intel: Remove an unexplained flush from intelClearWithBlit. 2009-10-02 11:38:36 -07:00
Alex Deucher 3f623cfffe r600: remove support for host-based ibs
no longer used now that the hw supports this natively.

Also, clean up some formatting.
2009-10-02 14:34:28 -04:00
Keith Whitwell 918199fb0f mesa/st: don't reuse vertex buffers for bitmap, clear quads
Currently using max_slots > 1 will cause synchronous rendering
if the driver flushes its command buffers between one bitmap and the
next.

Need to improve buffer_write to allow NO_WAIT (as well as no_flush)
updates to buffers where we know there is no conflict with previous
data.
2009-10-02 19:03:15 +01:00
Michel Dänzer 316b4ddcf7 st/xorg: Use PIPE_TRANSFER_MAP_DIRECTLY flag in EXA PrepareAccess hook.
Propagate NULL return value.

This also allows removing the DRM_MODE_FEATURE_DIRTYFB specific pixmap
management hacks.
2009-10-02 18:13:26 +02:00
Michel Dänzer 9db647bb7a gallium: Add PIPE_TRANSFER_MAP_DIRECTLY usage flag.
Asks the driver to map the texture storage directly or return NULL if that's
not possible.
2009-10-02 18:13:26 +02:00
Michel Dänzer 47e41b024e gallium: Preparations for adding more PIPE_TRANSFER_* usage flags.
Always test for PIPE_TRANSFER_READ/WRITE using the bit-wise and operator, and
add a pipe_transfer_buffer_flags() helper for getting the buffer usage flags
corresponding to them.
2009-10-02 18:13:26 +02:00
Brian Paul 7d4b348c67 intel: wrap _mesa_meta_GenerateMipmap()
Need to check if we'll take the software path so which requires mapping the
src texture image.

Fixes crash in piglit gen-compressed-teximage, bug 24219.  However, the
test still does not pass (it may never have).
2009-10-02 09:03:27 -06:00
Brian Paul f1cab802b8 mesa: added _mesa_meta_check_generate_mipmap_fallback() 2009-10-02 09:03:27 -06:00
Younes Manton f9f7646fe6 g3dvl: Formatting. 2009-10-01 22:57:39 -04:00
Younes Manton 577f12fbba g3dvl: Delete state_trackers/g3dvl, other unused files. 2009-10-01 22:57:39 -04:00
Younes Manton fcb595c04f g3dvl: Copyright blocks. 2009-10-01 22:53:00 -04:00
Younes Manton 62db9b21da st/xvmc: Set default CSC matrix to BT.601, no ProcAmp, full range RGB. 2009-10-01 22:52:59 -04:00
Younes Manton e00da1476f g3dvl: Color space conv interface & vl impl.
Interface is pipe_video_context::set_csc_matrix().

vl_csc.h defines some helpers to generate CSC matrices based on one of
the color standard and a user defined ProcAmp (brightness, contrast,
saturation, hue).
2009-10-01 22:52:59 -04:00
Eric Anholt 81aa5d717b i915: Add stub ARB_occlusion_query support under a driconf debug option.
This is useful for enabling our GLSL testcases using the 2.0 entrypoints
even though we don't have full GL 2.0.
2009-10-01 14:54:15 -07:00
Eric Anholt 862a2a55b3 i915: Add optional support for ARB_fragment_shader under a driconf option.
Other vendors have enabled ARB_fragment_shader as part of OpenGL 2.0
enablement even on hardware like the 915 with no dynamic branching or
dFdx/dFdy support.  But for now we'll leave it disabled because we don't
do any flattening of ifs or loops, which is rather restrictive.

This support is not complete, and may be unstable depending on your shaders.
It passes 10/15 of the piglit glsl tests, but hangs on glean glsl1.
2009-10-01 14:52:44 -07:00
Eric Anholt 67f4d626d3 i915: Add support or fallbacks for GLSL fragment shader opcodes. 2009-10-01 14:31:04 -07:00
Eric Anholt f9f31b2574 i915: Add support for varying inputs. 2009-10-01 14:31:04 -07:00
Eric Anholt 7d4b7460b0 i915: Enable ARB_vertex_shader for both i915 and i830.
Since the TNL is all done in software anyway, it should be the same to
the user who's probably using ARB_vertex_program otherwise, but gives them
a nicer programming environment.
2009-10-01 14:31:03 -07:00
Eric Anholt 96a3c69d48 i915: Increase maximum program size to the hardware limits.
This fixes potential heap trashing if the program of choice exceeds limits,
and fixes the native instructions limit being lower than what can be
used by valid programs.
2009-10-01 14:31:03 -07:00
Eric Anholt 61b512c47c i915: Update and translate the fragment program along with state updates.
Previously, we were doing it in the midst of the pipeline run, which gave
an opportunity to enable/disable fallbacks, which is certainly the wrong
time to be doing so.  This manifested itself in a NULL dereference for PutRow
after transitioning out of a fallback during a run_pipeline in glean glsl1.
2009-10-01 14:31:03 -07:00
Eric Anholt d6fbf87575 Revert "i915: don't validate PS program when falling back to software"
This reverts commit e7044d552c.  It
prevented the driver from ever recovering from a software fallback due
to a program error.  The original bug it claimed to fix doesn't appear to
exist post-revert.
2009-10-01 14:31:03 -07:00
Eric Anholt 4ff816751f i915: Bail when the fragment program has too many total instructions.
Previously, we'd go trashing the heap.
2009-10-01 14:31:03 -07:00
Eric Anholt 994d1db079 i915: Let i915_program_error take a format string, and don't use _mesa_problem.
It's misleading to report things like the program having too many native
instructions as a Mesa implementation error, when the program may just be
too big for the hardware.
2009-10-01 14:31:03 -07:00
Brian Paul 5d2413fca4 Merge branch 'mesa_7_6_branch' 2009-10-01 13:35:42 -06:00