Commit Graph

5006 Commits

Author SHA1 Message Date
Jakob Bornecrantz c4b821a4c6 i965g: Drop i965simple
The driver never work with real hardware and has
bitrotted for quite some time now, might as well
drop it. If somebody wants to look at it just use git.
2009-10-05 19:48:03 +01:00
Joakim Sindholt 1f39d59a29 r300g: fix scons build
So I didn't touch r300compiler, but r300g now compiles after having
declarations and code untangled. As nha so gently points out, we shouldn't
have to do this just to comply with MSVC compilers.
2009-10-05 19:25:04 +02:00
José Fonseca 6971be783b util: Improve the cpuid assembly.
No need to save ebx on 64bit. Use just xchgl. Refer to gcc's cpuid.h header.

Thanks to Uros Bizjak for pointing this out.
2009-10-05 16:49:21 +01:00
Keith Whitwell 6a085184eb util: add lost code to util_make_fragment_tex_shader_writemask()
This got ported to ureg at some point, but lost the code that
distinguishes it from regular util_make_fragment_tex_shader().
2009-10-05 15:51:55 +01:00
Ben Skeggs d47de50540 st/dri: avoid segfault if we can't get a pixmap's buffers
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2009-10-05 15:52:33 +10:00
Ben Skeggs 7bfc3172e8 nv50: support PIPE_FORMAT_X8R8G8B8_UNORM
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2009-10-05 15:36:06 +10:00
Ben Skeggs 5313f1be11 nouveau: return pitch value from local_handle_from_texture()
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2009-10-05 15:36:02 +10:00
Ben Skeggs 1336989ec6 st/dri: no need to request fake front buffer, only handle it being returned
The previous behaviour was incorrect, and resulted in EXT_tfp being broken
for DDX drivers that implement the correct behaviour (intel/radeon/nouveau).

In the cases where a fake front buffer is required, the X server will
return one when requesting __DRI_BUFFER_FRONT_LEFT.

The Xorg state tracker (aka modesetting_drv) is likely broken now until
it's modified to match the other drivers.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2009-10-05 15:32:55 +10:00
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
Nicolai Hähnle 995135479d r300/compiler: Refactor to allow different instruction types
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-10-04 11:41:03 +02:00
Nicolai Hähnle b7cf887ca7 r300/compiler: Introduce control flow instructions and refactor dataflow
Note that control flow instruction support isn't actually fully functional yet.

Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-10-03 23:37:16 +02: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 6d25b9125e Merge branch 'master' into r300-compiler 2009-10-03 19:30:48 +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
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
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 85ee0ef9a7 gallium/xlib: use bitwise-and to test GLX_RGBA_BIT in choose_visual()
The parameter is a bitmask.
2009-10-02 07:52:29 -06:00
Brian Paul abc12d0636 gallium/xlib: return GLX_RGBA_BIT or GLX_COLOR_INDEX_BIT in get_config()
This reverts part of commit a6b84aef4a
2009-10-02 07:47:49 -06:00
Brian Paul 389021220d gallium: replace // comments with /* */ 2009-10-02 07:31:42 -06:00
Brian Paul 337480e1f8 gallium: remove // comment and extra whitespace 2009-10-02 07:26:28 -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
Brian Paul 0f291f2efe gallium/util: silence uninitialized var warning 2009-10-01 14:52:10 -06:00
Brian Paul 5d2413fca4 Merge branch 'mesa_7_6_branch' 2009-10-01 13:35:42 -06:00
Michel Dänzer e32a341be6 st/xorg: Check that ms->api->destroy is not NULL before calling it.
Fixes potential crash on X server shutdown.
2009-10-01 16:45:11 +02:00
Robert Noland 0b466c8705 util: Enable sockets on BSD
I think this should be safe for all of the BSDs.

Signed-off-by: Robert Noland <rnoland@2hip.net>
Signed-off-by: Brian Paul <brianp@vmware.com>
2009-10-01 08:42:48 -06:00
Robert Noland 908ecb3faa util: define PIPE_OS_FREEBSD to correct u_cpu_detect on FreeBSD.
Since the various BSDs use some different features here,
define PIPE_OS_OPENBSD and PIPE_OS_NETBSD as well

