Commit Graph

5006 Commits

Author SHA1 Message Date
José Fonseca cb5f1bce23 gallium: pipe_transfer_destroy helper inline. 2009-09-15 16:02:54 +01:00
Christoph Bumiller d3a9cf54c0 nv50: fix stupid thinko in emit_set
When swapping sources 0 and 1, EQ of course does *not*
become NE, etc.

Introduced in 2b963f5c72.
2009-09-15 15:37:10 +02:00
Michal Krol 7aee53002c gallium: Fix pointer type casts. 2009-09-15 12:00:27 +01:00
Christoph Bumiller 750c6cae3d nv50: let programs use the whole param buffer
Allocation is unnecessary since all uniforms are
uploaded on every constant buffer change anyway.
2009-09-15 12:13:23 +02:00
Christoph Bumiller 01670ca807 nv50: add preliminary support for point sprites 2009-09-15 12:13:23 +02:00
Christoph Bumiller 06dac41cc5 nv50: add support for point size per vertex 2009-09-15 12:13:23 +02:00
Christoph Bumiller 4d7b4781c8 nv50: add support for light-twoside 2009-09-15 12:13:23 +02:00
Christoph Bumiller 6516594c8e nv50: proper linkage between VP and FP
This moves construction of the mapping between VP outputs
and FP inputs into validation.

The map also contains slots for special outputs like clip
distance and point size, so we need to at least merge the
VP related and FP related parts on validation if we want
to support those.

Now we match every single FP input component with results
from the VP and leave those not read out of the map, or
replace those not written by 0 (xyz) or 1 (w).
The bitmap indicating linear interpolants is also filled,
and flat FP inputs are mapped in only after non-flat ones,
as is required.

Furthermore, we can save some space by only fetching VP
attrs we actually use, and avoid wasting any output regs
because of TGSI using less than 4 components.
2009-09-15 12:13:23 +02:00
Christoph Bumiller 38849c529e nv50: move allocation of pc regs
Make use of tgsi_shader_info to determine how many nv50_regs we
need to allocate, whether program uses KIL, or writes DEPR.
2009-09-15 12:13:23 +02:00
Christoph Bumiller e0951797cb nv50: nicer initialization of nv50_regs 2009-09-15 12:13:23 +02:00
Christoph Bumiller 849885c7a6 nv50: handle CEIL and TRUNC opcodes 2009-09-15 12:13:23 +02:00
Christoph Bumiller 2b963f5c72 nv50: handle SEQ, SGT, SLE, SNE opcodes 2009-09-15 12:13:23 +02:00
Christoph Bumiller e774b3c0f2 nv50: SIN and COS use src0.w for dst.w 2009-09-15 12:13:22 +02:00
Christoph Bumiller 81de711fc8 nv50: use broadcast TEMP reg in tx_insn
Makes some opcode cases nicer and might reduce the total
nr of TEMPs required, or save some MOVs.
2009-09-15 12:13:22 +02:00
Christoph Bumiller 234d82ed63 nv50: add nv50_tgsi_insn to handle swizzles safely 2009-09-15 12:13:22 +02:00
Christoph Bumiller 2da8608ad7 nv50: add functions for swizzle resolution
We're going to try to reorder the scalar ops of a vector instr
to accomodate swizzles that would otherwise require us to emit
to an additional TEMP first (like MOV R0.xy, R0.zx).
2009-09-15 12:13:22 +02:00
Christoph Bumiller 5d141b3e3e nv50: extend insn src mask function
Extend its usage to avoiding e.g. emission of negation
instructions in tx_insn for sources we don't need.
2009-09-15 12:13:22 +02:00
Cooper Yuan 287f0072d2 st/g3dvl: pass color values to softpipe clear function 2009-09-15 15:25:47 +08:00
Zack Rusin ef77462171 st/xorg: add some debugging helpers 2009-09-14 19:03:28 -04:00
Brian Paul 5a87a25a65 st/xorg: fix ureg_DECL_constant() parameters
This fixes the compilation errors reported in bug 23945 but someone more
familiar with the code should review for correctness and close the bug
report.
2009-09-14 15:47:13 -06:00
José Fonseca c51bd94a14 gallium: Add pipe_transfer_map/unmap inlines. 2009-09-14 20:12:01 +01:00
José Fonseca 88b88bba68 util: Add _BitScanForward intrinsic's declaration.
It is missing in some Microsoft DDKs.
2009-09-14 20:12:01 +01:00
Vinson Lee 2729db8976 gallium: Add Mac OS to pipe/p_thread.h.
Mac OS also has POSIX threads.
2009-09-14 11:50:48 -06:00
Marcin Kościelnicki d8a191e314 nv50: Fix m2mf positions. 2009-09-14 12:12:03 +02:00
José Fonseca b4835ea03d llvmpipe: Make lp_type a regular union.
Union not worth the hassle of violating C99 or adding a name to
the structure.
2009-09-14 11:05:38 +01:00
José Fonseca fa150debf0 util: Fix a1r5g5b5's format description. 2009-09-14 11:05:38 +01:00
Cooper Yuan aad0deee4b g3dvl: update tgsi_opcode in order to build g3dvl library 2009-09-14 16:23:03 +08:00
Keith Whitwell 66a7eedaa2 tgsi: handle some src/dst aliasing in tgsi_sse2.c
Src/Dst aliasing (aka SOA dependencies) requires some care to ensure
intermediate results do not overwrite yet-to-be read source registers.

This change ensures that MOV/SWZ handle this correctly, which is poor but
no worse than the current tgsi_exec.c path.  Remove the fallback as there
is nothing to be gained correctness-wise between the two implementations now.

