Commit Graph

38678 Commits

Author SHA1 Message Date
Jerome Glisse f8d11b2e8e r600g: force unbind of previously bind sampler/sampler_view
Previously bind sampler/sampler_view can be converted and endup
overwritting the current state we want to schedule. Example :
bind texA texB to sampler_view[0] & sampler_view[1], render,
bind texB to sampler_view[0] render. Now state associated to
texB are set to configure sampler_view slot 0, but as we don't
unbind sampler_view[1] still point to texB state so we end up
with sampler_view[1] overwritting sampler_view[0], which gives
wrong rendering if next rendering bind texA to sampler_view[0],
it will endup as texB is bound to sampler_view[0]. If you are
not confuse at that point give me a call i will be buying you
beer.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-02 16:58:47 -04:00
Brian Paul e746a6bb9a st/mesa: clamp gl_constants::MaxVarying against MAX_VARYING
Don't try to use more generic varying vars than core Mesa supports.
Fixes fd.o bug 29959.
2010-09-02 13:00:10 -06:00
Ian Romanick 6e3cbeb361 glsl2: Update TODO file 2010-09-02 10:11:54 -07:00
Jerome Glisse e73c5501b2 r600g: fix memory/bo leak
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-02 11:47:30 -04:00
Brian Paul c9039fdb16 mesa: fix code generation for ir_unop_sqrt
The CMP instruction needed to be flipped to properly handle
operand==0.

Fixes fd.o bug 29923.
2010-09-02 07:58:33 -06:00
Brian Paul 9eca0e2c3e mesa: fix some printf warnings with casts 2010-09-02 07:57:16 -06:00
Dave Airlie 5d5f693cef r600g: fix thinko in shadow code.
spotted by taiu on irc
2010-09-02 21:26:12 +10:00
Dave Airlie 76d0541e79 r600g: fix logicop, the 3d ROP is the 2D rop shifted twice. 2010-09-02 16:40:41 +10:00
Dave Airlie e8ff0f63b6 r600g: fix depth texture tests 2010-09-02 15:51:23 +10:00
Kenneth Graunke f32d3df8ab glsl: Apply implicit conversions to structure constructor parameters.
The code for handling implicit conversions should probably get
refactored, but for now, this is easy.

Fixes piglit test constructor-26.vert.
2010-09-01 20:39:09 -07:00
Kenneth Graunke 43a6200f3c glsl: Convert constant record constructor parameters to ir_constants.
I'm not sure if this is strictly necessary, but it seems wise.
2010-09-01 20:39:09 -07:00
Kenneth Graunke cfe0dd5622 glsl: Reject structure constructors that have too many arguments.
Fixes piglit test constructor-27.vert.
2010-09-01 20:39:09 -07:00
Ian Romanick e466b182bb glsl2: Remove unnecessary glsl_symbol_table::get_function parameter return_constructors
Now that constructors are not generated as functions or stored in the
symbol table, there is no need to flag whether or not constructors
should be returned.
2010-09-01 20:39:09 -07:00
Ian Romanick 4d6221f90d glsl2: Remove unused method glsl_type::generate_constructor 2010-09-01 20:39:09 -07:00
Ian Romanick 16d9ebb357 glsl2: Remove unused 'constructor' parameter from glsl_symbol_table::add_type 2010-09-01 20:39:09 -07:00
Ian Romanick a789ca649c glsl2: Don't generate constructor functions for structures 2010-09-01 20:39:09 -07:00
Ian Romanick 37200d83d3 glsl2: Emit structure constructors inline
Fixes piglit test cases glsl-[fv]s-all-0[12].
2010-09-01 20:39:09 -07:00
Dave Airlie 7299023c2a r600g: add missing vertex fetch formats to the translation table.
fixes at least 2 more piglits.
2010-09-02 13:32:25 +10:00
Jerome Glisse 31b84acbd2 r600g: fix binding of same texture to several target slot
One can bind same texture or sampler to different slot,
each slot needs it own state. The solution implemented
here is not exactly beautifull or optimal need to think
to somethings better.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-01 21:59:28 -04:00
Kenneth Graunke 3960558795 glsl: Fix write mask in matrix-from-matrix constructors.
If the matrix being constructed was larger than the source matrix, it
would overwrite the lower-right part of the matrix with the wrong
values, rather than leaving it as the identity matrix.

