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
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
81644f6315
util: Fix SCons build.
2009-08-29 09:21:28 +01:00
José Fonseca
19b31d0ac8
llvmpipe: Document the typo in llvm-c/Core.h.
2009-08-29 09:21:28 +01:00
José Fonseca
fb56786f60
util: Auto-generate u_format_table.c from SConscript.
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
62c91998ef
xlib: Ensure one screen instance.
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
b836b2593c
xlib: Complete llvmpipe integration.
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
José Fonseca
20f50b845b
util: Fix blend factor dumping.
2009-08-29 09:21:26 +01:00
José Fonseca
3130b9921c
llvmpipe: Update blending test.
2009-08-29 09:21:26 +01:00
José Fonseca
60584affcf
llvmpipe: Handle more conversions.
...
Not all successfully yet though..
2009-08-29 09:21:26 +01:00
José Fonseca
145de19548
llvmpipe: Use full set of sse4 min/max intrinsics.
2009-08-29 09:21:26 +01:00
José Fonseca
a9771d2b75
llvmpipe: Fix one const generation for some signed integers.
2009-08-29 09:21:26 +01:00
José Fonseca
8244d6e5ad
llvmpipe: Allow floating types without sign.
...
With the meaning that all values are assumed to be positive.
2009-08-29 09:21:26 +01:00
José Fonseca
9493260fdc
llvmpipe: Centralize lp_build_context initialization.
2009-08-29 09:21:25 +01:00
José Fonseca
b07d19a885
llvmpipe: Normalize the cycles with the number of channel.
...
So that we have a comparable number for different formats.
2009-08-29 09:21:25 +01:00
José Fonseca
b874a7b807
llvmpipe: Handle ubyte -> float conversion too.
2009-08-29 09:21:25 +01:00
José Fonseca
b441a0b658
llvmpipe: Make lp_const_offset visible.
2009-08-29 09:21:24 +01:00
José Fonseca
684a47f0f6
llvmpipe: Only get the preprocessor flags from llvm-config.
...
Otherwise we get -O2 optimization flag, preventing proper debugging.
2009-08-29 09:21:24 +01:00
José Fonseca
8988424ee8
llvmpipe: Bootstrap type conversions.
2009-08-29 09:21:24 +01:00
José Fonseca
b19cb0080c
llvmpipe: Use same type for reference vectors.
2009-08-29 09:21:24 +01:00
José Fonseca
d52dce0ffb
llvmpipe: Fix floating point const scale factor.
2009-08-29 09:21:24 +01:00
José Fonseca
e6ebebc485
llvmpipe: Factor out shared test code into a separate module.
2009-08-29 09:21:24 +01:00
José Fonseca
138428bade
llvmpipe: Cleanup constant helpers.
2009-08-29 09:21:23 +01:00
José Fonseca
627d6a6b04
llvmpipe: Move intrinsic helpers to a separate module.
2009-08-29 09:21:23 +01:00
José Fonseca
1165c30dc2
llvmpipe: Collect richer blend data.
2009-08-29 09:21:23 +01:00
José Fonseca
28e46458bc
llvmpipe: Some notes about PSHUF.
2009-08-29 09:21:23 +01:00
José Fonseca
1dd7bb17c7
llvmpipe: Optimize blend swizzles by using bitmasks instead of shuffles for ubytes.
2009-08-29 09:21:23 +01:00
José Fonseca
a77084ea4b
llvmpipe: Write data to a tsv file for posterior analysis.
2009-08-29 09:21:23 +01:00
José Fonseca
f081bacc25
llvmpipe: Move p_build_context to lp_bld_type.h
...
As it will be shared with more modules.
2009-08-29 09:21:23 +01:00
José Fonseca
696f7f2be5
util: New file dedicated to dump state in human/machine readable format.
2009-08-29 09:21:23 +01:00
José Fonseca
5940ba26f7
llvmpipe: Don't use llvm.readcyclecounter.
...
LLVM during optimization reorders the rdtsc instructions next to each
other, which makes it pretty useless.
2009-08-29 09:21:22 +01:00
José Fonseca
64611e086d
llvmpipe: Separate constant building.
2009-08-29 09:21:22 +01:00
José Fonseca
c87fab0008
llvmpipe: Move type support functions into a separate file.
2009-08-29 09:21:22 +01:00
José Fonseca
b94e22e4be
llvmpipe: Measure the number of cycles taken for blending.
2009-08-29 09:21:22 +01:00
José Fonseca
5778970f15
llvmpipe: Minor comments / debug mnemonics.
2009-08-29 09:21:22 +01:00
José Fonseca
02eaa32d83
llvmpipe: Optimize away min/max with equal operands.
2009-08-29 09:21:22 +01:00
José Fonseca
9e92244440
llvmpipe: Improve generated 8bit blending code.
2009-08-29 09:21:22 +01:00
José Fonseca
ede73258a7
llvmpipe: Get blending of normalized 8bit unsigned integers working.
2009-08-29 09:21:22 +01:00
José Fonseca
a6622e6c54
llvmpipe: Specialize arithmetic operations.
2009-08-29 09:21:22 +01:00
José Fonseca
272dadbe4e
llvmpipe: Introduce a custom typing system.
...
Straightforward representation of floating-point/fixed-point/integer,
normalized/scaled, signed/unsigned SIMD vector types.
2009-08-29 09:21:22 +01:00
José Fonseca
f478b6fe76
llvmpipe: Avoid C99-isms.
2009-08-29 09:21:21 +01:00
José Fonseca
fe90e46dc9
llvmpipe: Factor out intrisic calling code into a reusable function.
2009-08-29 09:21:21 +01:00
José Fonseca
7ace0b1f4a
llvmpipe: Cleanup test programs.
2009-08-29 09:21:21 +01:00
José Fonseca
7d043162c5
llvmpipe: Blending.
...
The code
2009-08-29 09:21:21 +01:00
José Fonseca
d2cf3e8dfd
llvmpipe: Arithmetic helpers.
2009-08-29 09:21:21 +01:00
Keith Whitwell
fa3514a57e
llvmpipe: fastpath for interpolated z16 less depthtesting
...
Because this is interpolated (ie. early) depth, we can build in an
assumption about the quads emitted by triangle setup, ie that they
are actually linear spans. Interpolate z over those spans in z16
format to save on math & conversion.
2009-08-29 09:21:21 +01:00
Keith Whitwell
38a1479fe1
llvmpipe: cope with nr_cbufs == 0
...
Disable blend code when no color buffer
2009-08-29 09:21:21 +01:00
José Fonseca
4639f8aad5
llvmpipe: Translate logicops.
2009-08-29 09:21:21 +01:00
José Fonseca
833323b8d0
llvmpipe: Separate pixel packing/unpacking from loading/storing.
2009-08-29 09:21:21 +01:00
José Fonseca
c4903ee27f
xlib: Integrate with llvmpipe.
...
Actually, the makefile/sconscript changes were already commit by mistake.
2009-08-29 09:21:21 +01:00
José Fonseca
b060771612
llvmpipe: Adjust for pixel layout changes.
2009-08-29 09:21:20 +01:00
José Fonseca
42b15b26fd
util: Make pixel format layout more meaningful.
...
Namelly, explicitly distinguish formats coded by arithmetic manipulation,
from formats layed out in array.
2009-08-29 09:21:20 +01:00
José Fonseca
a910c7d820
util: Don't commit u_format_table.c
...
At least not until stabilizes, to reduce noise.
2009-08-29 09:21:20 +01:00
José Fonseca
9a519ec4d1
llvmpipe: Fix typo in copyright.
2009-08-29 09:21:20 +01:00
José Fonseca
3ef44746fe
llvmpipe: Add test cases for pixels.
...
Actually some of this test cases need more testing...
2009-08-29 09:21:20 +01:00
José Fonseca
899bee2788
util: Fix r5g6b5 description.
2009-08-29 09:21:19 +01:00
José Fonseca
3ace63c00f
llvmpipe: Update SConscript.
2009-08-29 09:21:19 +01:00
José Fonseca
b023c1dc68
llvmpipe: Simple shell script to aid port softpipe changes to llvmpipe.
2009-08-29 09:21:19 +01:00
Keith Whitwell
05bfd93c3f
llvmpipe: move all depth/stencil/alpha pixel processing into one stage
2009-08-29 09:21:19 +01:00
Keith Whitwell
b8c437f20f
llvmpipe: fix error in scissor state dependencies
2009-08-29 09:21:18 +01:00
Keith Whitwell
c5375da1dc
llvmpipe: cleanup framebuffer state routine slightly
2009-08-29 09:21:18 +01:00
Keith Whitwell
90caf1a3f3
llvmpipe: move all color-combine code into lp_quad_blend.c
...
Consolidate the read-modify-write color combining code from
the blend, colormask and output stages.
2009-08-29 09:21:18 +01:00
Keith Whitwell
54c6ef144f
llvmpipe: fix typo
2009-08-29 09:21:18 +01:00
Keith Whitwell
3c71a19016
llvmpipe: example fastpaths in blending
2009-08-29 09:21:18 +01:00
Keith Whitwell
80eb276630
llvmpipe: actually pass >1 quad from triangle routine
...
First attempt
2009-08-29 09:21:18 +01:00
Keith Whitwell
bdbb4beb21
llvmpipe: expand quad pipeline to process >1 quad at a time
...
This is part one -- we still only pass a single quad down, but
the code can now cope with more. The quads must all be from the same
tile.
2009-08-29 09:21:18 +01:00
Keith Whitwell
4486012245
llvmpipe: rip out old mulithread support
2009-08-29 09:21:18 +01:00
Keith Whitwell
2a7c39a211
llvmpipe: avoid flushing depth buffer cache on swapbuffers
...
There's no need to push out depth buffer contents on swapbuffers.
Note that this change doesn't throw away depth buffer changes, it simply
holds them in the cache over calls to swapbuffers. The hope is
that swapbuffers will be followed by a clear() which means in that case
we won't have to write the changes out.
2009-08-29 09:21:17 +01:00
Keith Whitwell
3adca96114
llvmpipe: also shortcircuit non-texture tile lookups
2009-08-29 09:21:17 +01:00
Keith Whitwell
2301314e7c
llvmpipe: shortcircuit repeated lookups of the same tile
...
The lp_tile_cache is often called repeatedly to look up the same
tile. Add a cache (to the cache) of the single tile most recently
retreived and make a quick inline check to see if this matches the
subsequent request.
Add a tile_address bitfield struct to make this check easier.
2009-08-29 09:21:17 +01:00
Keith Whitwell
df1823ec5b
llvmpipe: remove unused vars in lp_setup.c
2009-08-29 09:21:17 +01:00
Keith Whitwell
08811032c2
llvmpipe: use bitwise logic to setup quad masks in lp_setup
2009-08-29 09:21:17 +01:00
Keith Whitwell
0aa24fa36f
llvmpipe: simplify flush_spans
...
No loss of performance, but simpler code.
2009-08-29 09:21:17 +01:00
Keith Whitwell
0f55a95b2f
llvmpipe: make some small steps to flush texture cache less frequently
...
No performance gain yet, but the code is a bit cleaner.
2009-08-29 09:21:16 +01:00
Keith Whitwell
3121484a8b
llvmpipe: remove backwards dependency from tilecache to llvmpipe
...
The tile cache is a utility, it shouldn't know anything about the
entity which is making use of it (ie llvmpipe).
Remove llvmpipe parameter to all the tilecache function calls, and
also remove the need to keep a llvmpipe pointer in the sampler structs.
2009-08-29 09:21:16 +01:00
José Fonseca
c9a5930fe4
llvmpipe: Rename preprocessor symbols too.
2009-08-29 09:21:16 +01:00
José Fonseca
8783732c4d
llvmpipe: Pixel packing/unpacking and loop code generators.
...
Just a small proof of concept plus a standalone test app. Not integrated
with the rest of the driver yet.
2009-08-29 09:21:16 +01:00
José Fonseca
15422b2d99
util: Pixel format database.
...
There are some inconsistencies in pipe_format, but above all, there
simply aren't enough bits in an enum to conveniently store all
information about a pixel format we need to be able to dynamically
generate pixel packing/unpacking code.
2009-08-29 09:21:15 +01:00
José Fonseca
946f432a08
llvmpipe: Fork softpipe for experimentation with llvm.
2009-08-29 09:21:15 +01:00
Jakob Bornecrantz
55e7abf81f
i915g: Add cursor case for scanout layout
2009-08-28 22:41:53 +01:00
Jakob Bornecrantz
644060c025
i915g: Don't forget to init buffer ptrs
2009-08-28 22:41:52 +01:00
Zack Rusin
aaedd035ca
st/xorg: disable composite accelration for now
2009-08-28 16:19:53 -04:00
Zack Rusin
0a26811286
st/xorg: bind samplers before composition
2009-08-28 15:43:46 -04:00
Zack Rusin
f1c0a4b2f4
st/xorg: normalize coords for the src operands in the vertex shader
2009-08-28 15:36:33 -04:00
Joakim Sindholt
dbe58d7f9f
r300g: pretty up the new drm code a bit
...
As it turns out, I made some boners. This corrects them (I hope)
2009-08-28 20:05:52 +02:00
Jakob Bornecrantz
1e9eb69f83
st/xorg: If migrating from a sw pixmap to a hw pixmap upload old contents
2009-08-28 17:10:58 +02:00
Jakob Bornecrantz
d80242c254
st/xorg: Null devPrivate.ptr when unmapping
2009-08-28 17:10:57 +02:00
Michel Dänzer
fdc8ec60eb
st/xorg: Fix scons build.
2009-08-28 17:42:07 +02:00
Joakim Sindholt
6bfec14d6d
r300g: support new drm_api
2009-08-28 17:23:11 +02:00
Jakob Bornecrantz
1e5014f7df
drm_api: Operate on textures instead of buffers
...
Most use cases just got the buffer from the texture
and then called into one of the get_handle functions.
Also with this patch it would be easier to move to a
generic function for getting handles from textures
and textures from handles, that is exposed via the screen.
2009-08-28 13:38:23 +01:00
José Fonseca
9399b9a0e2
util: Reset size to zero when failed to allocate buffer.
2009-08-28 12:52:31 +01:00
Jakob Bornecrantz
7d9af52bc5
st/xorg: Fix some warnings
2009-08-28 12:46:24 +02:00
Jakob Bornecrantz
b26aee0ffe
st/dri: Fix some warnings
2009-08-28 12:46:17 +02:00
Jakob Bornecrantz
6f0a1a8426
st/xorg: Pass dri driver name as driverName on screen
2009-08-28 12:36:42 +02:00
Jakob Bornecrantz
205d344e2a
Revert "st/xorg/dri: Pass texture formats via the DRI2 protocol flags."
...
This reverts commit a33e9ea3b9
.
As this change breaks both radeon and nouveau
2009-08-28 12:35:42 +02:00
Zack Rusin
8bdce0c3a7
st/xorg: set vertex and fragment shader for the current op
2009-08-27 18:17:54 -04:00
Zack Rusin
c7e103d238
st/xorg: bind rasterizer state
2009-08-27 18:08:58 -04:00
Zack Rusin
2048182e86
st/xorg: set blend state for exa
2009-08-27 18:06:15 -04:00
Zack Rusin
f9a3fce090
st/xorg: bind framebuffer and viewport for exa
2009-08-27 17:39:45 -04:00
Zack Rusin
3f15ea866f
st/xorg: create and destroy shader cache
2009-08-27 17:39:45 -04:00
Michel Dänzer
416ee3c53e
st/xorg: Set shared usage of pixmaps for use via DRI2.
...
Also allow pixmaps to have both the shared and displayed usage flags, as is
the case for the screen pixmap now.
2009-08-27 20:29:32 +02:00
Michel Dänzer
bfbfcdd703
st/dri: Make sure the front left renderbuffer is there for texture-from-pixmap.
2009-08-27 20:27:28 +02:00
Michel Dänzer
d73d4cfcf1
st/xorg: Don't hardcode ExaPrepareCopy to fall back to software.
2009-08-27 20:27:28 +02:00
Michel Dänzer
05aa56a827
st/xorg: Flush context if necessary in ExaPrepareAccess.
2009-08-27 20:27:28 +02:00
Michel Dänzer
f3a540f6d7
st/dri: Only ask for fake front buffer for single buffer visuals by default.
2009-08-27 20:17:53 +02:00
Michel Dänzer
a33e9ea3b9
st/xorg/dri: Pass texture formats via the DRI2 protocol flags.
...
No need to guess.
2009-08-27 20:17:53 +02:00
Brian Paul
44e86dde6d
Merge branch 'mesa_7_5_branch'
2009-08-27 09:14:09 -06:00
Brian Paul
32f95f8c17
gallium/util: added support for SRGB formats
...
Fixes glean/texture_srgb failure, bug #23449 .
2009-08-27 09:10:38 -06:00
Brian Paul
f8ae968d28
gallium/util: added cases for SRGB formats
2009-08-27 09:09:56 -06:00
Cooper Yuan
ba87cbf2be
r300g: Correct scissor setting, subtract 1 from window's width and height
2009-08-27 17:46:59 +08:00
Younes Manton
7d3b8231e1
nv04: Handle more Z formats.
...
Based on the patch from Luo Jinghua.
2009-08-26 20:07:51 -04:00
Chia-I Wu
c06699dd12
egl_softpipe: Make winsys and pipe screen per display.
...
This is to allow a driver to drive multiple displays. Remove the use of
_EGL_PLATFORM_X along the way.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-26 16:40:22 -06:00
Chia-I Wu
49f245ea6b
EGL_i915: Make struct drm_device per display.
...
This is to allow a driver to drive multiple displays.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-26 16:40:22 -06:00
Zack Rusin
a0966c41a9
st/xorg: create basic vertex shader
2009-08-26 12:50:47 -04:00
Zack Rusin
b324aacf13
st/xorg: create basic fragment shader
2009-08-26 12:50:47 -04:00
Jakob Bornecrantz
53b3cdaee2
st/dri: Add some debug code
2009-08-26 14:30:54 +02:00
Jakob Bornecrantz
57230d96ed
st/xorg: Temporary fix for none stencil visuals
...
Should be replaced with something looking at the proper
glx visual for the buffers.
2009-08-26 14:27:50 +02:00
Jakob Bornecrantz
23fe960be0
st/xorg: Find out correct type for depth stencil buffers
2009-08-26 13:45:31 +02:00
Jakob Bornecrantz
aab0bedb8c
st/dri: Redo config generation
2009-08-26 12:29:28 +02:00
Michel Dänzer
b2e1b25881
st/xorg: Add support for dirty framebuffer region reporting.
...
Add a BlockHandler which flushes the context and reports the dirty region
gathered using the X server damage layer.
In the interim, with dirty region reporting only allocate textures for the
framebuffer and shared pixmaps (e.g. DRI2 buffers) and fall back to software
for other pixmaps. This will be improved in the future.
2009-08-26 13:18:37 +02:00
Ben Skeggs
1664bc1a37
st/dri: make the GL_ARB_map_buffer_range entrypoints available
2009-08-26 16:18:39 +10:00
Zack Rusin
7bc4744026
xorg: insert shaders into the cache
2009-08-25 14:22:26 -04:00
Zack Rusin
23b59d3b40
exa: add basic code to cache vertex and fragment shaders
2009-08-25 14:01:58 -04:00
Zack Rusin
c7653a8333
exa: check whether the op is accelerated
2009-08-25 13:23:08 -04:00
Zack Rusin
65f9d10342
xorg: revert bad merge
2009-08-25 09:58:51 -04:00
Michel Dänzer
d22bd1421c
Add support for building the Xorg state tracker with scons.
...
scons ... statetrackers=xorg
2009-08-25 15:39:05 +02:00
Zack Rusin
ffe8cc6cef
xorg: fix compilation
2009-08-24 18:42:16 -04:00
Zack Rusin
17076d700c
xorg: start on code accelerating render
2009-08-24 18:39:01 -04:00
Zack Rusin
cd5c7bfd93
Merge branch 'master' of ssh://zack@git.freedesktop.org/git/mesa/mesa
2009-08-24 16:39:25 -04:00
Zack Rusin
534c133022
openvg: fix vgTransformPath with relative coords
2009-08-24 16:38:43 -04:00
Brian Paul
69170a4aae
xlib: fix single buffer window resize bug
...
When a single-buffered window was resized the new window size was never
detected. This fix that, but there's still a bug which causes window
contents corruption for certain window sizes...
2009-08-24 13:05:20 -06:00
Brian Paul
b5ecbbe636
xlib: fix single buffer window resize bug
...
When a single-buffered window was resized the new window size was never
detected. This fix that, but there's still a bug which causes window
contents corruption for certain window sizes...
2009-08-24 12:58:49 -06:00
Cooper Yuan
a88678d3ee
tgsi: Fix build error due to commit acc7da90
2009-08-24 19:50:38 +08:00
José Fonseca
02c523dfbb
tgsi: Only free temp uregs.
...
Shorthand.
(cherry picked from commit de911220bbbe74cff0c79b260456ff36122b7b5b)
2009-08-24 12:11:24 +01:00
José Fonseca
acc7da9035
tgsi: Pass pipe_context as a parameter to ureg_create_shader.
...
Simplifies migration to tgsi_ureg.
(cherry picked from commit f574398c07c41cb8d31249a7186fc178ef7d552a)
2009-08-24 12:11:22 +01:00
Keith Whitwell
b570a7e6b6
tgsi: add generic instruction builder
...
When translating an incoming shader (rather than building one from scratch)
it's preferable to be able to call a single, generic instruction emitter
rather than figuring out which of the opcode-specific functions to call.
2009-08-24 11:33:38 +01:00
Keith Whitwell
fd19e8adcd
softpipe: use one fewer divide in sample_cube
...
GCC won't do this for us. Makes a bigger difference to cubemap fps
than previous set of compilcated rearrangements.
2009-08-24 08:26:33 +01:00
Keith Whitwell
60adc15ba5
softpipe: separate out 2d and cube img filter functions
2009-08-24 08:26:32 +01:00
Keith Whitwell
81601d85ef
softpipe: make the various get_texel routines more similar
...
Remove arguments, return const float * by default. Add specialized 3d
versions and remove 3d texture support from the others.
2009-08-24 08:26:17 +01:00
Cooper Yuan
7ee4f32dcd
r300g: Set the vector address in the input memory for bypass_vs_clip_and_viewport case
2009-08-24 13:56:23 +08:00
Keith Whitwell
153e474d22
softpipe: lift tex_address construction up to img_filter
...
For fastpaths at least, can avoid recalculating this sometimes.
2009-08-23 13:38:10 +01:00
Keith Whitwell
4fe0fc3eba
softpipe: remove old prim_setup draw stage
...
Everything now goes through the draw_vbuf handler, the same as
regular drivers.
2009-08-23 11:22:41 +01:00
Keith Whitwell
47800c572f
softpipe: add missing header
2009-08-23 11:13:20 +01:00
Keith Whitwell
7670102468
Merge branch 'tex-tilecache' into softpipe-opt
...
Conflicts:
src/gallium/drivers/softpipe/sp_state_derived.c
src/gallium/drivers/softpipe/sp_state_sampler.c
src/gallium/drivers/softpipe/sp_tex_sample.c
src/gallium/drivers/softpipe/sp_tex_sample.h
src/gallium/drivers/softpipe/sp_tile_cache.c
2009-08-23 10:23:46 +01:00
Jakob Bornecrantz
54fb71b863
st/dri: Remove some debug prints
2009-08-22 02:16:02 +01:00
Jakob Bornecrantz
a3e59b9d06
st/dri: Find out if the drawable is a pixmap
...
Part of this code is disabled since no performance gains
where detected with it enabled.
This code only detects if it is a pixmap that it is
rendering to on the st/xorg DDX since it sets the fake
front to the same handle as front.
2009-08-22 02:16:02 +01:00
Jakob Bornecrantz
6237ac2412
st/dri: Fix frontbuffer rendering with DRI2
2009-08-22 02:16:01 +01:00
Jakob Bornecrantz
29165a2fcc
st/xorg: Handle fake fronts correctly for pixmaps
2009-08-22 02:10:18 +01:00
Jakob Bornecrantz
a469b4c459
i915g: Remove bad assert on fence
2009-08-22 02:09:59 +01:00
Brian Paul
0f24886f92
softpipe: remove duplicate #include, move another
2009-08-21 14:07:37 -06:00
Brian Paul
d204659c8c
softpipe: remove tex sample dependencies on softpipe
...
The texture sampling code doesn't really have any dependencies on the
rest of softpipe, just the tile cache.
2009-08-21 14:04:51 -06:00
Brian Paul
3adc8c3779
softpipe: minor code refactoring to remove softpipe/tile cache dependencies
...
The tile cache code now has no hard dependencies on softpipe.
2009-08-21 14:01:58 -06:00
Brian Paul
4256c5829f
softpipe: remove unused #includes, white-space clean-up
2009-08-21 13:47:50 -06:00
Brian Paul
46fbc87288
softpipe: remove unneeded const qualifier
2009-08-21 13:45:16 -06:00
Brian Paul
a29447c33d
softpipe: per-unit sampler varients
...
Can't share sampler varients across multiple tex units because the texture
pointer is in the sampler varient. That prevents different textures per unit.
Fixes progs/demos/multiarb, progs/glsl/samplers, etc.
2009-08-21 12:44:04 -06:00
Brian Paul
87ec83afd5
softpipe: add missing PIPE_TEXTURE_CUBE case in get_lambda_func()
...
Fixes progs/demos/cubemap
2009-08-21 11:47:31 -06:00
Keith Whitwell
ecfa8be150
softpipe: add missing sp_sampler_varient_destroy
2009-08-21 18:44:56 +01:00
Brian Paul
cf102b031e
softpipe: remove redundant comparison, make test easier to understand
2009-08-21 11:43:48 -06:00
Brian Paul
41483627f0
softpipe: fix min/mag filter typo
2009-08-21 11:41:29 -06:00
Brian Paul
4e5c385d21
softpipe: fix s/t/p typos
2009-08-21 11:40:33 -06:00
Keith Whitwell
4fc7d0345a
softpipe: rework texture sampling code
...
Split into component pieces, stitch together at runtime using function
pointers. Make it possible to utilize the existing fastpaths as image-level
filters for generic mip-filtering routines.
Remove special case for rectangle filtering, as it can now be handled by
the 2d path.
As most of the mesa demo texturing was already covered by fast paths, its
harder to find examples of speedups, but tunnel gets a boost as mip-nearest
filtering is now able to access the img_2d_linear_wrap_POT functions
for sampling within a mipmap level.
2009-08-21 18:14:19 +01:00
Keith Whitwell
b1cc196e6d
util: add util_is_power_of_two function
2009-08-21 18:07:35 +01:00
Chia-I Wu
1f871a4d15
egl_softpipe: Do not flush unlinked context.
...
An unlinked context is destroyed after _eglMakeCurrent. Flushing such
context would cause segfault.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-21 08:34:34 -06:00
Jakob Bornecrantz
9b3e5df900
st/egl: Add support for drmModeDirtyFB command if found
2009-08-21 15:04:21 +02:00
Christoph Bumiller
d7c55555ac
nv50: use VTX_ATTR_nF for constant vtxelts
2009-08-20 21:41:39 +02:00
Christoph Bumiller
6d1f63f520
nv50: set vertex buffer limits
2009-08-20 21:41:39 +02:00
Christoph Bumiller
80c5ab1586
nv50: modify vbo format to hw translation, add BGRA swizzle
2009-08-20 21:41:39 +02:00
Keith Whitwell
00c8359182
softpipe: allow the existing sampler routines to be hooked up directly
...
Let eg. sp_get_samples_rect be hooked directly in as the tgsi sampler
routine.
Add a field to determine whether this is a vertex or fragment sampling
call, and massage parameters to match the tgsi call.
2009-08-20 18:36:57 +01:00
Keith Whitwell
0d9979d9ec
softpipe: fix xpot calculation typo in sp_get_samples_2d_nearest_clamp_POT
2009-08-20 18:13:25 +01:00
Keith Whitwell
1fd40e506c
softpipe: slightly optimized tiling calculation
2009-08-20 18:12:44 +01:00
Keith Whitwell
79a7ddb57a
softpipe: fix glitch in texel lookups on fastpaths
...
Fixes two issues - firstly for mipmap levels with one or more
dimensions smaller than tilesize, the code was sampling off the edge
of the texture (but still within the tile).
Secondly, in the linear_mipmap_linear case, both the default code and
new fastpath were incorrect. This change fixes the fastpath and adds
a comment to the default path, which still needs to be fixed.
Basically the issue is that the coordinates in the smaller texture
level are/were being computed by just dividing thecoordinates from the
larger texture level by two, as in:
x0[j] /= 2;
y0[j] /= 2;
x1[j] /= 2;
y1[j] /= 2;
The issues with this are signficant. Initially x1 is most often equal
to x0+1, but after this, it will likely be equal to x0, so we will not
actually be performing the linear blend within the smaller mipmap.
The fastpath code avoided this (recalculated x1), but was still using
the weighting factors from the larger mipmap level (xw, yw), which
were incorrect.
Change the fastpath code to do two full, independent linear samples of
the two mipmap levels before blending. The default code needs to do
the same thing.
2009-08-20 17:59:39 +01:00
Brian Paul
ce723d8d8b
tgsi: check for SOA dependencies in SSE and PPC code generators
...
Fall back to interpreter for now. This doesn't happen very often.
2009-08-20 10:34:45 -06:00
Brian Paul
4c7c294fff
tgsi: handle SOA dependencies for MOV/SWZ
...
SOA dependencies can happen when a register is used both as a source and
destination and the source is swizzled. For example:
MOV T, T.yxwz; would expand into:
MOV t0, t1;
MOV t1, t0;
MOV t2, t3;
MOV t3, t2;
The second instruction will produce the wrong result since we wrote to t0
in the first instruction. We need to use an intermediate temporary to fix
this.
This will take more work to fix for all TGSI instructions. This seems to
happen with MOV instructions more than anything else so fix that case now
and warn on others.
Fixes piglit glsl-vs-loop test (when not using SSE). See bug 23317.
2009-08-20 10:28:22 -06:00
Brian Paul
5e6d21afa4
tgsi: added tgsi_full_instruction::Flags field
...
Users of the parser can make use of this.
2009-08-20 10:25:55 -06:00
Jakob Bornecrantz
e93d41d24f
st/egl: Open the first drm node
...
At least its better then hardcoded to i915
2009-08-20 17:50:30 +02:00
Brian Paul
45cd9d80db
tgsi: when printing/dumping programs indent loops and conditionals
2009-08-20 10:52:12 -06:00
Brian Paul
1645adc551
tgsi: check for SOA dependencies in SSE and PPC code generators
...
Fall back to interpreter for now. This doesn't happen very often.
2009-08-20 10:52:12 -06:00
Brian Paul
013bd4da1a
tgsi: handle SOA dependencies for MOV/SWZ
...
SOA dependencies can happen when a register is used both as a source and
destination and the source is swizzled. For example:
MOV T, T.yxwz; would expand into:
MOV t0, t1;
MOV t1, t0;
MOV t2, t3;
MOV t3, t2;
The second instruction will produce the wrong result since we wrote to t0
in the first instruction. We need to use an intermediate temporary to fix
this.
This will take more work to fix for all TGSI instructions. This seems to
happen with MOV instructions more than anything else so fix that case now
and warn on others.
Fixes piglit glsl-vs-loop test (when not using SSE). See bug 23317.
2009-08-20 10:52:12 -06:00
Brian Paul
fffcecc4d9
tgsi: added tgsi_full_instruction::Flags field
...
Users of the parser can make use of this.
2009-08-20 10:51:55 -06:00
Keith Whitwell
4f409da345
softpipe: optimized path for simple mipmap sampling
...
linear-mip-linear-repeat-POT sampling faspath, provides a very nice
speedup to apps that do this common type of texturing.
Test case: demos/terrain, turn fog off, turn texturing on.
Without patch: 12 fps
With patch: 20 fps.
2009-08-20 11:25:20 +01:00
Brian Paul
8604a896a6
gallium: rename copy/fill_rect utility functions
2009-08-19 13:17:58 -06:00
Brian Paul
4522cdbfdd
gallium: fix tags target in Makefile.template
2009-08-19 13:17:58 -06:00
José Fonseca
c69d9296fb
tgsi: Add missing include.
...
(cherry picked from commit d2787c02c130b1fe20d0c032d468622f2fdaef79)
2009-08-19 12:03:34 +01:00
José Fonseca
b2f3f7dd12
tgsi: Fix typo in ureg constant creation.
...
(cherry picked from commit aa40c9abc7787fdf46cb661a4d0bb8bec513fc63)
2009-08-19 12:03:10 +01:00
Keith Whitwell
dd5ac3cafc
st/xlib: remove a couple more 'fake' references
2009-08-19 12:02:53 +01:00
Keith Whitwell
515a820021
st/xlib: remove dead ungrab helper
2009-08-19 12:02:53 +01:00
Keith Whitwell
65079afcde
tgsi: silence compiler warning
2009-08-19 12:00:24 +01:00
Keith Whitwell
7dc5527592
tgsi: remove unused function argument
2009-08-19 12:00:03 +01:00
Keith Whitwell
265e210edb
tgsi: add missing functionality to support instructions with labels
...
Could previously emit opcodes with label arguments, but was no way to
patch them with the actual destinations of those labels.
Adds two functions:
ureg_get_instruction_number - to get the id of the next instruction
to be emitted
ureg_fixup_label - to patch an emitted label to point to a given
instruction number.
Need some more complex examples than u_simple_shader, so far this has
only been compile-tested.
2009-08-19 11:54:26 +01:00
Corbin Simpson
e327845e2b
r300g: Force off ZTOP optimizations for now.
2009-08-18 21:25:53 -07:00