Commit Graph

41161 Commits

Author SHA1 Message Date
Jerome Glisse 15753cf54d r600g: avoid using pb* helper we are loosing previous cpu cycle with it
r600g is up to a point where all small CPU cycle matter and pb* turn
high on profile. It's mostly because pb try to be generic and thus
trigger unecessary check for r600g driver. To avoid having too much
abstraction & too much depth in the call embedded everythings into
r600_bo. Make code simpler & faster. The performance win highly depend
on the CPU & application considered being more important on slower CPU
and marginal/unoticeable on faster one.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-12-09 16:07:01 -05:00
Fabian Bieler ef534f3838 glsl: fix lowering conditional returns in subroutines
this fix applies to the lower_sub_return 'branch' of the lower_jumps pass

Fixes piglit tests glsl-functions-5 and glsl-functions-6.
2010-12-09 11:28:06 -08:00
Eric Anholt 834cc8e501 i965: remove unused variable since brw_wm_glsl.c removal. 2010-12-09 11:11:04 -08:00
Eric Anholt cfcc2ef587 i965: Set render_cache_read_write surface state bit on gen6 constant surfs.
This is said to be required in the spec, even when you aren't doing writes.
2010-12-09 11:11:04 -08:00
Eric Anholt 30f25a1019 i965: Set up the correct texture border color state struct for Ironlake.
This doesn't actually fix border color on Ironlake, but it appears to
be a requirement, and gen6 needs it too.
2010-12-09 10:51:00 -08:00
Eric Anholt 14a9153a32 i965: Clean up VS constant buffer location setup. 2010-12-09 10:51:00 -08:00
Eric Anholt 8fab1c0e2e i965: Fix VS constants regression pre-gen6.
Last minute change for gen6 with 0 used params dropped the multiply.
2010-12-09 10:50:59 -08:00
José Fonseca cdd4f04f80 llvmpipe: Plug fence leaks. 2010-12-09 16:48:26 +00:00
Shuang He 9946f15d30 mesa: allow GLfixed arrays for OpenGL ES 2.0
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-12-09 08:23:54 -07:00
Chia-I Wu 0c0eda393a mesa: Fix glTexCoordPointer with type GL_FIXED.
GL_FIXED is also a legal type for glTexCoordPointer.
2010-12-09 19:37:56 +08:00
Chia-I Wu 2d270ac090 mesa: Fix GL_FIXED arrays.
It is broken since 433e5e6def.
2010-12-09 19:25:05 +08:00
Eric Anholt 05e534e6c4 i965: Drop push-mode reladdr constant loading and always use constant_map.
This eases the gen6 implementation, which can only handle up to 32
registers of constants, while likely not penalizing real apps using
reladdr since all of those I've seen also end up hitting the pull
constant buffer.  On gen6, the constant map means that simple NV VPs
fit under the 32-reg limit and now succeed.  Fixes around 10 testcases.
2010-12-08 22:26:18 -08:00
Alex Deucher fd543e1f95 radeon: bump mip tree levels to 15
I forgot to bump this when I bumped the tex levels.
2010-12-09 00:16:02 -05:00
Brian Paul 09a5e028a6 mesa: simplify target checking for TexImage functions 2010-12-08 21:38:35 -07:00
Brian Paul 7404fa3f07 mesa: revamp error checking for compressed texture images
Simplify some code, remove unneeded checks, etc.
2010-12-08 21:38:35 -07:00
Chad Versace f0f2ec4d8a glsl: In ast_to_hir, check sampler array indexing
Raise error if a sampler array is indexed with a non-constant expression.

From section 4.1.7 of the GLSL 1.30 spec:
  "Samplers aggregated into arrays within a shader (using square
  brackets [ ]) can only be indexed with integral constant
  expressions [...]."