Fixing this properly looks like a bit of work in this code, but might be
easily achieved by sending destination writes to temporary storage.
2009-09-13 11:59:24 -07:00
José Fonseca 86226d5ea1 llvmpipe: Compute derivatives. 2009-09-13 16:22:27 +01:00
José Fonseca 4b32dd3007 llvmpipe: Remove dead references to pipe_winsys. 2009-09-13 16:13:12 +01:00
José Fonseca 5e13e987da llvmpipe: Use const keyword for input array arguments. 2009-09-13 16:12:48 +01:00
José Fonseca faec23387e llvmpipe: Delay storing into the dst register to prevent clobbering the src registers.
How I'm thankful for regular expressions -- just a couple of them were
all that was needed to do this otherwise tiresome and bug prone change.
2009-09-13 14:42:52 +01:00
José Fonseca 873773ee2b llvmpipe: Translate more TGSI opcodes.
Basically cover all low hanging fruit, and mark the still missing opcodes
as "fixme" or deprecated.
2009-09-13 13:55:08 +01:00
José Fonseca 00dd0156e0 llvmpipe: Add a few more common arithmetic functions.
We are relying on SSE4.1 for round/trunc/ceil/floor. We'll need to
eventually find alternatives for the rest of the world.
2009-09-13 13:50:19 +01:00
José Fonseca d7aa114e16 llvmpipe: Rename function to free up lp_build_trunc to the usual arithmetic meaning. 2009-09-13 13:45:48 +01:00
Keith Whitwell 18e5f1cee4 tgsi: implement saturation
Fix recent performance regression.
2009-09-12 18:33:46 -07:00
Keith Whitwell 055fe5768c tgsi: add missing implementation of constant decl change 2009-09-12 16:27:25 -07:00
Cooper Yuan bffa18624d r300g: delete unused flag due to commit: 09b566e161 2009-09-13 07:10:34 -04:00
Keith Whitwell 11f41f54cf ureg: add a mechanism to get the built tokens rather than a full shader
Previously ureg would always call the driver's create-shader function.  This
allows the caller the opportunity to hold onto the tokens if it needs to
reuse them, eg. to create an internal draw shader.
2009-09-12 14:18:50 -07:00
Keith Whitwell c23894295b ureg: add generic emitters for tex and branch instructions
Couldn't previously emit these except by calling the opcode-specific helper.
2009-09-12 14:18:00 -07:00
Keith Whitwell ae4704eabc tgsi/ureg: give ureg_DECL_constant an explicit index parameter
Avoid the need to emit all constant declarations in order.  Makes
referring to a specific constant in the constant buffer much easier.
2009-09-12 14:16:00 -07:00
Keith Whitwell 6d8dbd3d1e tgsi/ureg: VS inputs don't have any semantic tags, just an index
Fix ureg_DECL_vs_input to reflect this and fix up all callers.
2009-09-12 14:12:35 -07:00
Keith Whitwell 149945c432 tgsi: free tokens on error 2009-09-12 14:07:48 -07:00
Keith Whitwell e90fb86ac3 tgsi: sanity check ureg programs 2009-09-12 14:05:37 -07:00
Keith Whitwell 983b261e6d tgsi: add const qualifier 2009-09-12 14:04:36 -07:00
Nicolai Hähnle 3cb30e55e4 r300g: There is no such thing as "texture stride"
Individual texture images have a stride, but textures as a whole do not.

There are still pieces of code which are confused about this, but the core of
the confusion is hopefully gone.

Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-09-12 16:55:25 +02:00
Brian Paul d81086a86b llvmpipe: asst fixes for 'make linux-llvmpipe' 2009-09-11 13:39:14 -06:00
Cooper Yuan 622b31925b r300g: only allocate one BO for vertex buffers, default size is 64*1024
it can fix redbook/sceneflat, scene, scenebamb, surface, nurbs and so on
2009-09-11 23:21:28 +08:00
José Fonseca 672c5f52d1 llvmpipe: set dirty_render_cache in llvmpipe_clear()
Based on Brian's softpipe change on
commit 988db64119. We don't use the tile
cache for zsbuf though, only for color buffers.
2009-09-11 11:29:24 +01:00
José Fonseca 1fc4100225 llvmpipe: Update status in README and TODO/FIXME comments throughout the code. 2009-09-11 11:24:26 +01:00
Brian Paul 6bc36f29c7 softpipe: remove no-op softpipe_init_texture_funcs() function 2009-09-10 16:51:52 -06:00
Brian Paul 209031701a softpipe: remove unused #includes, move comment 2009-09-10 16:50:18 -06:00
Brian Paul de059d35c3 util: remove unneeded #includes 2009-09-10 16:45:25 -06:00
Brian Paul afcaa45a94 softpipe: reformatting, clean-ups, comments 2009-09-10 16:42:47 -06:00
Brian Paul 759696defb util: minor clean-ups, reformatting 2009-09-10 16:39:13 -06:00
Brian Paul 71b3ccc4b0 softpipe: remove unneeded #includes 2009-09-10 16:38:51 -06:00
Brian Paul d9dc4cb0e4 Merge branch 'mesa_7_6_branch' 2009-09-10 15:41:52 -06:00
Zack Rusin 8c37a4c8fd st/xorg: rename ctx to pipe to match every other gallium state tracker
plus it avoids the "ctx->ctx->" syntax
2009-09-10 17:43:25 -04:00
Brian Paul 4b1cbfcbe6 Merge branch 'mesa_7_5_branch' into mesa_7_6_branch 2009-09-10 15:40:26 -06:00
Zack Rusin 85a716bf62 st/xorg: temporarily disablie copies 2009-09-10 17:21:06 -04:00
Zack Rusin feb74e7753 st/xorg: implement pipelines surface/texture copies 2009-09-10 17:21:06 -04:00
Zack Rusin 57d0934bc5 st/xorg: unite finalization and stub out pipelined copies 2009-09-10 17:21:06 -04:00
Zack Rusin 974dec2e7b st/xorg: abstract flushing and syncing for the exa code 2009-09-10 17:21:06 -04:00
Zack Rusin 16886c8be3 st/xorg: disable solid fills until copies are accelerated as well 2009-09-10 17:21:06 -04:00
Zack Rusin 6be1a98ab9 st/xorg: implement exasolids with full pipelining
plus fix some small issues with the shaders
2009-09-10 17:21:06 -04:00
Zack Rusin 3167c2e8a0 st/xorg: start adding support for surface fills 2009-09-10 17:21:06 -04:00
Brian Paul 3f4d776199 softpipe: minor indentation fix 2009-09-10 14:14:18 -06:00
Brian Paul 988db64119 softpipe: set dirty_render_cache in softpipe_clear()
This fixes a bug seen when doing a glDrawPixels(GL_STENCIL_INDEX) right
after a glClear().  The check-for-flush test was failing because we
didn't set the dirty_render_cache flag in softpipe_clear().  So we saw
stale data when we mapped the stencil buffer.
2009-09-10 14:11:41 -06:00
Marcin Kościelnicki 18882f4d30 nv50: Fix tiling mode for lower mipmap levels. 2009-09-10 21:06:48 +02:00
Brian Paul d78a196121 tgsi: use new tgsi_call_record to handle execution mask stacks
This fixes some issues when "return"ing from nested loops/conditionals.
2009-09-10 12:45:27 -06:00
Vinson Lee 23fefa031f gallium: Add PIPE_OS_APPLE back to auxiliary/util/u_time.h.
Fixes typo from commit c6c44bf481.
2009-09-10 08:40:16 -06:00
Vinson Lee c7291f69a0 util: Add PIPE_OS_APPLE back to auxiliary/util/u_time.h.
Fixes typo from commit c6c44bf481.
2009-09-10 15:33:57 +01:00
José Fonseca 6a405b4a21 llvmpipe: Fix alpha test. 2009-09-10 13:35:39 +01:00
José Fonseca 4c3a48ad0c llvmpipe: Mask out color channels not present in the color buffer. 2009-09-10 12:37:44 +01:00
José Fonseca 48f19c0bcd llvmpipe: Fix sampling from depth textures. Respect texture compare func.
Fixes Mesa shadowtex sample.
2009-09-10 12:14:53 +01:00
José Fonseca c3c80c5c22 llvmpipe: Skip blending when mask is zero.
This increases quake3 timedemo fps another 10%.
2009-09-10 12:01:42 +01:00
José Fonseca 8e6b925d2a llvmpipe: Proper control flow builders.
New control flow helper functions which keep track of all variables
and generate the correct Phi functions.

