Commit graph

37526 commits

Author SHA1 Message Date
Vinson Lee
a6859f5ccc r300g: Remove unnecessary headers. 2010-08-05 23:58:00 -07:00
Dave Airlie
5f6ab5e259 r600g: start to fix up multiple targets.
fixup exports from pixel shader for multi-cbs + depth buffer writing.

Still crashes GPU running any of the multi-buffer or depth writing
2010-08-06 16:05:24 +10:00
Chia-I Wu
642d5ba79a draw: Remove unnecessary vertex flag ANDs.
Vertex flags are a contract between vcache and the pipeline.  They are
set only for the first vertex of a primitive.
2010-08-06 13:39:37 +08:00
Chia-I Wu
f1fc444bb0 draw: Mask out vertex flags in GS and stream output.
This fixes out-of-bound access to the vertices.
2010-08-06 13:39:37 +08:00
Chia-I Wu
eb3c6ddafb draw: Include draw_decompose_tmp.h in draw_pt_decompose.h.
Use draw_decompose_tmp.h to replace pipeline primitive decomposer.
2010-08-06 13:39:36 +08:00
Chia-I Wu
94d256591d draw: Include draw_decompose_tmp.h in draw_so_emit_tmp.h.
Use draw_decompose_tmp.h to replace stream out primitive decomposer.
2010-08-06 13:39:36 +08:00
Chia-I Wu
23176779f8 draw: Include draw_decompose_tmp.h in draw_gs_tmp.h.
Use draw_decompose_tmp.h to replace GS primitive decomposer.
2010-08-06 13:39:36 +08:00
Chia-I Wu
8a41b18b7d draw: Include draw_decompose_tmp.h in draw_pt_vcache_tmp.h.
Use draw_decompose_tmp.h to replace vcache primitive decomposer.  As the
new decomposer supports primitives with adjacency, vcache_triangle_adj
and vcache_line_adj (and their variants that have flags) are added.
2010-08-06 13:39:36 +08:00
Chia-I Wu
524b2626c2 draw: Add draw_decompose_tmp.h.
Including draw_decompose_tmp.h defines a primitive decomposer.  It is
intended to replace the existing vcache/so/gs/pipe decomposers.

This is based on draw_pt_vcache_tmp.h.
2010-08-06 13:39:36 +08:00
Dave Airlie
0a2a6c75bf r600g: add SRGB support.
This enables GL2.1 and passes glean's texture_srgb test.
2010-08-06 15:21:44 +10:00
Dave Airlie
fc47cb9d71 r600g: fixup z format translations.
this enables GL_EXT_packed_depth_stencil. fbo-d24s8 passes
2010-08-06 15:06:25 +10:00
Dave Airlie
b8de7788a4 r600g: fix targetmask to work correctly.
At least this seems to fix the glean maskedClear test.
2010-08-06 14:54:24 +10:00
Dave Airlie
2b90364765 r600g: improve supported format selection.
This fixes fbo-readpixels piglit test, and adds support for swapping
the formats. Not all formats are correct yet I don't think.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-08-06 14:53:38 +10:00
Dave Airlie
121a625c16 r600g: add bo wait after map. 2010-08-06 11:46:52 +10:00
Vinson Lee
f717fd25cc st/mesa: Clean up header file inclusion in st_program.h.
st_program.h
Remove p_shader_tokens.h
Include st_context.h for st_context symbol.
Include p_state.h for PIPE_MAX_SHADER_INPUTS symbol.
Remove unnecessary forward declarations.