Signed-off-by: Robert Noland <rnoland@2hip.net>
2009-10-01 08:40:30 -06:00
Keith Whitwell 4456006ba6 gallium: remove depth.occlusion_count flag
This was redundant as drivers can just keep track of whether they are
inside a begin/end query pair.  We want to add more query types later
and also support nested queries, none of which map well onto a flag like
this.  No driver appeared to be using the flag.
2009-10-01 14:34:23 +01:00
Michel Dänzer 81a62edc08 st/xorg: Fix debug option function call typo. 2009-09-30 18:01:46 +02:00
Chia-I Wu 4b95481e95 st/egl: Fix a double free in drm_destroy_context.
st_destroy_context has destroyed the pipe context for us.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-09-30 08:15:30 -06:00
Chia-I Wu dd81cc885c st/egl: Fix a crash when unbinding current context.
This fixes a NULL-pointer dereference when
eglMakeCurrent(dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT)
is called.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-09-30 08:15:30 -06:00
Brian Paul a6b84aef4a gallium/xlib: fix GLX_RENDER_TYPE query
Return GLX_RGBA_TYPE or GLX_COLOR_INDEX_TYPE.
2009-09-29 12:17:20 -06:00
José Fonseca baddcbc522 llvmpipe: Workaround for bug in llvm 2.5.
The combination of fptosi
and sitofp (necessary for trunc/floor/ceil/round implementation)
somehow becomes invalid code.

Skip the instruction combining pass when SSE4.1 is not available.
2009-09-29 17:28:15 +01:00
José Fonseca a02ecdf8c2 llvmpipe: First verify LLVM IR, only then run optimizing passes. 2009-09-29 17:28:15 +01:00
José Fonseca 754f48871c llvmpipe: Runtime cpu checks for lp_build_min_simple too. 2009-09-29 17:28:15 +01:00
José Fonseca 741c40a232 llvmpipe: Implement non SSE4.1 versions of floor and round. 2009-09-29 17:28:15 +01:00
Brian Paul 124f5875ea Merge branch 'mesa_7_6_branch'
Conflicts:

	Makefile
	configs/default
	docs/relnotes.html
	src/gallium/drivers/softpipe/sp_context.c
	src/gallium/drivers/softpipe/sp_tile_cache.c
	src/mesa/main/version.h
2009-09-29 09:46:49 -06:00
Brian Paul 564df9dc5f softpipe: initialize the clear_flags bitvector in sp_create_tile_cache()
This silences tons of valgrind warnings in programs that don't call
glClear(), such as progs/demos/gamma.
2009-09-29 08:51:00 -06:00
Brian Paul fbddc75aa2 softpipe: Grab a ref when the fb is set.
Nasty bug when the surface is freed and another is allocated right on
top of it. The next time we set the fb state SP thinks it's the same
surface and doesn't flush, and when the flush eventually happens the
surface belongs to a completely different texture.

(cherry picked from commit a77226071f)

Conflicts:
	src/gallium/drivers/softpipe/sp_context.c
2009-09-29 08:21:54 -06:00
José Fonseca 7cda8ea44c llvmpipe: Emit SSE intrinsics based on runtime cpu capability check.
Note that llvmpipe still doesn't run on any processor yet: if you don't
have a recent processor with SSE4.1 you will still likely end up
hitting a code path for which a generic non-sse4 version is not
implemented yet.
2009-09-29 13:59:16 +01:00
José Fonseca a81fb2a0d2 util: Cleanup u_cpu_detect, build. Support X86_64 and detect SSE4.1 too.
I was waiting for the need to use this code to arise, and it finally came.

I've tested building this on Linux and Windows, both x86 and x64_64. But
it might break other platforms. Please bear with me and help me fix it.

Many thanks to Dennis Smit who submitted this, and Eric Anholt whose
work this was based on.
2009-09-29 13:59:16 +01:00
José Fonseca 8210abb113 gallium: New PIPE_OS_UNIX to simplify code that is portable to all unices. 2009-09-29 13:59:16 +01:00
Vinson Lee 60f3f22a52 i915: Fix MSVC build. 2009-09-29 11:10:42 +01:00
José Fonseca 57d0fcba67 python: Update for surface_buffer_create change. 2009-09-29 11:09:55 +01:00
José Fonseca bd2e36a38f g3dvl: assert.h -> util/u_debug.h 2009-09-29 11:09:55 +01:00
José Fonseca 7db33440a8 g3dvl: Define PIPE_VIDEO_CODEC_UNKNOWN for failures.
gcc 4.4 seems particularly picky with int -> enum conversions.
2009-09-29 11:09:55 +01:00
Jakob Bornecrantz 3a8d525373 st/xorg: Add debug for fallbacks 2009-09-28 21:34:45 -07:00
Jakob Bornecrantz e226bf8a5d st/xorg: Make debug printing optional 2009-09-28 21:26:13 -07:00
Brian Paul 8fda97afb8 Merge branch 'mesa_7_6_branch' 2009-09-28 10:02:20 -06:00
Brian Paul eeb7e04da6 Merge branch 'mesa_7_5_branch' into mesa_7_6_branch 2009-09-28 09:59:59 -06:00
Brian Paul 41d0606b7f gallium/util: add sanity check assertions 2009-09-28 09:35:04 -06:00
Younes Manton 9871521b30 llvmpipe: Grab a ref when the fb is set.
Based on softpipe commit a77226071f.
2009-09-28 15:35:29 +01:00
José Fonseca 5687053480 softpipe: Fix MSVC build. 2009-09-28 13:03:03 +01:00
José Fonseca 22658c1650 g3dvl: Fix MSVC build.
pipe/p_compiler for integer types. No declarations out of scope.
2009-09-28 13:02:42 +01:00
Cooper Yuan 99e1745af9 r300g: fix r300g cause GPU hang issue.
why there are two input position semantic tags is that ureg doesn't
set vs input semantic due to commit: 6d8dbd3d1e