This re-enables skipping the fs execution of quads masked out by
the rasterizer, early z testing, and kill opcode.

This yields a performance improvement of around 20%.
2009-09-10 11:44:03 +01:00
José Fonseca bd3b59da63 llvmpipe: Copy the texture target into the sampler static state.
Hunk forgotten in previous commit.
2009-09-10 09:19:51 +01:00
José Fonseca 4139bc8f43 llvmpipe: Quick hack for 1D textures. 2009-09-09 21:48:50 +01:00
José Fonseca abc160b664 llvmpipe: Fix depth mask computation.
Fixes depth test for 24bit depth formats.
2009-09-09 21:48:50 +01:00
José Fonseca cdbbcdf3bd llvmpipe: Include zsbuf's format in the fragment shader key. 2009-09-09 21:48:50 +01:00
José Fonseca da912a7a16 util: Fix depth/stencil format description.
Inverse channel order.
2009-09-09 21:48:49 +01:00
José Fonseca 01c831576e llvmpipe: Debug function to check stack alignment.
Doing alignment check in locus is redundant, as gcc alignment assumptions
will optimize away the check.
2009-09-09 21:48:49 +01:00
Brian Paul 7bf6347362 Merge branch 'mesa_7_6_branch' 2009-09-09 09:00:58 -06:00
Brian Paul 0c309bb494 Merge branch 'mesa_7_5_branch' into mesa_7_6_branch
Conflicts:

	Makefile
	configs/default
	progs/glsl/Makefile
	src/gallium/auxiliary/util/u_simple_shaders.c
	src/gallium/state_trackers/glx/xlib/xm_api.c
	src/mesa/drivers/dri/i965/brw_draw_upload.c
	src/mesa/drivers/dri/i965/brw_vs_emit.c
	src/mesa/drivers/dri/intel/intel_context.h
	src/mesa/drivers/dri/intel/intel_pixel.c
	src/mesa/drivers/dri/intel/intel_pixel_read.c
	src/mesa/main/texenvprogram.c
	src/mesa/main/version.h
2009-09-09 08:33:39 -06:00
aljen c6c44bf481 gallium: Added HaikuOS platform 2009-09-09 08:24:18 -06:00
Brian Paul 97cbaab541 gallium: added r8g8b8_get/put_tile_rgba() 2009-09-08 16:45:34 -06:00
Jakob Bornecrantz e589a37f7b i915g: Add buffer write callback 2009-09-09 00:43:36 +01:00
Jakob Bornecrantz d112132840 i915g: Reorg vbuf code a bit 2009-09-09 00:43:36 +01:00
Jakob Bornecrantz 547b726484 i915g: pwrite batchbuffer instead of map 2009-09-09 00:43:36 +01:00
Jakob Bornecrantz d585616f5b i915g: Keep vertex buffers in a fifo 2009-09-09 00:43:35 +01:00
Jakob Bornecrantz 6e61d06209 util: Add super simple fifo 2009-09-09 00:43:35 +01:00
Jakob Bornecrantz 3833587818 i915g: Map vertex buffers via gtt 2009-09-09 00:43:35 +01:00
Jakob Bornecrantz 530fbd314e i915g: Remove lib prefix from driver 2009-09-09 00:43:35 +01:00
Michel Dänzer e34ea368d9 st/xorg: Add support for EXA_MIXED_PIXMAPS and EXA_SUPPORTS_PREPARE_AUX.
Also make sure not to leak malloced memory when switching pixmaps to texture
based.
2009-09-08 18:08:24 +02:00
Michal Krol fcb94f6e3e gdi: Fix prototype of gdi_softpipe_surface_buffer_create(). 2009-09-08 10:22:07 +02:00
Vinson Lee 79f48c9f9e scons: Don't set LLVM_VERSION if one of the llvm-config calls fails.
Ubuntu 8.10 has llvm-config version 2.2, which doesn't have
nativecodegen. This triggers an exception.
2009-09-07 15:16:25 +01:00
José Fonseca b481fb2c6d llvmpipe: Silent debug statement. 2009-09-07 15:02:08 +01:00
José Fonseca 1127201088 llvmpipe: Better abs for floating points. 2009-09-07 15:02:08 +01:00
José Fonseca e4c76c02f7 llvmpipe: Code generate the texture sampling inside the shader.
Finally a substantial performance improvement: framerates of apps using
texturing tripled, and furthermore, enabling/disabling texturing only
affects around 15% of the framerate, which means the bottleneck is now
somewhere else.