2010-12-08 18:53:53 -08:00
Eric Anholt d547ab150a i965: Drop KIL_NV from the ff/ARB_fp path since it was only used for GLSL. 2010-12-08 11:14:52 -08:00
Eric Anholt dba6fde08c i965: Use the new pixel mask location for gen6 ARB_fp KIL instructions.
Fixes:
fp-kil
fp-generic/kil-swizzle.
2010-12-08 11:14:35 -08:00
Eric Anholt 39eaacff14 i965: Set the render target index in gen6 fixed-function/ARB_fp path.
Fixes:
fbo-drawbuffers2-blend
fbo-drawbuffers2-colormask
2010-12-08 10:51:04 -08:00
Eric Anholt 4b4dc778b6 i965: Set up the per-render-target blend state on gen6.
This will let us get EXT_draw_buffers2 blending and colormasking working.
2010-12-08 10:50:57 -08:00
Eric Anholt 0d3b8a5cc2 i965: Set up the color masking for the first drawbuffer on gen6.
Fixes glean/maskedClear
2010-12-08 09:53:16 -08:00
Chia-I Wu d2028ba339 mesa: Do not advertise GL_OES_texture_3D.
GL_OES_texture_3D has a GLSL counterpart.  Since it is not implemented,
GL_OES_texture_3D should not be advertised.
2010-12-08 22:35:40 +08:00
Chia-I Wu 98ee6739d9 vbo: Fix GLES2 glVertexAttrib.
Attribute 0 has no special meaning in GLES2.  Add VertexAttrib4f_nopos
for that purpose and make _es_VertexAttrib* call the new function.

Rename _vbo_* to _es_* to avoid confusion.  These functions are only
used by GLES, and now some of them (_es_VertexAttrib*) even behave
differently than vbo_VertexAttrib*.
2010-12-08 22:19:19 +08:00
Chia-I Wu 9f0d7dd259 vbo: Drop second ATTR macro.
There is no need to have a special version of ATTR for
!FEATURE_beginend, since 81ccb3e2ce.
2010-12-08 22:18:37 +08:00
Brian Paul 7da704ee72 configure: use llvm-config --cppflags instead of --cflags 2010-12-08 06:45:00 -07:00
Brian Paul c64447f47d mesa: make _mesa_test_proxy_teximage() easier to read 2010-12-07 21:37:20 -07:00
Brian Paul 4ff70b7a8f mesa: consolidate glCompressedTexImage1/2/3D() functions 2010-12-07 21:37:20 -07:00
Brian Paul 1c23b860ce mesa: consolidate glCopyTexSubImage1/2/3D() functions 2010-12-07 21:37:20 -07:00
Brian Paul 11f386fb50 mesa: consolidate glCopyTexImage1/2D() code 2010-12-07 21:37:19 -07:00
Brian Paul 45124e043d mesa: consolidate the glTexSubImage1/2/3D() functions 2010-12-07 21:37:19 -07:00
Brian Paul 35f620d55c mesa: simplify proxy texture code in texture_error_check() 2010-12-07 21:37:19 -07:00
Marek Olšák c4f9e55d61 r300/compiler: remove at least unused immediates if externals cannot be removed 2010-12-08 04:39:51 +01:00
Marek Olšák 2ff9d4474b r300/compiler: make lowering passes possibly use up to two less temps
CMP may now use two less temps, other non-native instructions may end up
using one less temp, except for SIN/COS/SCS, which I am leaving unchanged
for now.

This may reduce register pressure inside loops, because the register
allocator doesn't do a very good job there.
2010-12-08 04:39:51 +01:00
Marek Olšák 93f2df0760 r300/compiler: handle DPH and XPD in rc_compute_sources_for_writemask
This bug can only be triggered if you put deadcode before native rewrite.
2010-12-08 04:39:50 +01:00
Marek Olšák 95080fb50f r300/compiler: do not print pair/tex/presub program stats for vertex shaders 2010-12-08 04:39:50 +01:00
Marek Olšák 8fac29d49e r300/compiler: cleanup rc_run_compiler 2010-12-08 04:39:50 +01:00
Marek Olšák 2592a8f506 r300/compiler: add a function to query program stats (alu, tex, temps..) 2010-12-08 04:39:50 +01:00
Marek Olšák 431b4c0c84 r300/compiler: don't terminate regalloc if we surpass max temps limit
The same check is already in a later pass (translate_vertex_program).
2010-12-08 04:39:50 +01:00
Eric Anholt 2f07a744f1 i965: Don't try to store gen6 (float) blend constant color in bytes.
Fixes glean/blendFunc
2010-12-07 19:33:47 -08:00
Ian Romanick 002cd2c8d4 linker: Fix regressions caused by previous commit
That's what I get for not running piglit before pushing.

