Vinson Lee
989c60bc92
mesa: Add missing headers to debug.h.
2010-07-29 22:41:03 -07:00
Vinson Lee
dfc7b7212f
intel: Add missing header.
...
Add context.h for NEED_SECONDARY_COLOR symbol.
2010-07-29 19:10:14 -07:00
Vinson Lee
ebdc537ff7
dri: Add missing header to dri_metaops.c.
...
Add context.h for FLUSH_VERTICES symbol.
2010-07-29 19:04:43 -07:00
Vinson Lee
7e54c4a646
mesa: Reduce clear.h header file inclusion.
2010-07-29 18:15:41 -07:00
Vinson Lee
e5c128379a
mesa: Reduce bufferobj.h header file inclusion.
...
Directly include mtypes.h instead of including context.h to include
mtypes.h.
2010-07-29 18:03:20 -07:00
Vinson Lee
bbe1385201
mesa: Remove unnecessary headers.
2010-07-29 17:14:32 -07:00
Brian Paul
e75da1a8d6
llvmpipe: fix on-debug build breakage
2010-07-29 17:49:49 -06:00
Brian Paul
6c1625cc40
llvmpipe: added some jit debug code
...
If we crash in the jitted function we can examine jit_line and
jit_state in gdb to learn more about the shader.
2010-07-29 17:31:18 -06:00
Brian Paul
b4c8de1ff2
draw: do bounds checking of array elements (debug only)
...
Make sure that all the element indexes actually lie inside the vertex
buffer.
Also, rename pipe_run() to pipe_run_elts() to be more specific.
And assert/check the vertex count for the non-indexed case.
2010-07-29 17:25:54 -06:00
Brian Paul
d88b6e19c1
draw: assorted clean-ups in clipper code
2010-07-29 17:25:54 -06:00
Brian Paul
ba2cc3b8e6
gallium: implement bounds checking for constant buffers
...
Plumb the constant buffer sizes down into the tgsi interpreter where
we can do bounds checking. Optional debug code warns upon out-of-bounds
reading. Plus add a few other assertions in the TGSI interpreter.
2010-07-29 17:25:54 -06:00
Brian Paul
8a2933f366
draw: add vertex buffer offset in draw_print_arrays()
2010-07-29 17:25:54 -06:00
Brian Paul
d1f38baa01
llvmpipe: silence warnings in lp_test_sincos.c
2010-07-29 17:25:54 -06:00
Jerome Glisse
7a73390f91
r600g: mipmap early support + EX2/ABS instruction + culling
...
Add mipmap support (demos/src/redbook/mipmap is working)
Add EX2/ABS shader instruction support.
Add face culling support.
Misc fixes.
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-07-29 19:05:57 -04:00
Eric Anholt
0cf545ec69
glsl2: Do ir_if_return on the way out, not the way in.
...
The problem with doing it on the way in is that for a function with
multiple early returns, we'll move an outer block in, then restart the
pass, then move the two inside returns out, then never move outer
blocks in again because the remaining early returns are inside an else
block and they don't know that there's a return just after their
block. By going inside-out, we get the early returns stacked up so
that they all move out with a series of
move_returns_after_block().
Fixes (on i965):
glsl-fs-raytrace-bug27060
glsl-vs-raytrace-bug26691
2010-07-29 15:56:17 -07:00
Kristian Høgsberg
e3e25dee20
glx: Fix copy/paste bug in glXWaitX and glXWaitGL
...
https://bugs.freedesktop.org/show_bug.cgi?id=29304
2010-07-29 18:49:10 -04:00
Kristian Høgsberg
f485ee724d
glx: Compare old ctx against dummyCtx, not NULL
...
https://bugs.freedesktop.org/show_bug.cgi?id=29302
2010-07-29 18:49:10 -04:00
Eric Anholt
a62ef12ef2
glsl2: Make sure functions end with a return before doing ir_if_return.
...
This catches a few remaining functions that weren't getting inlined,
generally operating on global or out variables and using an early
return to skip work when possible.
Fixes for i965:
glsl1-function with early return (3)
2010-07-29 15:19:44 -07:00
Eric Anholt
18964618a1
glsl2: Make ir_if_return handle if () { return } else { not return }
...
This makes many remaining functions inlinable.
Fixes for i965:
glsl1-function with early return (1)
glsl1-function with early return (2)
2010-07-29 15:19:37 -07:00
Eric Anholt
92a3768cef
glsl2: Refactor a bit of ir_if_return for the next changes.
2010-07-29 15:19:37 -07:00
Eric Anholt
806cb9f952
ir_to_mesa: Don't emit a duplicate return at the end of a function.
...
It was harmless, but ugly.
2010-07-29 15:19:37 -07:00
Eric Anholt
0e19922558
glsl2: Allow use of _mesa_print_ir without a parse state on hand.
2010-07-29 15:09:31 -07:00
Eric Anholt
ee4b4bab68
ir_constant_variable: Don't mark variable from outside our scope as constant.
...
Fixes (with software, except for alpha):
glsl1-function with early return(3)
2010-07-29 15:09:28 -07:00
Eric Anholt
bf496862be
glsl2: When dumping IR for debug, indent nested blocks.
...
No more trying to match parens in my head when looking at the body of
a short function containing an if statement.
2010-07-29 14:38:04 -07:00
Eric Anholt
9a8eb684d4
glsl2: When dumping IR for debug, skip all the empty builtin prototypes.
2010-07-29 14:38:04 -07:00
Eric Anholt
62c4763b70
glsl2: Fix spelling of "sentinel."
2010-07-29 14:02:19 -07:00
Eric Anholt
fa33d0b854
glsl2: Fix spelling of "initializer."
2010-07-29 14:02:19 -07:00
Eric Anholt
4285247f12
glsl2: Remove an inlined unvalued return statement.
...
We already have asserts that it was the last call in the function, so
it's safe to remove after it got cloned in.
Fixes:
glsl-fs-functions-4.
2010-07-29 14:02:10 -07:00
Kristian Høgsberg
cd601513f5
glx: Fix linked list deletion in __glXCloseDisplay()
...
I hate single linked lists.
2010-07-29 16:03:44 -04:00
Kristian Høgsberg
32ea539417
intel: Declare the various tracked state variables using "extern"
2010-07-29 15:45:49 -04:00
Kristian Høgsberg
be9276d912
intel: Don't depend on context config values when picking texture formats
2010-07-29 15:45:48 -04:00
Kristian Høgsberg
e8a72460b7
egl_dri2: Set API version for DRM display
2010-07-29 15:08:00 -04:00
Marek Olšák
d8d7a3e0f9
r300g/swtcl: fix crash in ETQW and minor fixups
...
The Draw flush inside r300_flush was the culprit.
Also, no need to flush Draw when changing a state since the flush is
already inside swtcl_draw_vbo.
2010-07-29 20:57:18 +02:00
Marek Olšák
3f4680d8e2
r300g/swtcl: fix crash after the draw_vbo merge
2010-07-29 20:57:17 +02:00
Brian Paul
330852b3b3
llvmpipe: also test the new lp_build_assert() function
2010-07-29 12:51:45 -06:00
Brian Paul
d05cb9f018
llvmpipe: don't call LLVMCreateJITCompiler() twice
...
Fixes a failed assertion with LLVM 2.6:
<unnamed>::JITResolver::JITResolver(llvm::JIT&): Assertion
`TheJITResolver == 0&& "Multiple JIT resolvers?"' failed.
Though, not everyone seems to experience this problem.
2010-07-29 12:51:45 -06:00
Brian Paul
8f3fe7e2f0
gallivm: added lp_build_assert() function to make assertions in LLVM code
2010-07-29 12:51:45 -06:00
José Fonseca
02da55676b
Revert "gallivm: fix lp_build_sample_offset() crash when indexing a 1-D texture"
...
This reverts commit 5f90e76c54 .
Bad cherry-pick.
2010-07-29 19:38:02 +01:00
Brian Paul
5f90e76c54
gallivm: fix lp_build_sample_offset() crash when indexing a 1-D texture
...
If y==NULL and y_stride==NULL it means the texture is 1D. Return
zero for out_i and the offset instead of garbage.
2010-07-29 19:19:05 +01:00
Keith Whitwell
a258701cd9
util: add uint version of pack_z_stencil
...
Useful for packing mask values.
2010-07-29 19:15:10 +01:00
José Fonseca
bdaa8be5b7
scons: Use the current python executable for code generation.
...
Less susceptible to be broken.
2010-07-29 19:11:50 +01:00
José Fonseca
111902f2c4
draw: Also emit EMMS on generated LLVM IR.
2010-07-29 19:11:06 +01:00
José Fonseca
e3d2ebac11
llvmpipe: Avoid corrupting the FPU stack with MMX instructions on 32bit OSes.
...
Unfortunately LLVM doesn't emit EMMS itself, and there is no
easy/effective way to disable MMX.
http://llvm.org/bugs/show_bug.cgi?id=3287
2010-07-29 19:10:59 +01:00
José Fonseca
38f5b1bc38
util: Don't include xmmintrin.h.
...
Unnecessary.
2010-07-29 19:10:56 +01:00
Brian Paul
b4ad7c2843
mesa: implement RCC opcode
2010-07-29 08:23:59 -06:00
Brian Paul
275bae875d
mesa: update table of opcodes used by GLSL
2010-07-29 08:23:33 -06:00
Andre Maasikas
9b3bf392e1
r600: since 8744c36e added asserts - use another random register for shader with no output
2010-07-29 15:18:19 +03:00
Chia-I Wu
ab25c1597d
st/python: Adapt to interface change.
...
This is only compile tested.
2010-07-29 19:40:21 +08:00
Chia-I Wu
d4d62b6178
graw/tests: Use pipe_context::draw_vbo.
...
The other drawing variants such as draw_arrays or
draw_elements_instanced were removed.
This fixes fdo bug #29287 .
2010-07-29 16:21:10 +08:00
Chia-I Wu
92f9b05499
gallium: Avoid void pointer arithmetic.
...
This fixes fdo bug #29286 .
2010-07-29 15:55:14 +08:00