st_cb_bitmap.c
st_cb_clear.c
Include p_shader_tokens.h now that st_program.h doesn't include it.
2010-08-05 18:21:09 -07:00
Marek Olšák
4d10ec4f18 r300g: do not emit GB_Z_PEQ_CONFIG on non-r500 if DRM < 2.6.0 2010-08-06 03:14:43 +02:00
Ian Romanick
0a86d766ef ir_to_mesa: Handle texture-array samplers
Fixes piglit test array_texture.
2010-08-05 17:57:48 -07:00
Jakob Bornecrantz
1a3a04d56b tgsi: Fix typo, so we follow what is in the comments 2010-08-05 17:53:48 -07:00
Ian Romanick
4f397e1d64 glsl2: Enable all supported extensions in stand-alone compiler 2010-08-05 17:50:13 -07:00
Jakob Bornecrantz
9f5c1194ff tgsi: Add option to stop the sanity checker from printing 2010-08-05 17:44:05 -07:00
Ian Romanick
0a09d679ca glsl_type: Don't have two versions of a type with the same name
Previously some sampler types were duplicated in GLSL 1.30 and
GL_EXT_texture_array.  This resulted in not being able to find the
built-in sampler functions when the extension was used.  When the
built-in functions were compiled, they bound to the 1.30 version.
This caused a type mismatch when trying to find the function.  It also
resulted in a confusing error message:

0:0(0): error: no matching function for call to `texture2DArray(sampler2DArray, vec3)'
0:0(0): error: candidates are: vec4 texture2DArray(sampler2DArray, vec3)

0:0(0): error:                 vec4 texture2DArray(sampler2DArray, vec3, float)
2010-08-05 17:29:15 -07:00
Jakob Bornecrantz
4d65055b1f util: Add option to not dump cpu caps 2010-08-05 17:25:13 -07:00
Jakob Bornecrantz
981c6bc6a5 st/mesa: Only get debug option once 2010-08-05 17:25:13 -07:00
Jakob Bornecrantz
99611f0849 st/mesa: Only get mesa mvp dp4 option once
The correct for this is of course to do what comment says
2010-08-05 17:25:13 -07:00
Jakob Bornecrantz
e00b17830b llvmpipe: Only get no rast option once 2010-08-05 17:25:13 -07:00
Jakob Bornecrantz
4bd061b127 gallivm: Only get debug option once 2010-08-05 17:25:13 -07:00
Ian Romanick
1e0f0459e0 glsl2: Log a better error message when a matching function cannot be found 2010-08-05 17:21:39 -07:00
Vinson Lee
1b8aa2176c st/mesa: Clean up header file inclusion in st_mesa_to_tgsi.h.
st_mesa_to_tgsi.h
Replace tgsi_ureg.h with a forward declaration.
Include p_compiler.h for ubyte symbol.

st_program.c
Include tgsi_ureg.h directly.
2010-08-05 17:15:25 -07:00
Luca Barbieri
bf5ee5aa4f nvfx: fix nv30 vertex program scalar opcodes
Apparently they have always been broken, even before unification.

Fixes a lot of stuff, starting from morph3d and lighting in teapot
with textures disabled.
2010-08-06 01:28:14 +02:00
Luca Barbieri
3e231361f3 nvfx: shut up unknown cap 64 warning 2010-08-06 01:28:14 +02:00
Vinson Lee
0a7cbe845f st/mesa: Clean up header file inclusion in st_manager.h.
Include mtypes.h for GLcontext, gl_buffer_index, and GLframebuffer
symbols.
Include p_compiler.h for boolean symbol.
Include st_context.h in st_cb_eglimage.c as it previously included
st_context.h indirectly through st_manager.h.
2010-08-05 16:20:07 -07:00
Brian Paul
3d038a3ed2 glsl: fix atan(0, -1)
Fixes fd.o bug 29388

NOTE: this is a candidate for the 7.8 branch.
2010-08-05 16:39:09 -06:00
Eric Anholt
bc4034b243 glsl2: Add a pass to convert exp and log to exp2 and log2.
Fixes ir_to_mesa handling of unop_log, which used the weird ARB_vp LOG
opcode that doesn't do what we want.  This also lets the multiplication
coefficients in there get constant-folded, possibly.

Fixes:
glsl-fs-log
2010-08-05 15:34:00 -07:00
Alex Deucher
918ef7ff18 r600c: tiling require drm 2.6.0, not 2.5.0 2010-08-05 17:42:29 -04:00
Eric Anholt
8048226b7b glsl2: Insert global declarations at the top of the instruction stream.
Fixes use-before-decl in glslparsertest shaders.

Fixes:
CorrectFull.frag
CorrectModule.frag
2010-08-05 14:41:09 -07:00
Alex Deucher
e93d413a0d r600: add support for getting the tiling config via drm ioctl (v2)
Needed for the the 2D tiling span functions.

v2: rebase on new kernel, mesa changes

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2010-08-05 17:13:10 -04:00
Alex Deucher
3095bc679d r600: add new relocs for tiling support
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2010-08-05 17:12:52 -04:00
Alex Deucher
063c70d7f7 r600: add span support for 2D tiling
Requires tiling config ioctl support from the drm to use.
kms only.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2010-08-05 17:12:37 -04:00
Eric Anholt
0a0ab121f8 ir_structure_splitting: Massive fixing to this.
I'd missed putting in the actual "find structures to split" part, so
most of the code didn't do anything.  I was running on too large of an
app and assuming the lack of progress was elsewhere.
2010-08-05 13:40:09 -07:00
Eric Anholt
748f81a8ea glsl2: Make the HV actually call ir_texture's visit_leave. 2010-08-05 13:34:02 -07:00
Eric Anholt
7f7eaf0285 ir_structure_splitting: New pass to chop structures into their components.
This doesn't do anything if your structure goes through an uninlined
function call or if whole-structure assignment occurs.  As such, the
impact is limited, at least until we do some global copy propagation
to reduce whole-structure assignment.
2010-08-05 12:56:03 -07:00
Eric Anholt
c314c8f231 glsl2: Fix the dereferences_variable check in ir_tree_grafting.
The HV doesn't descend into ir_variable, which is generally a good
thing (allowing one to distinguish between variable declarations and
refs), but here we never saw tree grafting opportunities killed
because we were looking for the ir_variable child of a dereference to
get visited.

Fixes:
glsl1-function call with inout params
2010-08-05 12:56:03 -07:00
Eric Anholt
b259eb2804 glsl2: Don't tree-grafting out assignment to an out variable.
Fixes:
glsl-deadcode-varying.
2010-08-05 12:56:03 -07:00
Eric Anholt
9f82806c7b glsl2: Don't dead-code eliminate a call where the return value is unused.
This showed up since the disabling of inlining at compile time, which
I apparently didn't regenerate piglit summary for.

Fixes:
glsl-deadcode-call.
2010-08-05 12:56:03 -07:00
Eric Anholt
3bd7e70bf7 glsl2: Add some easy-to-enable debug printfs to ir_dead_code.cpp. 2010-08-05 12:56:02 -07:00
Jerome Glisse
9c949d4a4d r600g: don't use dynamic state allocation for states
Simplify state handly by avoiding state allocation.
Next step is to allocate once for all context packet
buffer and then avoid rebuilding pm4 packet each time
(through use of combined crc) this would also avoid
number of memcpy.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-05 15:41:35 -04:00
Joakim Sindholt
0633c2e683 targets/egl: fix build 2010-08-05 20:42:04 +02:00
Eric Anholt
e995f0e10c ir_to_mesa: Don't do function inlining until linking.
Optimizations at compile time should generally be done with the goal
of reducing instruction count so that other work, particularly
linking, is less time-consuming if the shader is used multiple times.
However, function inlining increases instruction count for the inlined
function bodies without removing the original function body, since we
don't know if it will be used at link time or not.

Reduces the runtime of linking and executing a Yo Frankie fragment
shader from 0.9 seconds to 0.5 seconds (-45.9%, +/- 2.2%, n=5).
2010-08-05 10:18:45 -07:00
Eric Anholt
2e853ca23c glsl2: Add a pass for removing unused functions.
For a shader involving many small functions, this avoids running
optimization across all of them after they've been inlined
post-linking.

Reduces the runtime of linking and running a fragment shader from Yo
Frankie from 1.6 seconds to 0.9 seconds (-44.9%, +/- 3.3%).
2010-08-05 10:18:31 -07:00
Marek Olšák
a4be3b6b31 r300g: fix fb_state atom size 2010-08-05 19:06:09 +02:00