Generated texture sampling code is not complete though -- we always
sample from the base level -- so final figures will be different.
2009-09-07 15:02:08 +01:00
José Fonseca de8376e2f2 llvmpipe: Texture sampling code generation primitives.
Only supports single level 2d textures, with neareast and bilinear
filtering for now.
2009-09-07 15:02:07 +01:00
José Fonseca 0c2ea24338 llvmpipe: Convenience function to obtain the integer type with same bitdepth of an arbitrary type. 2009-09-07 15:02:07 +01:00
José Fonseca fa0f4b35be llvmpipe: Utility functions for linear and bilinear interpolation. 2009-09-07 15:02:07 +01:00
José Fonseca 4da20234f3 llvmpipe: Correct implementation of floor. 2009-09-07 15:02:07 +01:00
José Fonseca b1eff018c7 llvmpipe: Utility function to get the pointer to a structure member. 2009-09-07 15:02:07 +01:00
José Fonseca 866fbacf2b llvmpipe: SoA pixel unpacking specialization. 2009-09-07 15:02:06 +01:00
José Fonseca 6b129a8222 util: Utility function to check if a number is a power of two. 2009-09-07 15:02:06 +01:00
José Fonseca 8be72bb764 llvmpipe: Further abstract the texture sampling generation from TGSI translation. 2009-09-07 15:02:06 +01:00
Michel Dänzer 617202b578 r300g: Fix some issues pointed out by compiler warnings. 2009-09-06 18:12:14 +02:00
Michel Dänzer 7b8ec0d8e7 r300g: Handle PIPE_BUFFER_USAGE_DONTBLOCK as intended.
Return NULL if the BO is busy, otherwise just map it.
2009-09-06 18:12:14 +02:00
Nicolai Hähnle 1ddb22675c r300g: Fix a number of warnings
Seriously guys....
2009-09-06 15:14:22 +02:00
Nicolai Hähnle 4b01e6f614 r300g: Debug flags infrastructure
So that debugging is no longer a full-spam-or-nothing approach, you are now
supposed to set the RADEON_DEBUG environment flag just like for classic Mesa.

The available debug flags are different, however. Just running an OpenGL
application with RADEON_DEBUG set to an arbitrary string will print out
helpful information.

Everything must be compiled with -DDEBUG for any of this to work
2009-09-06 15:03:52 +02:00
Nicolai Hähnle f02f63997c Merge branch 'master' into r300-compiler
Conflicts:
	src/gallium/drivers/r300/r300_tgsi_to_rc.c
2009-09-06 13:15:04 +02:00
Cooper Yuan 9778731732 r300g: update the value of register VAP_VF_MAX_VTX_INDX
according to actual vertex index count.
2009-09-05 20:58:32 +08:00
Cooper Yuan 80ea03bd17 r300g: update rs_block state after changing rasterizer 2009-09-05 14:26:39 +08:00
Cooper Yuan 8f990f928b r300g: need to validate scissor and viewport state if bind new rasterizer 2009-09-05 10:26:39 +08:00
Brian Paul 40636fe6f2 gallium/xlib: minor clean-ups 2009-09-04 09:17:59 -06:00
Jakob Bornecrantz 65c79c9cbd i915g: Fix warnings in scons build by using byte pointers
scons build complained about void pointer math
2009-09-04 10:55:53 +01:00
Michal Krol ce39cd6696 tgsi: Document differencies between vs_1_1 and vs_2_0 for EXPP and LOGP. 2009-09-04 09:31:22 +02:00
Brian Paul 7ec865202e gallium/xlib: silence unitialized var warning 2009-09-03 16:07:46 -06:00
Brian Paul 9e711b6865 gallium/xlib: silence uninitialized var warning 2009-09-03 16:07:46 -06:00
Keith Whitwell 862724d3c2 util: add version of u_blit_pixels which takes a writemask
Values outside the writemask are set in the destination to {0,0,0,1}
2009-09-03 16:07:45 -06:00
Brian Paul 32156f3a11 gallium/xlib: silence unitialized var warning 2009-09-03 15:44:22 -06:00
Brian Paul 1c32caf075 gallium/xlib: silence uninitialized var warning 2009-09-03 15:23:15 -06:00
Zack Rusin 323440b3e2 st/xorg: add linear and radial gradient acceleration 2009-09-03 16:52:04 -04:00
Zack Rusin 007a843991 st/xorg: radial gradient shader 2009-09-03 16:52:04 -04:00
Zack Rusin 5571c4fe36 st/xorg: linear gradient shader 2009-09-03 16:52:04 -04:00
Jakob Bornecrantz 3070b13f4c i915g: Up the number of relocs 2009-09-03 19:33:07 +01:00
Jakob Bornecrantz 8303c722cb i915g: Don't run in sync with HW 2009-09-03 19:33:07 +01:00
Jakob Bornecrantz 87a4fa56ae i915g: Don't send flush flags to HW 2009-09-03 19:33:07 +01:00
Zack Rusin 5643942517 st/xorg: cleanup and adjust to the changes in the ureg code 2009-09-03 12:44:15 -04:00
Zack Rusin 07f9ad5c32 st/xorg: adjust enums in preperation for gradients 2009-09-03 12:41:39 -04:00
Keith Whitwell 848ab8be8c aux/tgsi: pull back ureg work from 0.1 branch
Manual merge of ureg changes on the branch.  Too much unrelated stuff
for a proper merge.
2009-09-03 15:16:25 +01:00
Christoph Bumiller 8b1ef3fa35 nv50: move centroid, flat bits when making interp long
Before this, just the perspective divide bit was moved in
convert_to_long of the load interpolant instruction.
2009-09-03 12:54:41 +02:00
Christoph Bumiller ffee352726 nv50: fix vbo_static_attrib method size error
The VTX_ATTR_3/2/1F methods also had size 4 ...
a stupid copy/paste error.
2009-09-03 12:42:42 +02:00
Christoph Bumiller c8258b95d6 nv50: fix draw_elements_inline_u08/16
We've been emitting the same two indices over and over
without incrementing map.
2009-09-03 12:42:42 +02:00
Cooper Yuan e938d4a053 r300g: specify point/line/triangle have stuffed texture coord 2009-09-03 17:06:18 +08:00
Zack Rusin 206eb50493 st/xorg: fix warnings 2009-09-02 18:39:21 -04:00
Zack Rusin d6b58a97c2 st/xorg: handle xrender repeat modes 2009-09-02 18:38:23 -04:00
Zack Rusin dc9de8064f st/xorg: flip the coordinate system 2009-09-02 17:21:28 -04:00
Zack Rusin d918896a75 st/xorg: handle solid fills in the fragment shader 2009-09-02 17:16:03 -04:00
Jakob Bornecrantz 7d8f33590f st/xorg: Guard against realy old versions of Xorg 2009-09-02 19:48:49 +02:00
Keith Whitwell de343680a3 util: add version of u_blit_pixels which takes a writemask
Values outside the writemask are set in the destination to {0,0,0,1}
2009-09-02 18:31:48 +01:00
Keith Whitwell 1d7a989b10 draw: remove unused variable 2009-09-02 18:31:47 +01:00
Michel Dänzer c0cf0fd163 st/xorg: Remove code no longer support by xserver Git master.
Shouldn't be necessary with older versions either.
2009-09-02 16:01:21 +02:00
Michel Dänzer ea55f8ed8f st/xorg: Add support for xserver Git master DRI2 interface.
Reorganize to handle both interfaces with common code.
2009-09-02 16:00:30 +02:00
Michel Dänzer 0b26d97f4d st/dri: Slight consolidation of DRI2 buffer handling.
Always use / assume a combined depth/stencil buffer.

