Commit Graph

2428 Commits

Author SHA1 Message Date
Brian Paul b4a40d1052 softpipe: replace macros with inline functions
And update comments.
2009-09-23 11:51:52 -06:00
Brian Paul e2329f2795 softpipe: white-space/formatting fixes and updated comments 2009-09-23 11:35:33 -06:00
Brian Paul 5244ce786a llvmpipe: added max texture/surface size sanity check
Carried over from softpipe driver.
2009-09-23 11:05:00 -06:00
Brian Paul b26f1df920 llvmpipe: increase MAX_WIDTH/HEIGHT to match max texture size 2009-09-23 11:04:07 -06:00
Brian Paul de25f82067 Merge branch 'mesa_7_6_branch'
Conflicts:

	src/gallium/drivers/softpipe/sp_tile_cache.c
2009-09-23 11:00:04 -06:00
Brian Paul e41707beca softpipe: added max texture/surface size sanity check 2009-09-23 10:50:38 -06:00
Brian Paul 84b956c29b softpipe: increase MAX_WIDTH/HEIGTH 4096 to match max texture size 2009-09-23 10:46:27 -06:00
Keith Whitwell 890679d432 Merge branch 'softpipe-opt'
Conflicts:
	progs/demos/cubemap.c
	src/gallium/drivers/softpipe/sp_tex_sample.c
	src/gallium/drivers/softpipe/sp_texture.c
2009-09-23 17:37:28 +01:00
José Fonseca 21a949365d gallium: Update vendor string. 2009-09-23 10:32:50 +01:00
root 75276ea316 softpipe: fix bugs in POT texture sampling when texture is not square
Before, if level was greater than the logbase2(base size) we were
doing a negative bit shift and winding up with garbage values.
2009-09-22 20:14:10 -06:00
Brian Paul 5dbedf3d7e softpipe: additional assertions 2009-09-22 16:59:28 -06:00
Brian Paul 0670df5cb2 softpipe: disable a _debug_printf() 2009-09-22 16:42:15 -06:00
Keith Whitwell fe9ca0f718 softpipe: need to write depth/stencil values even when stencil fails 2009-09-22 20:47:37 +01:00
Keith Whitwell 207764894b softpipe: set quad->facing value 2009-09-22 20:47:07 +01:00
Keith Whitwell b1139e9ad8 softpipe: fix polygon stipple 2009-09-22 19:38:34 +01:00
Keith Whitwell b626176f06 softpipe: fix occlusion counting 2009-09-22 19:26:08 +01:00
Jakob Bornecrantz e369294f76 i915g: Do propper references of surfaces in context 2009-09-22 11:06:56 -07:00
Brian Paul 6559eaef59 Merge branch 'mesa_7_5_branch' into mesa_7_6_branch 2009-09-21 14:49:46 -06:00
Nicolai Hähnle 9ca94f91a3 r300g: Fix bad formatting parameters in calls to debug_printf
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-09-21 17:41:54 +02:00
Brian Paul 5a0b29050f softpipe: Fix cube face selection.
If arx and ary are equal, we still want to choose from one of them,
and not arz.

(cherry picked from commit de685b37a9)
2009-09-21 08:36:05 -06:00
Nicolai Hähnle 81c7561d9d Merge branch 'master' into r300-compiler
There were additional non-textual conflicts.

Conflicts:
	src/gallium/drivers/r300/r300_tgsi_to_rc.c
	src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c
	src/mesa/drivers/dri/r300/compiler/radeon_program.c
	src/mesa/drivers/dri/r300/compiler/radeon_program_alu.c