so use vs input index instead of semantic name.
2009-09-28 17:55:38 +08:00
Younes Manton 70c44073ad xvmc: Fail on unsupported formats, operations. 2009-09-28 00:17:33 -04:00
Younes Manton c0745670d8 g3dvl: Missing semicolon. 2009-09-27 23:54:36 -04:00
Younes Manton d52d51ab8a g3dvl: Formatting and cleanups. 2009-09-27 23:14:52 -04:00
Younes Manton 97c28bb63a g3dvl: Move XvMC under the Xorg state tracker. 2009-09-27 21:54:20 -04:00
Younes Manton e44c85637a g3dvl: Implement XvMC using pipe_video_context. 2009-09-27 20:18:02 -04:00
Younes Manton f547472bfa g3dvl: pipe_video_context interface, softpipe impl, auxiliary libs 2009-09-27 19:49:06 -04:00
Younes Manton da793b7434 util: Add util_next_power_of_two() for rounding a uint up to a POT. 2009-09-27 19:25:57 -04:00
Maciej Cencora 540039887a r300g: fix erroneous condition 2009-09-27 22:44:29 +02:00
Maciej Cencora 98f6bea168 r300g: don't force vertex position for HW TCL path
It could be generated by vertex shader.
2009-09-27 22:44:28 +02:00
Maciej Cencora bedc6b7bdf r300g: add some assertions
Not sure why we are getting a shader with two inputs with position semantic, but we don't know how to handle it correctly so it's better to stop the app than lock the machine.
2009-09-27 22:44:28 +02:00
Maciej Cencora 8c8b77a5f3 r300g: plug memory leak 2009-09-27 22:44:27 +02:00
Maciej Cencora a6eb593072 r300g: add some debugging info 2009-09-27 22:44:27 +02:00
Dave Airlie d85fe842b8 r300g: fix r300 rs path 2009-09-28 06:42:25 +10:00
Dave Airlie b1252c7a34 r300g: rewrite RS state setup.
Not 100% sure this is correct, but its more correct than what was here previous
however it may require changes in the input routing for the frag shader.
2009-09-28 06:28:32 +10:00
Dave Airlie 225c3375fd r300g: silence compiler warning 2009-09-28 06:28:31 +10:00
Jakob Bornecrantz 48c45959ee i915g: Submit direct vertex buffers 2009-09-27 13:19:49 -07:00
Jakob Bornecrantz 2d71b541d7 i915g: Fix warning 2009-09-27 13:19:49 -07:00
Jakob Bornecrantz 973e9a774a i915g: Tile shared buffers as well 2009-09-27 13:19:49 -07:00
Jakob Bornecrantz 5aecddc153 i915g: Make sure to map tiled buffers via the gtt 2009-09-27 13:19:49 -07:00
Jakob Bornecrantz 60d72d9e45 i915g: Use boolean 2009-09-27 13:19:48 -07:00
Jakob Bornecrantz c3663bdc35 i915g: Enable reuse of buffers 2009-09-27 13:19:48 -07:00
Jakob Bornecrantz dd586078be st/egl: Remove buffer from screen
It is no longer needed since the new drm api code,
	and it incorrectly checked if the buffer where there
	for testing completeness when it should have checked
	the texture instead.
2009-09-27 13:19:48 -07:00
Younes Manton a77226071f softpipe: Grab a ref when the fb is set.
Nasty bug when the surface is freed and another is allocated right on
top of it. The next time we set the fb state SP thinks it's the same
surface and doesn't flush, and when the flush eventually happens the
surface belongs to a completely different texture.
2009-09-27 10:56:42 -04:00
Dave Airlie eb5dd947fb r300g: add tx depth support in register.
also enable cube/3d bits in txformat reg
2009-09-26 19:32:46 +10:00
Dave Airlie 9bf85f6b95 r300g: only pass complete texture state to hw setup function
No point passing things twice here, also allows more state
to be setup properly.
2009-09-26 18:39:54 +10:00
Dave Airlie ec9c02187e r300g: add missing break in OQ emit 2009-09-26 18:39:54 +10:00
José Fonseca 1df539ce87 llvmpipe: Allow building with LLVM 2.6 too. 2009-09-26 09:37:43 +01:00
Dave Airlie 28f531e3fe r300g: report GL1.5, enable cap bits for OQ and shadow.
Its not like it works well on 1.3 so may as well reach for greater
heights.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-26 18:25:00 +10:00