Commit Graph

38347 Commits

Author SHA1 Message Date
Vinson Lee
f67400d467 glsl: Initialize the rest of values of ir_constant::value.
Fixes valgrind uninitialized value errors in the piglit shader tests for
softpipe and llvmpipe.
2010-08-28 23:55:51 -07:00
Vinson Lee
182d635060 gallium: Remove unnecessary header from p_state.h.
Remove p_screen.h.
2010-08-28 22:15:37 -07:00
Vinson Lee
1fc396204b nvfx: Remove util_is_pot in favor of util_is_power_of_two.
This is a follow up to commit 89b2897220.
2010-08-28 22:12:55 -07:00
Vinson Lee
b812ff8f9e util: Include missing header in u_draw.h.
Include p_state.h for complete type to pipe_draw_info.
2010-08-28 21:46:41 -07:00
Vinson Lee
1f3e6e9726 util: Add forward declaration in u_transfer.h. 2010-08-28 21:42:28 -07:00
Marek Olšák
a922725118 r300g,u_blitter: use u_framebuffer
Removing another function duplication in u_blitter.
2010-08-29 06:16:53 +02:00
Marek Olšák
89b2897220 util: remove util_is_pot in favor of util_is_power_of_two
The function was duplicated.
2010-08-29 06:16:25 +02:00
Eric Anholt
735af3959f i965: Add initial support for texturing to the new FS backend.
Fixes 11 piglit tests.
2010-08-28 20:04:03 -07:00
Eric Anholt
af62060ef2 i965: Add disasm for gen5 sampler messages. 2010-08-28 20:02:54 -07:00
Cedric Vivier
3d4597f9d4 i965: Move libdrm/C++ hack introduced in fa2deb3d to intel_context.h
Fixes build on Linux/GCC 4.4 as libdrm includes are also used by other
brw_fs_*.cpp files.

Bug #29855
2010-08-28 20:02:54 -07:00
Vinson Lee
2dfd348e33 st/mesa: Include missing header in st_mesa_to_tgsi.c.
Include p_screen.h for complete type to pipe_screen.
2010-08-28 14:24:42 -07:00
Vinson Lee
d42b7d5f8d softpipe: Include missing header in sp_flush.c.
Include p_screen.h for complete type to pipe_screen.
2010-08-28 14:21:28 -07:00
Vinson Lee
9112e531d4 draw: Include missing header in draw_vs_llvm.c.
Include p_screen.h for completely type to pipe_screen.
2010-08-28 14:18:57 -07:00
Vinson Lee
cf1e4b15a4 llvmpipe: Include missing header in lp_flush.c.
Include p_screen.h for complete type to pipe_screen.
2010-08-28 14:14:33 -07:00
Marek Olšák
c5b8ba9368 r300g: fix blitting between 2D NPOT mipmaps
Even though MIP filtering is not supported, we can bind an arbitrary mipmap
as the zero mipmap level.

NPOT textures now follow GL_TEXTURE_BASE_LEVEL and GL_TEXTURE_MIN_LOD.

This fixes piglit/fbo-copyteximage.
2010-08-28 22:37:53 +02:00
Mathias Fröhlich
c0f0eb8668 r300g: fix min/max lod computation 2010-08-28 18:17:30 +02:00
Marek Olšák
97cbb563f8 r300g: set the correct value in PVS_NUM_CNTLRS
As per docs.
2010-08-28 18:17:30 +02:00
Vinson Lee
f7579f2f28 llvmpipe: Remove unnecessary header. 2010-08-28 00:29:02 -07:00
Ian Romanick
120d5a95cb glsl2: Decompose matrix comparison into vector operations 2010-08-27 17:41:16 -07:00
Jakob Bornecrantz
977f7d48ee trace: Don't try to dump the rgba array if null 2010-08-28 00:56:51 +01:00
Eric Anholt
c7adb4ff1e glsl: Rename a couple of common variable names in mat_op_to_vec.
It was easy while typing implementations to accidentally overwrite the
original expression or assignment variables.
2010-08-27 16:11:00 -07:00
Eric Anholt
3c96ef1f07 glsl: Make mat_op_to_vec allocate out of the IR's parent.
This will reduce memory consumption of compiled shaders by not
dragging optimized-out children around.
2010-08-27 16:11:00 -07:00
Eric Anholt
d17faf726e i965: Set the pop count on BRK/CONT inside of an if statement in the FS.
This is the same as 8de8c97275 for the
VS, and fixes glsl-fs-if-nested-loop and the mandelbrot demo.

