Commit graph

39239 commits

Author SHA1 Message Date
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
Luca Barbieri
6d0c39ce36 d3d1x: don't build progs automatically
progs requires winsys, which hasn't yet been built by the time we
go into state_trackers.

It may be a good idea to also move it into tests.

After a normal build, run make in src/gallium/state_trackers/d3d1x/progs
to build them.
2010-09-22 11:36:35 +02:00
Luca Barbieri
feb9c8c510 winsys: automatically build sw winsys needed by EGL and d3d1x
A cleaner solution would be preferable, but this does no harm and works.
2010-09-22 09:37:23 +02:00
Luca Barbieri
a0e5103200 glx: decouple dri2.c and GLX, fixing Gallium EGL and d3d1x build
The Gallium EGL state tracker reuses dri2.c but not the GLX code.

Currently there is a bit of code in dri2.c that is incorrectly tied
to GLX: instead, make it call an helper that both GLX and Gallium EGL
implement, like dri2InvalidateBuffers.

This avoids a link error complaining that dri2GetGlxDrawableFromXDrawableId
is undefined.

Note that we might want to move the whole event translation elsewhere,
and probably stop using non-XCB DRI2 altogether, but this seems to be
the minimal fix.
2010-09-22 08:01:49 +02:00
Luca Barbieri
e1e7c8df7f nvfx: remove gl_PointCoord hack
Now Gallium has the proper fix, thanks to Brian Paul.
2010-09-22 08:00:20 +02:00
Luca Barbieri
86bb64f889 d3d1x: attempt to fix/workaround bug #30322
This may just be hiding some other bug though, since the types are supposed
to be the same (and it compiles for me).

Anyway, this interface will likely need to changed, since it seems Wine needs
a more powerful one capable of expressing window subregions and called at
every Present.
2010-09-22 08:00:19 +02:00
Dave Airlie
2b1ea90342 r600g: disable dirty handling on texture from depth code.
nothing was every dirtying the object again, the mesa-demos
reflect test was just stalling.

this fixes glean readPixSanity.
2010-09-22 14:27:58 +10:00
Dave Airlie
d18f3accb0 r600g: make stencil readback work
need to write two components to get stencil components as well
2010-09-22 14:19:16 +10:00
Dave Airlie
41ef78c5af r600g: cleanup some of the DB blit code
add cb/db flush states to the blit code.
add support for the rv6xx that need special treatment.
according to R6xx_7xx_3D.pdf

set r700 CB_SHADER_CONTROL reg in blit code
docs say dual export should be disabled for DB->CB
2010-09-22 13:33:57 +10:00
Dave Airlie
6e901e330a r600g: fix typo in struct member name 2010-09-22 12:57:08 +10:00
Jerome Glisse
ca35292a44 r600g: occlusion query for new design
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-21 20:25:39 -04:00
Brian Paul
e7087175f8 mesa: don't advertise bogus GL_ARB_shading_language_120 extension
Instead of using the invalid GL_ARB_shading_language_120 extension to
determine the GLSL version, use a new ctx->Const.GLSLVersion field.
Updated the intel and r600 drivers, but untested.

See fd.o bug 29910

NOTE: This is a candidate for the 7.9 branch (but let's wait and see if
there's any regressions).
2010-09-21 18:13:04 -06:00
Vinson Lee
3642ca2f66 glut: Define eventParser for non-Windows only.
Fixes this GCC warning on MinGW build.
glut_input.c:295: warning: 'eventParser' defined but not used
2010-09-21 15:17:52 -07:00
Vinson Lee
13cd131b0f glut: Define markWindowHidden for non-Windows only.
Fixes this GCC warning on MinGW build.
glut_event.c:255: warning: 'markWindowHidden' defined but not used
2010-09-21 15:11:00 -07:00
Brian Paul
9e8d9f456f softpipe: add missing calls to set draw vertex samplers/views
Part of the fix for running softpipe w/ LLVM-enabled draw module.
2010-09-21 15:31:33 -06:00
Brian Paul
ffa2d203fb gallivm: fix lp_build_sample_compare()
The old code didn't really make sense.  We only need to compare the
X channel of the texture (depth) against the texcoord.

For (bi)linear sampling we should move the calls to this function
and compute the final result as (s1+s2+s3+s4) * 0.25.  Someday.

This fixes the glean glsl1 shadow2D() tests.  See fd.o bug 29307.
2010-09-21 15:31:32 -06:00
Luca Barbieri
83ea4878db d3d1x: ignore errors while building docs
Some versions of dot apparently lack pdf output.
2010-09-21 23:26:47 +02:00
Jerome Glisse
45d10c7d59 r600g: fix multi buffer rendering
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-21 16:57:55 -04:00
Brian Paul
2b95525429 glsl2: fix typo in error msg 2010-09-21 14:57:10 -06:00
Luca Barbieri
c02bf81629 d3d1x: fix GCC 4.1/4.2 build 2010-09-21 22:47:09 +02:00
Luca Barbieri
b4b2091655 d3d1x: add template parameters to base class ctor calls for GCC 4.4
GCC 4.5 is fine without them, but GCC 4.4 requires them.
Should fully fix the build on GCC 4.4
2010-09-21 22:35:01 +02:00
Luca Barbieri
82c346673a d3d1x: fix build with compilers other than GCC 4.5
There was some libstdc++-specific code that would only build with GCC 4.5
Now it should be much more compatible, at the price of reimplementing
the generic hash function.
2010-09-21 22:16:52 +02:00
Tilman Sauerbeck
1bcdc504d1 gallium/docs: The RET opcode may appear anywhere in a subroutine.
Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
2010-09-21 21:59:57 +02:00
Eric Anholt
dd9a88f4dd i965: Track the windowizer's dispatch for kill pixel, promoted, and OQ
Looks like the problem was we weren't passing the depth to the render
target as expected, so the chip would wedge.  Fixes GPU hang in
occlusion-query-discard.

Bug #30097
2010-09-21 12:29:57 -07:00
Eric Anholt
4a0bc4716d i965: Also enable CC statistics when doing OQs.
This is required by the spec, so respect that.
2010-09-21 12:29:57 -07:00