For example, constructing a mat4 from a mat2 should only use a writemask
of "xy" when copying from the source, but was using "xyzw".

Fixes the code generated by piglit test constructor-23.vert.
2010-09-01 18:57:51 -07:00
Kenneth Graunke 54b35e6735 glsl: Add proper handling for constant matrix-from-matrix constructors.
Fixes piglit test case constructor-21.vert and changes
constructor-22.vert to give the correct output.
2010-09-01 18:57:51 -07:00
Kenneth Graunke 1f7c7df40f glsl: Move generate_constructor_(matrix|vector) to ir_constant ctor. 2010-09-01 18:57:50 -07:00
Kenneth Graunke 550237eedd ast_function: Fix check for "too few components".
This was triggering even for matrix-from-matrix constructors.  It is
perfectly legal to construct a mat3 from a mat2 - the rest will be
filled in by the identity matrix.

Changes piglit test constructor-23.vert from FAIL to PASS, but the
generated code is incorrect.
2010-09-01 18:57:50 -07:00
Kenneth Graunke ee88c46640 ast_function: Remove bogus cases from generate_constructor_matrix.
There are no integer matrix types, so switching on them is silly.
2010-09-01 18:57:50 -07:00
Dave Airlie 36192b772e r600g: fix incorrect state naming in pipe_sampler vs pipe_sampler_view
fixes problems in valgrind with uninitialised values.
2010-09-02 11:17:37 +10:00
Eric Anholt 5ad74779ce ir_to_mesa: Load all the STATE_VAR elements of a builtin uniform to a temp.
Like the constant handling and the handling of other uniforms, we add
the whole thing to the Parameters, avoiding messy, incomplete logic
for adding just the elements of a builting uniform that get used.
This means that a driver that relies only on ParameterValues[] for its
parameters will have an increased parameter load, but drivers
generally don't do that (since they have other params they need to
handle, too).

Fixes glsl-fs-statevar-call (testcase for Ember).  Bug #29687.

Regresses glsl-vs-array-04 on 965.  Thanks to a slight change in
register allocation, this test of undefined behavior now wraps around
the register space and unexpectedly reads the constant value it's
trying to compare to.  The test should probably not look at the
resulting color, since behavior is undefined.
2010-09-01 17:08:23 -07:00
Eric Anholt 500e7b7599 ir_to_mesa: Add a little helper for emitting link failure messages. 2010-09-01 17:08:23 -07:00
Eric Anholt 86af037e6a mesa: Fix many printf-like warnings.
Most of these are just typecasting to long to match the arg type.  I
don't really care too much about getting a GLsizei or whatever
appropriate type in.  However, there were a number of real bugs, like
missing arguments or passing floats to integer format specifiers.  My
favorite: printflike("%s, argument") is missing an argument.
2010-09-01 17:08:23 -07:00
Eric Anholt 3cddc15d9d mesa: Add __printf__ attribute to printf-like functions to get warnings. 2010-09-01 17:08:23 -07:00
Dave Airlie 557a71c506 mesa/st: remove check for buffer/elements = 0
shown by the glsl-vs-point-size failing on r600g.

the test passes on softpipe and I get a full piglit test run completing on r600g.
2010-09-02 09:51:25 +10:00
Jerome Glisse ffcb443cd7 r600g: silence compiler warning
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-01 18:09:37 -04:00
Jerome Glisse 67234b4b42 r600g: refix db/cb state
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-01 18:05:52 -04:00
Brian Paul 4ff3467daf mesa: fix out of bounds memory read in mipmap gen code
Out of bounds reads could happen for reducing WxH to WxH/2
or WxH to W/2xH.