Also update drawable formats from surfaces returned by the driver.
2009-09-02 15:41:41 +02:00
Michel Dänzer 385620e5eb st/xorg: Add EXA UploadToScreen and DownloadFromScreen hooks. 2009-09-02 15:41:40 +02:00
Ben Skeggs a82cd55a5c nv50: SWZ is the same as MOV from our perspective 2009-09-02 12:05:34 +10:00
Zack Rusin 7e4487ad5c st/xorg: getting indexes right tends to be helpful 2009-09-01 19:01:05 -04:00
Zack Rusin 5c746d9214 st/xorg: redo the vertex shader 2009-09-01 18:59:01 -04:00
Zack Rusin a8cbb15632 st/xorg: setup solid fills 2009-09-01 17:49:32 -04:00
Zack Rusin 811aa02c7a st/xorg: fold back the helper function into core 2009-09-01 14:44:55 -04:00
Zack Rusin 91c366359c st/xorg: start rendering and compositing pictures 2009-09-01 14:44:55 -04:00
Keith Whitwell b3f4b56a3b tgsi: remove redundant CND0 opcode
Can be implemented with CMP src2, src1, src0
2009-09-01 17:30:01 +01:00
José Fonseca 836a9f0ae6 scons: Tool for LLVM. Gracefully disable llvmpipe if LLVM not found. 2009-09-01 12:26:00 +01:00
Jakob Bornecrantz 8c3f622a34 trace: Don't set surface_[fill|copy] if not set on pipe 2009-09-01 11:56:14 +02:00
Cooper Yuan 165e87c491 r300g: Fix clear issue on r300 2009-09-01 17:59:03 +08:00
Jakob Bornecrantz 935e4c56e5 i915g: Implement new winsys 2009-09-01 00:47:02 +01:00
Jakob Bornecrantz d2110064c2 i915g: Switch from pipe_winsys to intel_winsys
Also includes moving lots of functions from i915_batch.h
	into intel_batchbuffer.h
2009-09-01 00:47:02 +01:00
Jakob Bornecrantz dd040753d7 i915g: Add header file for new winsys interface 2009-09-01 00:47:01 +01:00
Jakob Bornecrantz 105e4b093e i915g: Add new buffer code not yet hocked up 2009-09-01 00:46:56 +01:00
Jakob Bornecrantz 7b32da0b11 st/xorg: Fix crash in MPH 2009-09-01 00:44:36 +01:00
Zack Rusin f315c0128b st/xorg: add code to render textured quads for composite acceleration 2009-08-31 13:26:01 -04:00
Zack Rusin 9ccbadb22d st/xorg: setup constant buffers for vertex and fragment shaders 2009-08-31 13:26:01 -04:00
Michel Dänzer 3c3ad915d8 st/xorg: Re-organize the EXA ModifyPixmapHeader hook a bit.
This should also handle the case where the pixmap is backed by a (different)
texture before and afterwards.
2009-08-31 18:41:54 +02:00
Michel Dänzer 40e3148a81 st/xorg: Simplify EXA ModifyPixmapHeader hook for pPixmap != NULL.
Just let the upper layers handle it.
2009-08-31 18:41:54 +02:00
Michel Dänzer 366efd8c4b st/xorg: Don't always fall back for solid fills. 2009-08-31 18:41:53 +02:00
Jakob Bornecrantz 5f7b46ae5f i915g: Reorg texture layout code 2009-08-31 16:29:59 +01:00
Jakob Bornecrantz 761c8c7076 i915g: Move transfer functions into i915_texture.c 2009-08-31 16:29:58 +01:00
Jakob Bornecrantz 5374aff56f i915g: Reorg texture code a bit 2009-08-31 16:29:58 +01:00
Jakob Bornecrantz f260652153 i915g: Don't use winsys directly in the driver 2009-08-31 16:29:58 +01:00
Jakob Bornecrantz bd0c51874f i915g: Cleanup i915_prim_vbuf.c 2009-08-31 16:29:58 +01:00
Jakob Bornecrantz 1bb3a2c648 i915g: Cleanup i915_screen.[c|h] 2009-08-31 16:29:58 +01:00
Jakob Bornecrantz 1b5f46a3b8 i915g: Cleanup i915_context.c 2009-08-31 16:29:58 +01:00
Jakob Bornecrantz 7864b0e717 i915g: Cleanup i915_blit.[c|h] 2009-08-31 16:29:58 +01:00
Jakob Bornecrantz 5d929366aa i915g: Cleanup i915_state_emit.c 2009-08-31 16:29:57 +01:00
Jakob Bornecrantz 00b0728094 i915g: Cleanup i915_texture.c 2009-08-31 16:29:57 +01:00
Jakob Bornecrantz 4224bda684 i915g: Cleanup texture init functions a bit 2009-08-31 16:29:57 +01:00
Jakob Bornecrantz e1741dbe45 i915g: Rename pipe field on context to base 2009-08-31 16:29:57 +01:00
Jakob Bornecrantz ad25d450ec i915g: Rename screen field on screen to base 2009-08-31 16:29:57 +01:00
José Fonseca 241c3a1d80 llvmpipe: Fallback to element-wise comparisons when no comparison intrinsic is available.
Although selection of vector elements is valid LLVM IR, no machine target
supports it yet.