Bug #29498
2010-08-27 16:10:53 -07:00
Eric Anholt
681492cbe2 glsl: Regenerate for double destroy fix. 2010-08-27 15:25:06 -07:00
Eric Anholt
d539c69044 glsl: Protect against double compiler-destroy.
DRI was doing teardown when we close the last screen, then an atexit()
was added to call it as well.
2010-08-27 15:25:06 -07:00
Eric Anholt
ae6e112c69 dri: Get prototype for _mesa_destroy_compiler().
Bug #29665.
2010-08-27 14:43:39 -07:00
Eric Anholt
d20c276618 i965: Don't strip negate/abs flags when assigning uniform locations.
Fixes glsl-algebraic-sub-zero-4.
2010-08-27 14:42:35 -07:00
Eric Anholt
f0aa2d6118 i965: Add missing handling for BRW_OPCODE_SEL.
Fixes 4 piglit tests about min, max, and clamp.
2010-08-27 14:11:25 -07:00
Eric Anholt
38d01c5b27 i965: Mask out higher bits of the result of BRW_CMP producing a boolean.
When it says it sets the LSB, that's not just a hint as to where the
result goes.  Only the LSB is modified.  Fixes 20 piglit cases.
2010-08-27 13:59:36 -07:00
Eric Anholt
4229a93cc7 i965: Fix the types of immediate integer values.
When we're trying to do integer ops, handing a float in doesn't help.
2010-08-27 13:59:36 -07:00
Eric Anholt
41e75cde26 i965: Add translation for RNDD and RNDZ.
Fixes:
glsl-fs-any.
glsl1-integer division with uniform var
2010-08-27 13:59:36 -07:00
Eric Anholt
31c9f468f3 i965: Add support for ir_binop_mod using do_mod_to_fract.
Fixes glsl-fs-mod.
2010-08-27 13:59:36 -07:00
Jerome Glisse
48d8814c03 r600g: fix vbo size
Silence the kernel, vbo size is size - 1.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-27 16:54:00 -04:00
Brian Paul
9ce0d92ae7 mesa: move null ptr check (fdo bug 29843) 2010-08-27 14:35:52 -06:00
Nick Bowler
f57df7f213 mesa: Use the format info to identify packed depth/stencil formats.
Due to a misunderstanding of the Z24_X8 and X8_Z24 formats, the earlier
patch created depth/stencil wrappers for them.  This broke swrast.

Use the format info instead, which only identifies Z24_S8 and S8_Z24 as
packed depth/stencil.  It also has the advantage of being nicer code.

Signed-off-by: Nick Bowler <nbowler@draconx.ca>
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-08-27 14:31:00 -06:00
Brian Paul
579fce2524 mesa: use atexit() handler to release GLSL compiler memory
This releases a bunch of memory that was showing up as leaks with
valgrind.

If atexit() isn't widely supported we may need to add some #ifdef
tests around the call.
2010-08-27 14:30:59 -06:00
Brian Paul
b820bf979a glsl2: restructure header file for C++ and C inclusion
As it was, the header could not be cleanly #included by a C source.
2010-08-27 14:30:59 -06:00
Brian Paul
1be5d1c887 glsl2: remove 'extern' keyword in .c file 2010-08-27 14:30:59 -06:00
Eric Anholt
53290900db i965: Fix swapped instructions in ir_unop_abs and ir_unop_neg.
Fixes glsl-fs-neg and 5 other tests.
2010-08-27 13:19:28 -07:00
Eric Anholt
2776ad2641 i965: Add generate() handling for AND, OR, XOR.
10 more piglit tests pass.
2010-08-27 13:16:22 -07:00
Eric Anholt
130368f910 i965: Add support for if instructions in the new FS backend.
20 more piglit tests pass.
2010-08-27 13:15:05 -07:00
Eric Anholt
a0ffee2cd7 i965: When encountering an unknown opcode in new FS backend, print its name. 2010-08-27 13:14:52 -07:00
Eric Anholt
40932c1752 i965: Fix the maximum grf counting in the new FS backend.
glsl-algebraic-rcp-rsq managed to use 33 registers, and we claimed to
only use 32, so the write to g32 would go stomping over the precious
g0 of some other thread.
2010-08-27 12:21:40 -07:00
Eric Anholt
166b3fa29d i965: Validate the IR tree after doing our custom optimization passes.
This wouldn't catch the last failure fixed in them, because we don't
validate assignments well (due to the fact that we've got a pretty
glaring inconsistency in how we handle assignment writemasking), but
it could catch other failure we may produce.
2010-08-27 12:19:17 -07:00
Eric Anholt
55ced33675 i965: Add a bit of support for matrices to the new FS. 2010-08-27 12:02:15 -07:00
Eric Anholt
91a037b5e1 i965: Fix destination writemasking in the new FS. 2010-08-27 12:02:15 -07:00
Eric Anholt
0435cb348a i965: Fix swizzling in vector splitting for the new FS backend.
We weren't smearing a component of a split RHS out to reach an unsplit
LHS's writemask, so gl_FragColor (always unsplit) would often get
uninitialized values.

Fixes: glsl-algebraic-add-add-1 (and probably many others).
2010-08-27 12:02:15 -07:00
Zack Rusin
83e3a2d970 graw: fix the build (missing header) 2010-08-27 13:09:38 -04:00
Brian Paul
c8e0970667 mesa: free the fallback texture object in free_shared_state() 2010-08-27 10:51:47 -06:00
Brian Paul
476adf796b mesa: fix double-underscore naming 2010-08-27 10:21:59 -06:00