Commit Graph

49174 Commits

Author SHA1 Message Date
Matt Turner 275ac7e5c1 automake: src/mesa/drivers/osmesa 2012-01-30 21:09:18 -05:00
Kenneth Graunke e3b5200496 glsl: Rename class variable_entry to ir_variable_refcount_entry.
Exporting a publicly visible class with a generic name like
"variable_entry" via ir_variable_refcount.h is kind of mean.

Many IR transformers would like to define their own "variable_entry"
class.  If they accidentally include this header, the compiler/linker
may get confused and try to instantiate the wrong variable_entry class,
leading to bizarre runtime crashes.

The hope is that renaming this one will allow .cpp files to safely
declare and use their own file-scope "variable_entry" classes.

This avoids crashes caused by converting src/glsl to automake.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-and-tested-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-01-30 17:44:52 -08:00
Marek Olšák bed20f02a7 r600g: get rid of r600_context_reg
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-01-31 02:18:32 +01:00
Marek Olšák 85db520251 r600g: don't use r600_context_reg on r6xx-r7xx
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-01-31 02:18:30 +01:00
Marek Olšák b1b969f670 r600g: don't use r600_context_reg on evergreen
Just getting rid of things which use the register mask.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-01-31 02:18:27 +01:00
Marek Olšák 9344ab382a r600g: get rid of the mask in r600_pipe_reg
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-01-31 02:18:23 +01:00
Marek Olšák 4a058aebb2 r600g: get rid of the mask parameter in pipe_state_add_reg
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-01-31 02:18:18 +01:00
Marek Olšák 0569f13d2b r600g: don't use register mask for TA_CNTL_AUX
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-01-31 02:18:16 +01:00
Marek Olšák a494301f7f r600g: don't use register mask for PA_CL_CLIP_CNTL
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-01-31 02:18:13 +01:00
Marek Olšák 97acf2ca59 r600g: don't use register mask for PA_CL_VS_OUT_CNTL
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-01-31 02:18:07 +01:00
Marek Olšák 121940ecc7 r600g: set full register mask for PA_CL_CLIP_CNTL
We don't set the other bits anywhere else.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-01-31 02:18:03 +01:00
Marek Olšák a652cc40b9 r600g: don't use register mask for PA_SU_SC_MODE_CNTL
It's always emitted in draw_vbo.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-01-31 02:18:00 +01:00
Marek Olšák 2000086fcd r600g: don't add PA_SC_LINE_STIPPLE to rasterizer_state
It's always emitted in draw_vbo.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-01-31 02:17:56 +01:00
Marek Olšák 84b4b2a8aa r600g: don't use register mask for CB_COLOR_CONTROL on r6xx-r7xx
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-01-31 02:17:53 +01:00
Marek Olšák 9c0b50ca0b r600g: don't set CB_TARGET_MASK in set_framebuffer_state
It's emitted in draw_vbo, always.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-01-31 02:17:50 +01:00
Marek Olšák 2ffa8af9db r600g: set full register mask for CB_COLOR_CONTROL on evergreen
We don't set the other bits anywhere else.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-01-31 02:17:46 +01:00
Marek Olšák e3032a0523 r600g: use a more clever way to disable per-vertex point size
This uses point size clamping to force point size to a particular value,
making the vertex shader output irrelevant.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-01-31 02:17:37 +01:00
Marek Olšák b6233f4d2e r600g: don't use register mask for DB_RENDER_CONTROL
We don't set the other bits anywhere else except the other DSA states,
which are mutually-exclusive with this one.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-01-31 02:17:32 +01:00
Marek Olšák 3d061caaed r600g: cleanup setting DB_SHADER_CONTROL
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-01-31 02:17:29 +01:00
Marek Olšák a2361946e7 r600g: rework and consolidate stencilref state setting
Stop using the register mask.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-01-31 02:17:25 +01:00
Marek Olšák 5345e3ea86 r600g: don't use register mask for SQ_GPR_RESOURCE_MGMT_1
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-01-31 02:15:51 +01:00
Marek Olšák 177845daa1 st/mesa: kill off point size clamping in vertex shaders
This fixes the gl_PointSize transform feedback test.
Point size clamping should happen at the rasterizer stage,
i.e. after the vertex and geometry shaders and transform feedback.

Drivers are expected to do this by themselves.
2012-01-31 00:54:34 +01:00
Marek Olšák f183cc9ce3 r600g: set minimum point size to 1.0 for non-sprite non-aa points 2012-01-31 00:54:34 +01:00
Marek Olšák ac3a765589 r300g: set minimum point size to 1.0 for non-sprite non-aa points 2012-01-31 00:54:34 +01:00
Marek Olšák cb43954308 svga: set POINTSIZEMIN to 1.0 for non-sprite non-aa points
v2: add the helper function, improve the condition
2012-01-31 00:54:34 +01:00
Marek Olšák b478fcb9a9 st/mesa: simplify initialization of light_twoside
Core Mesa does this for us, see update_two_size in state.c.

Reviewed-by: Brian Paul <brianp@vmware.com>
2012-01-31 00:54:34 +01:00
Brian Paul 6e9a1650e5 mesa: consolidate general ubyte texstore code
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-01-30 13:01:08 -07:00
Brian Paul 4c7e44e8e6 mesa: use _mesa_pack_ubyte_rgba_rect() in texstore code
Simplifies the general case code in the ubyte-valued texture format
functions.  More consolidation to come in subsequent commits.