This is a last-resort option, but it allows llvmpipe to be used on any
target supported by LLVM without modifications. Obviously better
performance is attainable by emitting SIMD intrinsics where otherwise
LLVM doesn't.
2009-08-31 10:22:36 +01:00
José Fonseca 45fb66ab7b llvmpipe: In the abcense of a min/max intrinsic, use the comparison intrinsics. 2009-08-31 10:00:38 +01:00
José Fonseca b995af25d0 llvmpipe: Actually commit lp_buffer.[ch].
Thanks Michel.
2009-08-31 09:34:04 +01:00
Michel Dänzer 9f0495aa76 Gallium xlib: Add support for BGRA visuals. 2009-08-31 10:22:19 +02:00
Ben Skeggs 1ea114958b nouveau: fix for dri state tracker changes 2009-08-31 13:39:45 +10:00
Ben Skeggs 02f3245448 nouveau: introduce nouveau_miptree common to all nouveau pipe drivers
The winsys once again has to know about textures it seems, so we need a
common representation between all our pipe drivers to store some
information the winsys will need.

Only the nv50 driver has been fixed so far.
2009-08-31 13:39:38 +10:00
Ben Skeggs 500b260494 nouveau: hack winsys to compile again, it's broken still however 2009-08-31 12:55:56 +10:00
Nicolai Hähnle d1b4351e60 r300: Remove all Mesa dependencies from the shader compiler
In particular, this removes the dependency on prog_instruction, which
unfortunately creates some code duplication, but also opens a path towards
adding some hardware-specific things in there.

Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-08-30 18:51:46 +02:00
Marc Dietrich a192da37ed cell: fix compilation 2009-08-30 09:24:27 -06:00
José Fonseca c28f253ac2 llvmpipe: Texture cache in 4 ubytes instead of 4 floats.
This is more a short term experiment than a long term commitment, as we'll
need to support higher precision textures too, as this will all be
be replaced by runtime generated code.

With this change most Mesa demos fps increased around 10%. Not a huge
improvement, but not a negligible one either.
2009-08-30 12:37:03 +01:00
José Fonseca 62b586fce4 llvmpipe: Use util_format_read_4f to read texture tiles. 2009-08-30 12:37:03 +01:00
José Fonseca ffe1b7bad8 llvmpipe: Texture cache is read-only. No need to flush. 2009-08-30 12:37:03 +01:00
José Fonseca 3d30524393 util: Auto generate pixel format accessor functions from
This has several advantages over the u_
 - not hand written
 - no intermediate memcpy of raw pixels
 - supports 4 ubytes in addition to floats
 - no need to pass a pipe_transfer

It also has (hopefully temporary) limitations:
 - no support for YUV
 - no support for SRGB
2009-08-30 12:37:03 +01:00
José Fonseca 379304a72c llvmpipe: Eliminate internal pipe_buffer_map/unmap usage. 2009-08-30 12:37:03 +01:00
José Fonseca d336ef410a xlib: Implement lp_winsys::destroy. 2009-08-30 12:37:03 +01:00
Michel Dänzer 9053bb0d40 Merge branch 'mesa_7_5_branch'
Conflicts:
	src/glx/x11/glxcmds.c
2009-08-30 13:06:18 +02:00
José Fonseca c9adb4c9cb llvmpipe: List lp_buffer.c in the Makefile. 2009-08-29 20:07:53 +01:00
José Fonseca 85a0a4b296 xlib: Implement llvmpipe lp_winsys interface. 2009-08-29 20:03:44 +01:00
José Fonseca e173a9bbd6 llvmpipe: Define an winsys for LLVM. Drop pipe_winsys
lp_winsys will eventually be unified with softpipe's eventually, but we
are free to move quicker since we don't have the myriad of users yet.

