Commit graph

39613 commits

Author SHA1 Message Date
Luca Barbieri
8224256946 d3d1x: remove specstrings 2010-09-23 16:06:02 +02:00
Luca Barbieri
6c598c78bd d3d1x: normalize whitespace 2010-09-23 16:06:02 +02:00
Luca Barbieri
e5ae4588d1 d3d1x: s/tpf/sm4/g 2010-09-23 16:06:02 +02:00
Luca Barbieri
75c29fe1c8 d3d1x: autogenerate shader enums and text from def files
This avoids the duplication in tpf.h and tpf_text.cpp
2010-09-23 16:06:02 +02:00
Luca Barbieri
22762012d1 d3d1x: initialize the mutex 2010-09-23 16:06:02 +02:00
José Fonseca
440129521c draw: Prevent clipped vertices overflow.
Some pathological triangles cause a theoritically impossible number of
clipped vertices.

The clipper will still assert, but at least release builds will not
crash, while this problem is further investigated.
2010-09-23 16:47:36 +01:00
Keith Whitwell
8b597b4ea4 draw: don't apply flatshading to clipped tris with <3 verts
If a triangle was completely culled by clipping, we would still try to
fix up its provoking vertex.
2010-09-23 16:11:17 +01:00
Luca Barbieri
1b15a3cafd d3d1x: bind NULL CSOs before destroying default CSOs on context dtor
Otherwise softpipe and llvmpipe assert.
2010-09-23 11:23:08 +02:00
Luca Barbieri
17ad9972f4 d3d1x: fix deadlocks on non-recursive mutex 2010-09-23 11:23:08 +02:00
Dave Airlie
ada1d91c15 egl: fix build since 17eace581d
looks like mesa st didn't get updated.
2010-09-23 16:12:23 +10:00
Dave Airlie
6547a82df1 r600g: fix warnings since last commit. 2010-09-23 16:02:54 +10:00
Dave Airlie
2f8453eea3 r600g: use blitter to do db->cb flushing.
use the blitter + custom stage to avoid doing a whole lot of state
setup by hand. This makes life a lot easier for doing this on evergreen
it also keeps all the state setup in one place.

We setup a custom context state at the start with a flag to denote
its for the flush, when it gets generated we generate the correct state
for the flush and no longer have to do it all by hand.

this should also make adding texture *to* depth easier.
2010-09-23 16:00:16 +10:00
Dave Airlie
c262c4a2ff u_blitter: add a custom blitter call passing a dsa cso
reimplement the flush stage added for r300 to allow a custom DSA stage
to be used in the pipeline, this allows for r600 hw DB->CB flushes.
2010-09-23 16:00:16 +10:00
Luca Barbieri
881c05aa1e d3d1x: properly reference count the backend 2010-09-23 03:13:52 +02:00
Kristian Høgsberg
17eace581d dri: Pass the __DRIscreen and the __DRIscreen private back to image lookup
We will typically have a current context when we need to lookup the image,
but the lookup implementation don't need it so drop it.
2010-09-22 22:02:05 -04:00
Zack Rusin
1c2423999e rbug: fix rbug when contexts are being destroyed 2010-09-22 20:41:23 -04:00
Dave Airlie
fa11c400d0 r600g: fix typo in evergreen register list
pointed out by glisse on irc.
2010-09-23 10:30:35 +10:00
Dave Airlie
8078e58795 r600g: fix depth readback on rv610 and other quirky variants.
at least zreaddraw works for me here now on my rv610
2010-09-23 10:20:56 +10:00
Dave Airlie
fb5ef05dc5 r600g: use floats instead of hex for blit vbo
once I go past 0x3f80000, I can't translate hex to float in-brain anymore.
2010-09-23 10:01:48 +10:00
Eric Anholt
03923ff95e i965: Warning fix for vector result any_nequal/all_equal change. 2010-09-22 14:58:29 -07:00
Eric Anholt
bb70bd5559 i965: Update expression splitting for the vector-result change to compares.
Fixes:
glsl1-precision exp2
glsl1-precision log2
2010-09-22 14:55:58 -07:00
Eric Anholt
ac3d5beb0b i965: When splitting vector variable assignment, ignore unset channels.
The new checks for sanity in ir_assignment creation got angry about
this write_mask == 0.  Fixes:
glsl-fs-dot-vec2.
glsl-fs-atan-2
glsl-fs-dot-vec2
2010-09-22 14:55:58 -07:00
Kristian Høgsberg
86a1938aa5 glx: Invalidate buffers after binding a drawable
If the server doesn't send invalidate events, we may miss a
resize before the rendering starts.  Invalidate the buffers now
so the driver will recheck before rendering starts.

https://bugs.freedesktop.org/show_bug.cgi?id=29984
https://bugs.freedesktop.org/show_bug.cgi?id=30155
2010-09-22 17:36:19 -04:00
Eric Anholt
d74bab1fb6 i965: Fix the vector/expression splitting for the write_mask change.
+113 piglits.
2010-09-22 14:15:27 -07:00
Jakob Bornecrantz
4bb42a4f7e tgsi: Fix missing test before check
As introduced with commit d21301675c