Don't try to patch types of unsized arrays when linking fails.

Don't try to patch types of unsized arrays that are shared between
shader stages.
2010-12-07 19:00:44 -08:00
Ian Romanick 6f53921c4b linker: Ensure that unsized arrays have a size after linking
Fixes piglit test case glsl-vec-array (bugzilla #31908).

NOTE: This bug does not affect 7.9, but I think this patch is a
candiate for the 7.9 branch anyway.
2010-12-07 18:32:16 -08:00
Eric Anholt b2167a6c01 i965: Fix flipped value of the not-embedded-in-if on gen6.
Fixes:
glean/glsl1-! (not) operator (1, fail)
glean/glsl1-! (not) operator (1, pass)
2010-12-07 17:46:47 -08:00
Ian Romanick b0fc5103cb glsl: Inherrit type of declared variable from initializer
Types of declared variables and their initializer must match excatly
except for unsized arrays.  Previously the type inherritance for
unsized arrays happened implicitly in the emitted assignment.
However, this assignment is never emitted for uniforms.  Now that type
is explicitly copied unconditionally.

Fixes piglit test array-compare-04.vert (bugzilla #32035) and
glsl-array-uniform-length (bugzilla #31985).

NOTE: This is a candidate for the 7.9 branch.
2010-12-07 16:36:44 -08:00
Eric Anholt 7ca7e9b626 i965: Work around gen6 ignoring source modifiers on math instructions.
With the change of extended math from having the arguments moved into
mrfs and handed off through message passing to being directly hooked
up to the EU, it looks like the piece for doing source modifiers
(negate and abs) was left out.

Fixes:
fog-modes
glean/fp1-ARB_fog_exp test
glean/fp1-ARB_fog_exp2 test
glean/fp1-Computed fog exp test
glean/fp1-Computed fog exp2 test
ext_fog_coord-modes
2010-12-07 15:11:27 -08:00
Eric Anholt 2d7dfb8446 i965: Add disabled debug code for dumping out the WM constant payload.
This can significantly ease thinking about the asm.
2010-12-07 15:11:27 -08:00
Ian Romanick 6848e27e14 i965: Correctly emit constants for aggregate types (array, matrix, struct)
Previously the code only handled scalars and vectors.  This new code
is modeled somewhat after similar code in ir_to_mesa.

Reviewed-by: Eric Anholt <eric@anholt.net>
2010-12-07 15:03:14 -08:00
Jerome Glisse b7617346dc r600g: fix userspace fence against lastest kernel
R6XX GPU doesn't like to have two partial flush writting
back to memory in row without a prior flush of the pipeline.
Add PS_PARTIAL_FLUSH to flush all work between the CP and
the ES, GS, VS, PS shaders.

Thanks a lot to Alban Browaeys (prahal on irc) for investigating
this issue.

Signed-off-by: Alban Browaeys <prahal@yahoo.com>
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-12-07 17:54:56 -05:00
Jerome Glisse 69251fc4cd r600g: remove dead code
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-12-07 16:14:18 -05:00
Eric Anholt fa0d5a2c5b i965: Always hand the absolute value to RSQ.
gen6 builtin RSQ apparently clamps negative values to 0 instead of
returning the RSQ of the absolute value like ARB_fragment_program
desires and pre-gen6 apparently does.

Fixes:
glean/fp1-RSQ test 2 (reciprocal square root of negative value)
glean/vp1-RSQ test 2 (reciprocal square root of negative value)
2010-12-07 13:13:27 -08:00
Ian Romanick 6d36be508f glsl: Ensure that equality comparisons don't return a NULL IR tree
This fixes bugzilla #32035 and piglit test case array-compare-01 and
array-compare-02.

NOTE: This is a candidate for the 7.9 branch.
2010-12-07 12:50:38 -08:00