Fixes fd.o bug 29918.
2010-09-01 13:24:26 -06:00
Brian Paul fd7f2ae085 mesa: more prog_execute.c debug code 2010-09-01 13:24:26 -06:00
Kenneth Graunke 0181385f36 glsl: Add forgotten implementations of equal/notEqual on bvecs. 2010-09-01 11:50:23 -07:00
Alex Deucher c70459a1b9 r600g: fix up default state differences between r6xx and r7xx
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2010-09-01 14:41:03 -04:00
Brian Paul 6ac66192a6 st/glx: re-order destruction of buffers, visuals
Free the buffers before the visuals.  Fixes valgrind warning
reported in fd.o bug 29919.
2010-09-01 12:40:31 -06:00
Eric Anholt dd5ef33e3c i965: DP2 produces a scalar result like DP3, DP4, etc.
Fixes glsl-fs-dot-vec2-2.
2010-09-01 10:45:05 -07:00
Ian Romanick a35faa6a41 glsl2: Perform algebraic simplifications on logical binary operators
Reduces glsl-vs-all-01 from 42 Mesa IR instructions (including the
END) to 17.
2010-09-01 10:25:11 -07:00
Ian Romanick a4262874f8 glsl2: Allow ir_constant::zero to create boolean constants 2010-09-01 10:25:11 -07:00
Jerome Glisse 66e4cb1cd5 r600g: avoid dynamic allocation of states
Make state statically allocated, this kills a bunch of code
and avoid intensive use of malloc/free. There is still a lot
of useless duplicate function wrapping that can be kill. This
doesn't improve yet performance, needs to avoid memcpy states
in radeon_ctx_set_draw and to avoid rebuilding vs_resources,
dsa, scissor, cb_cntl, ... states at each draw command.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-01 13:16:23 -04:00
Jerome Glisse 15ce70252c Revert "Revert "r600g: precompute some of the hw state""
This reverts commit 1fa7245c34.

Conflicts:

	src/gallium/drivers/r600/r600_state.c
2010-09-01 13:04:42 -04:00
Patrice Mandin 4a955ab6b7 nouveau/nvfx: Remove enforcement of bit depth being same as front buffer
Signed-off-by: Patrice Mandin <patmandin@gmail.com>
2010-09-01 18:13:14 +02:00
Vladimir Vukicevic 0731701236 mesa: initialize dummy framebuffer and renderbuffer mutexes
See fd.o bug 29909.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-09-01 08:54:23 -06:00
Jon TURNEY c085cd6917 Cygwin: Adjust mklib so -linker and -cplusplus options are processed more like they are for linux
It looks like we were ignoring -linker when -noprefix wasn't present, and
when -noprefix was present, -linker was mandatory and -cplusplus ignored.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-09-01 08:48:11 -06:00
Jon TURNEY c55a8a73a4 Cygwin: Teach mklib/minstall to properly install libraries on cygwin
Teach mklib/minstall more about cygwin so libraries are properly installed

Have mklib install the .dll into the lib/ staging directory as well

Have minstall install the .dll into PREFIX/bin at the same time as
installing the .dll.a link library into PREFIX/lib

mklib uses a '-' rather than a '.' as the separator before the version
number in library names on cygwin.  Change the install globs so they match
library names like that.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-09-01 08:48:06 -06:00
Jon TURNEY 36b195332f Cygwin: Change mklib not to report the full archname on cygwin
Change mklib not to report the full archname when building a library for cygwin
(which is something like 'CYGWIN_NT-5.1' or 'CYGWIN_NT-6.1-WOW64' and kind of
confusing), but just 'CYGWIN'.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-09-01 08:48:02 -06:00
Jon TURNEY 8fee182e8c Cygwin: Have mklib exit with error code if link fails
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-09-01 08:48:00 -06:00
Ian Romanick 63b80f8cc1 glsl2: Disallow function declarations within function definitions in GLSL 1.20
The GLSL 1.20 spec specifically disallows this, but it was allowed in
GLSL 1.10.

Fixes piglit test cases local-function-0[13].frag and bugzilla #29921.
2010-09-01 07:08:34 -07:00
Andre Maasikas c3c25a7ab8 r600: cube mipmap levels are aligned to 8 faces only starting from r7xx 2010-09-01 09:19:51 +03:00