Reviewed-by: Eric Anholt <eric@anholt.net>
2012-01-30 13:01:08 -07:00
Brian Paul 66940ad2d7 mesa: added _mesa_pack_ubyte_rgba_rect()
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-01-30 13:01:08 -07:00
Eric Anholt ff2497dca3 dri: Add a default drirc to be installed to provide application workarounds.
Specifially, this being present works around a bug in Unigine
Sanctuary on i965 which previously resulted in bad rendering.

NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-01-30 11:44:24 -08:00
Eric Anholt 642247883f i965: Add a driconf option to force GLSL extension behavior to "warn".
This can be used to work around broken application behavior, like in
Unigine where it attempts to use texture arrays without declaring
either "#extension GL_EXT_texture_array : enable" or "#version 130".

NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-01-30 11:44:11 -08:00
Eric Anholt b9e27cc142 mesa: Add a flag for forcing all GLSL extensions to "warn".
NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-01-30 11:41:49 -08:00
Eric Anholt 61b9ccd9e2 intel: Use libdrm's decode functionality instead of the gpu-tools copy.
While typing out the new decode, I added a fallback mode for dumping
when we fail to re-map the BO after execution.  This should get us a
minimal dump when trying to dump a batch that results in a GPU hang.
2012-01-30 11:32:55 -08:00
Eric Anholt 493faa010d i965: Fix segfault with INTEL_DEBUG=batch on gen7 with samplers present.
This was a leftover from the conversion of this file for state streaming.
2012-01-30 11:32:55 -08:00
Eric Anholt 9195191e50 i965/vs: Avoid allocating registers in to the gen7 MRF hack region.
This is the corresponding fix to the previous one for the FS, but I
don't have a particular test for it.

NOTE: This is a candidate for the 8.0 branch.
2012-01-30 11:32:55 -08:00
Eric Anholt e910241e97 i965/fs: Fix rendering corruption in unigine tropics.
We were allocating registers into the MRF hack region, resulting in
sparkly renering in a few of the scenes.  We could do better
allocation by making an MRF class, having MRFs conflict with the
corresponding GRFs, and tracking the live intervals of the "MRF"s and
setting up the conflicts.  But this is way easier for the moment.

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-01-30 11:32:55 -08:00
Eric Anholt b9aab8b3b3 autoconf: Enable missing-prototypes errors when available.
After the removal of the dri driver link test, this should help avoid
the original problem that it was designed to catch: The warning about
a missing prototype due to typoing a function name scrolling by in the
Mesa build spew, and you not noticing until you try to run an
application and it falls back to swrast.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-01-30 11:32:54 -08:00
Matt Turner ef3cec5804 Rename R300_NO_TCL envvar to RADEON_NO_TCL
The envvar works for R100 and R200 too, and the classic R300 driver
doesn't even exist anymore.

"RADEON_NO_TCL" is already mentioned in the code and is the same envvar
used for the R300g driver.
2012-01-30 14:24:03 -05:00
José Fonseca 647ca47cc3 gallivm: Don't use C99 member initializers. 2012-01-30 19:05:58 +00:00
José Fonseca dde807b9dc gallivm: Move declaration before code. 2012-01-30 18:59:29 +00:00
ojab 25ee5a27f3 Use only native engine & bitwriter LLVM libraries for linking.
Signed-off-by: José Fonseca <jfonseca@vmware.com>
2012-01-30 18:51:59 +00:00
Tom Stellard bc2875aa48 gallivm: Add a new interface for doing TGSI->LLVM conversions
lp_bld_tgsi_soa.c has been adapted to use this new interface, but
lp_bld_tgsi_aos.c has only been partially adapted, since nothing in
gallium currently uses it.

v2:
- Rename lp_bld_tgsi_action.[ch] => lp_bld_tgsi_action.[ch]
- Initialize tgsi_info in lp_bld_tgsi_aos.c
- Fix copyright dates
2012-01-30 13:37:01 -05:00
Tom Stellard 82b71db03d gallium: Move duplicated helper macros to tgsi_exec.h 2012-01-30 13:37:00 -05:00
Tom Stellard 6b63e25b3d gallium: Prefix #defines in tgsi_exec.h with TGSI_ 2012-01-30 13:37:00 -05:00
Tom Stellard 9ee1bcf7a5 gallium: Unify defines of CHAN_[XYZW] in tgsi_exec.h 2012-01-30 13:37:00 -05:00
Tom Stellard 5204974462 gallivm: Add function lp_bld_gather_values() 2012-01-30 13:37:00 -05:00
Tom Stellard df16945790 tgsi: Add output_mode to struct tgsi_opcode_info v2
v2:
- Rename output_type to output_mode
- Add shorthand definitions for TGSI_OUTPUT_*
2012-01-30 13:37:00 -05:00
Benjamin Franzke c72d7df168 st/dri: Support 24bit formats in dri2_allocate_buffer
Prior commit 576161289d,
the parameter format was bpp, thus both 24bit and 32bit formats were
requested with format set to 32. Handle 24bit seperately now.

Fixes RGBX formats in wayland platform for egl_dri2 (EGL_ALPHA_SIZE=0).

Note: This is a candidate for the 8.0 branch.
2012-01-30 17:15:44 +01:00
Dave Airlie fef395c0c3 mesa/format_unpack: add LUMINANCE 8/16 UINT/INT
This just copies what the LUMINANCE_ALPHA bits do.

Fixes piglit tests on softpipe complaining about missing unpack.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-01-30 13:55:15 +00:00
Dave Airlie 29cf90b414 r600g: fix udiv/idiv/umod/imod on cayman
Cayman needs some of the MUL instructions spread across a full slot
of vectors.

It also no longer has RECIP_UINT, the recommendation is to replace it
with a U2F + RECIP_IEEE + MUL + F2U.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-01-30 13:53:15 +00:00