NOTE: This is a candidate for the 7.9 branch.
2010-09-22 22:56:54 +02:00
Eric Anholt
eaa6bf59db ir_to_mesa: Only compare vector_elements present for any_nequal/all_equal
Fixes: glsl-mat-from-int-ctor-03
2010-09-22 13:09:51 -07:00
Eric Anholt
3ffab36768 glsl: Fix copy'n'wasted ir_noop_swizzle conditions.
It considered .xyyy a noop for vec4 instead of .xyzw, and similar for vec3.
2010-09-22 13:09:51 -07:00
Eric Anholt
b39e6f33b6 glsl: Rework assignments with write_masks to have LHS chan count match RHS.
It turns out that most people new to this IR are surprised when an
assignment to (say) 3 components on the LHS takes 4 components on the
RHS.  It also makes for quite strange IR output:

(assign (constant bool (1)) (x) (var_ref color) (swiz x (var_ref v) ))
(assign (constant bool (1)) (y) (var_ref color) (swiz yy (var_ref v) ))
(assign (constant bool (1)) (z) (var_ref color) (swiz zzz (var_ref v) ))

But even worse, even we get it wrong, as shown by this line of our
current step(float, vec4):

(assign (constant bool (1)) (w)
	(var_ref t)
	(expression float b2f (expression bool >=
		    (swiz w (var_ref x))(var_ref edge))))

where we try to assign a float to the writemasked-out x channel and
don't supply anything for the actual w channel we're writing.  Drivers
right now just get lucky since ir_to_mesa spams the float value across
all the source channels of a vec4.

Instead, the RHS will now have a number of components equal to the
number of components actually being written.  Hopefully this confuses
everyone less, and it also makes codegen for a scalar target simpler.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2010-09-22 13:09:51 -07:00
Luca Barbieri
38da5c9cb6 d3d1x: add Wine dlls (tri, tex working, but no other testing) 2010-09-22 19:59:14 +02:00
Luca Barbieri
ab5e9a726d d3d1x: define GUIDs in the normal way 2010-09-22 19:44:58 +02:00
Luca Barbieri
3d4a15dfab d3d1x: fix API name 2010-09-22 19:44:57 +02:00
Luca Barbieri
e7624e23a3 d3d1x: redesign the HWND resolver interface
This one should be powerful enough to hook up Wine.
2010-09-22 19:44:57 +02:00
Luca Barbieri
4f8e38dab8 d3d1x: fix GUID declarations 2010-09-22 19:36:27 +02:00
Luca Barbieri
6ce098631a d3d1x: destroy native_display on adapter destruction 2010-09-22 19:36:27 +02:00
Kristian Høgsberg
9ec0b2a45e dri2: Make createImageFromName() take a __DRIscreen instead of __DRIcontext
We can't expect to have a context when this is called, and we don't need one
so just require a __DRIscreen instead.

Reported by Yu Dai <yu.dai@intel.com>
2010-09-22 15:08:22 -04:00
Jerome Glisse
f060ae9ab6 r600g: fix multiple occlusion query on same id
When calling query begin using same query id we need to discard
previous query results.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-22 14:59:09 -04:00
Jerome Glisse
b8835a3992 r600g: disable shader rebuild optimization & account cb flush packet
Shader rebuild should be more clever, we should store along each
shader all the value that change shader program rather than using
flags in context (ie change sequence like : change vs buffer, draw,
change vs buffer, switch shader will trigger useless shader rebuild).

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-22 14:19:05 -04:00
Brian Paul
516ac2bd50 llvmpipe: fix sprite texcoord setup for non-projective texturing
Normally the Mesa state tracker uses TXP instructions for texturing.
But if a fragment shader uses texture2D() that's a TEX instruction.
In that case we were incorrectly computing the texcoord coefficients
in the point sprite setup code.  Some new comments in the code explain
things.
2010-09-22 11:25:18 -06:00
Brian Paul
bd6b8107ad configs: remove egl-swrast target from linux-dri config 2010-09-22 09:30:16 -06:00
Kristian Høgsberg
b91dba49e0 intel: Fix GL_ARB_shading_language_120 commit
Fix commit e7087175f8.  Move the reference to
GL_VERSION_2_1_functions to intel_extensions.c where it's available,
don't try to enable a non-existing extension and advertise 1.20 for all
intel chipsets, not just GEN4 and up.
2010-09-22 11:01:45 -04:00
Jerome Glisse
1abe48afbe r600g: flush color buffer after draw command
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-22 10:35:14 -04:00
José Fonseca
87267c71f6 llvmpipe: Make rgb/alpha bland func/factors match, when there is no alpha.
Makes AoS blending easier, and state more canonical.
2010-09-22 15:02:39 +01:00
José Fonseca
9a8e9f4595 llvmpipe: Special case complementary and identify blend factors in SoA.
One multiplication instead of two.

Also fix floating point random number generation and verification.

TODO: Do the same for AoS blending.
2010-09-22 15:02:39 +01:00
José Fonseca
162b0efff6 gallivm: Add unorm support to lp_build_lerp()
Unfortunately this can cause segfault with LLVM 2.6, if x is a constant.
2010-09-22 15:02:39 +01:00
José Fonseca
256b9d99fb util: Flush stdout on util_format. 2010-09-22 15:02:39 +01:00
Luca Barbieri
cac1565b98 d3d1x: fix segfault when hashing 2010-09-22 13:54:07 +02:00
Luca Barbieri
d83b7a69a0 d3d1x: fix warning 2010-09-22 13:25:45 +02:00
Luca Barbieri
1aed6f42e9 d3d1x: fix cf analysis 2010-09-22 13:24:55 +02:00
Luca Barbieri
12044e4c99 d3d1x: link with CXXFLAGS
Otherwise, -m32 doesn't make it there.
2010-09-22 13:22:00 +02:00
Luca Barbieri
d092c0c60d d3d1x: add missing memory barrier 2010-09-22 13:21:13 +02:00