Will provide a pipe_winsys adaptor from Keith's softpipe-private-winsys
soon.
2009-08-29 20:03:44 +01:00
Christoph Bumiller 8313801911 nv50: set provoking vertex state 2009-08-29 17:22:12 +02:00
José Fonseca da1248bee5 xlib: Update llvmpipe integration for changes in master. 2009-08-29 09:21:42 +01:00
José Fonseca f04ce6276b llvmpipe: Update for changes in master. 2009-08-29 09:21:42 +01:00
José Fonseca fdb3e75f7e util: Add util_unsigned_logbase2.
Cherry picked from Keith's commit f911c3b989.
2009-08-29 09:21:42 +01:00
José Fonseca c40eddd294 llvmpipe: Isolate sampling from TGSI translation. 2009-08-29 09:21:42 +01:00
José Fonseca d4806c64a2 llvmpipe: Better structure dereference naming. 2009-08-29 09:21:42 +01:00
José Fonseca 8aa62cead7 llvmpipe: Fix shader variant key construction.
Fixes the blank screen on non-64bit mode.
2009-08-29 09:21:42 +01:00
José Fonseca 1e6cc1cf37 llvmpipe: Fix build. 2009-08-29 09:21:42 +01:00
José Fonseca f311bacebd llvmpipe: Merge all pixel format related files. 2009-08-29 09:21:42 +01:00
José Fonseca f85c5f8621 llvmpipe: Factor out and optimize the input interpolation.
Special attention is given to the interpolation of side by side quads.
Multiplications are made only for the first quad. Interpolation of
inputs for posterior quads are done exclusively with additions, and
perspective divide if necessary.
2009-08-29 09:21:41 +01:00
José Fonseca 03180dca7a llvmpipe: Pre-declare fetch_texel. 2009-08-29 09:21:41 +01:00
José Fonseca 635c37e118 llvmpipe: Pass the alpha ref value and blend color in the jit context. 2009-08-29 09:21:41 +01:00
José Fonseca c022e15d1e llvmpipe: Pass fragment context to generated function in a single structure. 2009-08-29 09:21:41 +01:00
José Fonseca 8c7c108d71 llvmpipe: Structure manipulation helpers. 2009-08-29 09:21:41 +01:00
José Fonseca 08dd41fd68 llvmpipe: Centralize the C <-> JIT interfaces in one place. 2009-08-29 09:21:41 +01:00
José Fonseca 97b4681d7e llvmpipe: Drop blend derived state.
Already included in the fragment shader.
2009-08-29 09:21:41 +01:00
Keith Whitwell 04de13b9cd llvmpipe: keep texture stride 16byte aligned
Fixes crash when resizing gears window.
2009-08-29 09:21:41 +01:00
José Fonseca 4d2b0eb19e llvmpipe: Squash the quad pipeline.
It had been reduced to one fixed stage.
2009-08-29 09:21:41 +01:00
José Fonseca 77b35dc179 llvmpipe: s/uni/scalar/.
More obvious name.
2009-08-29 09:21:40 +01:00
José Fonseca 5811ed87d7 llvmpipe: Add a bunch of comments.
Description/rationale/to-do items, while I still remember them...
2009-08-29 09:21:40 +01:00
José Fonseca 3f36f4b051 llvmpipe: Split off vs stuff from lp_state_fs.c.
lp_state_fs.c is already too big without it.
2009-08-29 09:21:40 +01:00
José Fonseca c3b7406667 llvmpipe: Avoid duplicate clamping when converting between types. 2009-08-29 09:21:40 +01:00
José Fonseca 9897180279 llvmpipe: Generate the fragment pipeline into a single function.
Still hackish. Will document and optimize later.
2009-08-29 09:21:40 +01:00
José Fonseca 64cc71167f llvmpipe: Get conversions working correctly for all integer types. 2009-08-29 09:21:39 +01:00
José Fonseca 53f9a1180e llvmpipe: Delete the quad polygon stipple stage.
Not used now -- stipple done by the draw module. May code generate later.
2009-08-29 09:21:39 +01:00
José Fonseca 3d7a88674f llvmpipe: Early depth testing. 2009-08-29 09:21:39 +01:00
José Fonseca 90b5df8d1b llvmpipe: Disassemble beyond referred code beyond the RET instruction. 2009-08-29 09:21:39 +01:00
José Fonseca c5531f575b llvmpipe: Split control flow function declarations and notes. 2009-08-29 09:21:39 +01:00
José Fonseca 1e4376a68f llvmpipe: Back port recent softpipe-opt improvements from Keith. 2009-08-29 09:21:39 +01:00
José Fonseca f10ee9a0a1 llvmpipe: Don't limit the number of tiles in the cache. 2009-08-29 09:21:39 +01:00
José Fonseca 87c383a2e5 llvmpipe: Clean dead tile cache code. 2009-08-29 09:21:39 +01:00
José Fonseca e3baeb3f14 llvmpipe: Simplify tile clears. Use pipe_fill_rect instead of scratch tile. 2009-08-29 09:21:38 +01:00
José Fonseca d94fbb4a48 llvmpipe: Start hiding llvmpipe_cached_tile. 2009-08-29 09:21:38 +01:00
José Fonseca 1cb9ce0d27 llvmpipe: Drop depth/stencil support from tile cache. 2009-08-29 09:21:38 +01:00
José Fonseca e3b38e5ec1 llvmpipe: Code generate the depth test, and include in the shader.
Only 32bit depth/stencil surfaces supported for now. Stencil ops not
implemented yet.
2009-08-29 09:21:38 +01:00
José Fonseca db35ac36d9 llvmpipe: Update texture block from format. 2009-08-29 09:21:38 +01:00
José Fonseca 343ccc8dd0 llvmpipe: Depth test to LLVM IR translation. 2009-08-29 09:21:38 +01:00
José Fonseca c0472f9c34 llvmpipe: Centralize mask update logic. 2009-08-29 09:21:37 +01:00
José Fonseca 3dbf00f9ab llvmpipe: Clamped float to unsigned norm via mantissa manipulation. 2009-08-29 09:21:37 +01:00
José Fonseca 33ce51bc0d llvmpipe: Several fixes of the conversion test. 2009-08-29 09:21:37 +01:00
José Fonseca d07b038366 llvmpipe: Generate instrinsics for integer comparisons.
It is a little messy, given the available instrucions form SIMD
integer comparisons is rather limited.
2009-08-29 09:21:37 +01:00
José Fonseca 89146cd48d llvmpipe: Mention the ability to get microbenchmarks from the unit tests.
Even better would be to have a -h/--help option to the tests...
2009-08-29 09:21:37 +01:00
José Fonseca 9ae47069b4 llvmpipe: Code generate alpha testing and append to generated fragment shader. 2009-08-29 09:21:37 +01:00
José Fonseca b5e397c369 util: Dump PIPE_FUNC_x value names. 2009-08-29 09:21:37 +01:00
Brian Paul 03b388e1c9 llvmpipe: frag shader comments 2009-08-29 09:21:36 +01:00
Brian Paul 0f6c621aee llvmpipe: blend comments 2009-08-29 09:21:36 +01:00
Brian Paul 8329e59958 llvmpipe: comments about blend generator 2009-08-29 09:21:36 +01:00
Brian Paul f586d9546b llvmpipe: basic comments 2009-08-29 09:21:36 +01:00
José Fonseca b9f2f01315 llvmpipe: Hack to force the line/point rasterization also fit the blend function expectations. 2009-08-29 09:21:35 +01:00
José Fonseca 7643da88a3 llvmpipe: Refer my udis86 branch which decodes more opcodes. 2009-08-29 09:21:35 +01:00
José Fonseca 7c2dc3faa8 llvmpipe: Code generate the position interpolation. 2009-08-29 09:21:35 +01:00
José Fonseca 6f5cd15f80 llvmpipe: Simpler variant of lp_build_broadcast_scalar. 2009-08-29 09:21:35 +01:00
José Fonseca 17baa01bfb llvmpipe: Put the position coefficients together with the inputs.
The automatic search'n'replace leaves lp_setup.c a bit ugly, but this code
will be eventually code generated as well.
2009-08-29 09:21:35 +01:00
José Fonseca 7926b42d41 llvmpipe: Implement saturation. 2009-08-29 09:21:35 +01:00
José Fonseca 39352b3443 llvmpipe: Put color/depth directly into the quad structure. 2009-08-29 09:21:35 +01:00
Brian Paul 908d8d7a1b llvmpipe: prefix point/line/tri_setup() functions with llvmpipe_
Avoid symbol collisions with softpipe.
2009-08-29 09:21:35 +01:00
Brian Paul 137afe6a55 llvmpipe: updated Makefile C_SOURCES 2009-08-29 09:21:34 +01:00
Brian Paul aa2514d12d llvmpipe: add missing break in xlib _init() 2009-08-29 09:21:34 +01:00
José Fonseca 556eecea67 llvmpipe: Allow to build without udis86. 2009-08-29 09:21:34 +01:00
José Fonseca 2fef9b3369 llvmpipe: Drop the FETCH/STORE macros. 2009-08-29 09:21:34 +01:00
José Fonseca 5999ebfb69 llvmpipe: Debug helper function to name llvm intermediate values. 2009-08-29 09:21:34 +01:00
Keith Whitwell a22f87c994 llvmpipe: use align_malloc for all structs containing ALIGN16 members
Unless the struct is allocated aligned, aligning the members isn't very
helpful.
2009-08-29 09:21:34 +01:00
José Fonseca 49d83fdc45 llvmpipe: Document that llvm 2.5 is expected. 2009-08-29 09:21:34 +01:00
José Fonseca 8df64bb2fe llvmpipe: Briefly describe current status. 2009-08-29 09:21:34 +01:00
José Fonseca bb867b0ae4 llvmpipe: Blend in place. 2009-08-29 09:21:34 +01:00
José Fonseca 4a414d8f87 llvmpipe: Code generate logic ops. 2009-08-29 09:21:34 +01:00
José Fonseca 3014919211 llvmpipe: Rasterize the quads according to what the blend function expects. 2009-08-29 09:21:34 +01:00
José Fonseca efab431684 llvmpipe: Tile in SoA format identical to the blender function output. 2009-08-29 09:21:34 +01:00
José Fonseca ee066eaf6d llvmpipe: Allow to dump the disassembly byte code.
Useful as dis86 doesn't disassemble some SSE4 opcodes yet.
2009-08-29 09:21:33 +01:00
José Fonseca c5abcac7ef llvmpipe: Implement LIT. 2009-08-29 09:21:33 +01:00
José Fonseca 09a7b011ac llvmpipe: Move lp_build_select to lp_bld_logic.[ch]. 2009-08-29 09:21:33 +01:00
José Fonseca 1aae039ee2 llvmpipe: Implement comparison opcodes. 2009-08-29 09:21:33 +01:00
José Fonseca aede39efd8 llvmpipe: Fix translation of KIL with repeated swizzles. 2009-08-29 09:21:33 +01:00
José Fonseca 81e7ec485d llvmpipe: Handle floating point selection. 2009-08-29 09:21:33 +01:00
José Fonseca 4d7a8194c5 llvmpipe: Silence compiler warnings. 2009-08-29 09:21:33 +01:00
José Fonseca 7821664b15 llvmpipe: Implement KIL. 2009-08-29 09:21:33 +01:00
José Fonseca 2c90652ed9 llvmpipe: More verbose error message when failed to translate opcodes. 2009-08-29 09:21:33 +01:00
José Fonseca 58f20b2b65 llvmpipe: Detect typos in LLVM intrinsics early. 2009-08-29 09:21:33 +01:00
José Fonseca 1aede69d3a llvmpipe: Comparisons translation. 2009-08-29 09:21:33 +01:00
José Fonseca 818d444e12 llvmpipe: Disassemble generated x86 code. 2009-08-29 09:21:32 +01:00
José Fonseca a7f9b915ae llvmpipe: Shader function arguments don't alias. 2009-08-29 09:21:32 +01:00
José Fonseca 539c55da16 llvmpipe: Test only present functionality to allow regression testing. 2009-08-29 09:21:32 +01:00
José Fonseca c67570ba85 llvmpipe: Clamp into range when writing integers. 2009-08-29 09:21:32 +01:00
José Fonseca 17aec9304c llvmpipe: Compute interpolation coeffs directly into SoA layout. 2009-08-29 09:21:32 +01:00
José Fonseca b6f43b445b llvmpipe: Pass the interpolation factors as scalars. 2009-08-29 09:21:32 +01:00
José Fonseca 1a004142bb llvmpipe: Eliminate dependency on tgsi_exec_machine. 2009-08-29 09:21:32 +01:00
José Fonseca 73af91e938 llvmpipe: Eliminate non-LLVM fs execution paths. 2009-08-29 09:21:32 +01:00
José Fonseca 95f38dd67c llvmpipe: Code generate interpolators. 2009-08-29 09:21:32 +01:00
José Fonseca af608e56ca llvmpipe: Factor out lp_build_select from lp_build_select_aos. 2009-08-29 09:21:31 +01:00
José Fonseca 57907e7fd9 llvmpipe: Translate approximate log2/exp2. 2009-08-29 09:21:31 +01:00
José Fonseca ef1fddb36a llvmpipe: Handle a few more TGSI opcodes. 2009-08-29 09:21:31 +01:00
José Fonseca 844f802a70 llvmpipe: Efficient implementations of pow/exp/log/exp2/log2 2009-08-29 09:21:31 +01:00
José Fonseca 90e9a4d4f9 llvmpipe: Migrate more SSE2 codegen to LLVM IR. 2009-08-29 09:21:31 +01:00
José Fonseca 1b3c83d699 llvmpipe: Don't assume/enforce fs values are in [0,1] range. 2009-08-29 09:21:30 +01:00
José Fonseca 1709ace359 llvmpipe: Implement more arithmetic functions. 2009-08-29 09:21:30 +01:00
José Fonseca 1929057eac llvmpipe: Reuse coord/texel store. 2009-08-29 09:21:30 +01:00
José Fonseca 0b6a9b2dbe llvmpipe: Replace lp_fs_llvm.c.
Based on lp_fs_exec.c/lp_fs_sse.c and tgsi_exec.c.
2009-08-29 09:21:30 +01:00
José Fonseca 63b07618b3 llvmpipe: TGSI -> LLVM SoA IR converstion.
Based on tgsi_sse2.c.
2009-08-29 09:21:30 +01:00
José Fonseca 9033c44a62 llvmpipe: Dump only the generated function. 2009-08-29 09:21:29 +01:00
José Fonseca 4393ca7956 llvmpipe: Scalar -> vector broadcasting. 2009-08-29 09:21:29 +01:00