2009-09-21 13:26:50 +02:00
José Fonseca 911a7a82cd llvmpipe: Fix lp_get_cached_tile.
Align coordinates to tile boundaries.
2009-09-20 18:09:34 +01:00
José Fonseca 76c2e34b22 llvmpipe: Update tile status on flush. 2009-09-20 18:09:34 +01:00
Michal Krol 18d0f9a7a3 llvmpipe: Respect input interpolators for the shader.
Cherry-picked from fb2c7b6743
2009-09-19 14:57:24 +01:00
Michal Krol de685b37a9 softpipe: Fix cube face selection.
If arx and ary are equal, we still want to choose from one of them,
and not arz.
2009-09-18 14:36:59 +01:00
Michal Krol fb2c7b6743 softpipe: Respect input interpolators for the shader. 2009-09-17 16:06:11 +01:00
José Fonseca f911d196cf llvmpipe: Don't assert due to unsupported texture wrap modes.
Issue a warning and fallback to clamping.
2009-09-16 20:42:09 +01:00
José Fonseca c29905aa31 gallium: Deprecate PIPE_CAP_S3TC.
No longer used. S3TC support is queried via
pipe_screen::is_format_supported.
2009-09-16 14:33:52 +01:00
Michal Krol ec48396e0f softpipe: Do not advertise Z32_UNORM as a supported format. 2009-09-16 13:56:58 +01:00
José Fonseca 459ea0095c llvmpipe: Make the code portable for MinGW. 2009-09-16 11:35:23 +01:00
Maarten Maathuis 26860a6e2f nv50: avoid excessive FIRE_RING
- And reduce RING_SPACE to 2, instead of 3.
2009-09-15 18:59:53 +02:00
Maarten Maathuis db37279e0b nv50: use flush_notify to reduce number of relocs 2009-09-15 18:59:53 +02:00
Brian Paul 41bbc83951 Merge branch 'mesa_7_6_branch' 2009-09-15 09:47:35 -06: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
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
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 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
Cooper Yuan bffa18624d r300g: delete unused flag due to commit: 09b566e161 2009-09-13 07:10:34 -04: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 afcaa45a94 softpipe: reformatting, clean-ups, comments 2009-09-10 16:42:47 -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
Brian Paul 4b1cbfcbe6 Merge branch 'mesa_7_5_branch' into mesa_7_6_branch 2009-09-10 15:40:26 -06: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
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 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
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 d585616f5b i915g: Keep vertex buffers in a fifo 2009-09-09 00:43:35 +01: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 8be72bb764 llvmpipe: Further abstract the texture sampling generation from TGSI translation. 2009-09-07 15:02:06 +01: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
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
Jakob Bornecrantz 87a4fa56ae i915g: Don't send flush flags to HW 2009-09-03 19:33:07 +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
Ben Skeggs a82cd55a5c nv50: SWZ is the same as MOV from our perspective 2009-09-02 12:05:34 +10: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 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 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
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
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 379304a72c llvmpipe: Eliminate internal pipe_buffer_map/unmap usage. 2009-08-30 12:37:03 +01:00
José Fonseca c9adb4c9cb llvmpipe: List lp_buffer.c in the Makefile. 2009-08-29 20:07:53 +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 f04ce6276b llvmpipe: Update for changes in master. 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
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
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
José Fonseca 8422f293ab llvmpipe: More arithmetic ops.
Mostly untested.
2009-08-29 09:21:29 +01:00
José Fonseca 36249348ed llvmpipe: More intrinsic helpers. 2009-08-29 09:21:29 +01:00
José Fonseca 50d77141e8 llvmpipe: Fix typo. 2009-08-29 09:21:29 +01:00
José Fonseca 19b31d0ac8 llvmpipe: Document the typo in llvm-c/Core.h. 2009-08-29 09:21:28 +01:00
José Fonseca 9285f159e0 llvmpipe: Simple description/instructions. 2009-08-29 09:21:28 +01:00
José Fonseca 8edcc8abe3 llvmpipe: Add missing include. 2009-08-29 09:21:27 +01:00
José Fonseca 2101c2941c llvmpipe: Tiles in rgba8 format. 2009-08-29 09:21:27 +01:00
José Fonseca 3ce1abf950 llvmpipe: Store tile color in SoA. 2009-08-29 09:21:27 +01:00
José Fonseca 29d94a9cbb llvmpipe: Code generate color masking. 2009-08-29 09:21:27 +01:00
José Fonseca 2d6b39f05e llvmpipe: Use the generated SoA blending code. 2009-08-29 09:21:27 +01:00
José Fonseca e7fc21434d llvmpipe: Handle disabled blending too. 2009-08-29 09:21:27 +01:00
José Fonseca 0318f3e53e llvmpipe: Split the texture cache from the color/depth/stencil cache. 2009-08-29 09:21:27 +01:00
José Fonseca 2529ed5616 llvmpipe: SoA blending.
Throughput seems to be 4x higher.
2009-08-29 09:21:27 +01:00