Commit graph

46223 commits

Author SHA1 Message Date
Eric Anholt
6bd5f43f21 prog_optimize: Add support for saturates to _mesa_merge_mov_into_inst.
This fixes the remaining regression from ff_fragment_shader in Mesa IR
instruction count, to now being a 1.9% win overall.
2011-08-05 10:08:31 -07:00
Eric Anholt
9998df36c2 i965: Add dumping for gen6 WM constants too.
This looks just like the VS dump for now.
2011-08-05 10:08:31 -07:00
Eric Anholt
69dc529da2 mesa: Remove dead "MemPool" field of gl_shader_state. 2011-08-05 10:08:31 -07:00
Eric Anholt
ee0373b833 i965/fs: Don't upload unused uniform components.
This saves both register space and upload bandwidth for unused values.

Note that previously we were relying on the visitor not initially
generating references to different sets of uniforms between the 8-wide
and 16-wide code generation, and now we're relying on them dead-code
eliminating the same stuff, too.
2011-08-05 10:08:31 -07:00
Eric Anholt
0722edc59c i965/fs: Don't allocate the old backend's compile structs for our compile.
This saves some 35MB when the program only uses GLSL shaders.
2011-08-05 10:08:31 -07:00
Marek Olšák
5b005ecc2b winsys/radeon: do the CS cleanup in the CS ioctl thread 2011-08-05 07:08:18 +02:00
Marek Olšák
64ab39b035 winsys/radeon: fix space checking
We should remove the relocations which caused a validation failure
from the list, so that the kernel receives only the validated ones.

NOTE: This is a candidate for the 7.11 branch.
2011-08-05 07:08:18 +02:00
Marek Olšák
115651241b st/dri: remove an unused-but-set variable 2011-08-05 07:08:18 +02:00
Marek Olšák
a3cde50eff st/dri: remove a dummy function dri2_create_context
It does nothing besides calling dri_create_context with the same parameters.
2011-08-05 07:05:24 +02:00
Marek Olšák
6e7942936c st/mesa: remove unused-but-set variables in st_glsl_to_tgsi.cpp 2011-08-05 07:05:24 +02:00
Marek Olšák
d99c8e191b r300g: handle new CAPs 2011-08-05 07:05:24 +02:00
Marek Olšák
6b3bbf52b8 r300g: adapt to the resource_resolve interface change 2011-08-05 07:05:24 +02:00
Marek Olšák
c251d83d91 vbo: do not call _mesa_max_buffer_index in debug builds
That code drops performance in Unigine Heaven and Tropics
by a factor of 10. That's too crazy even for a debug build.

NOTE: This is a candidate for the 7.11 branch.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-08-05 07:05:24 +02:00
Chia-I Wu
547212d963 glsl: empty declarations should be valid
Unlike C++, empty declarations such as

  float;

should be valid.  The spec is not explicit about this actually.

Some apps that generate their shader sources may rely on this.  This was
noted when porting one of them to Linux from Windows.

Reviewed-by: Chad Versace <chad@chad-versace.us>

Note: this is a candidate for the 7.11 branch.
2011-08-05 12:14:24 +09:00
Vinson Lee
a48118e510 mesa: Remove MSVC stdint typedefs from compiler.h.
MSVC can now include the stdint.h at include/c99/stdint.h.
2011-08-04 18:06:18 -07:00
Brian Paul
bf8d06c518 mesa: pass correct constant type to _mesa_fetch_state()
Fixes assorted warnings about float vs. gl_constant_value pointers.
2011-08-04 16:02:08 -06:00
Brian Paul
324857599b mesa: use gl_constant_value type in ARB program parser 2011-08-04 16:00:06 -06:00
Brian Paul
a0eb83401e mesa: use gl_constant_value type in _mesa_[Get]ProgramNamedParameter4fNV() 2011-08-04 15:55:50 -06:00
Brian Paul
d7f2e38fca mesa: add st_glsl_to_tgsi.cpp to Sconscript 2011-08-04 15:55:13 -06:00
Brian Paul
1c8d079e20 mesa: fix out of bounds array access in rtgc debug code
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=39841
This would only be hit if someone set RGTC_DEBUG=1.
2011-08-04 15:33:39 -06:00
Brian Paul
d6a0692f9d mesa: don't use K&R style function pointer calls 2011-08-04 15:33:39 -06:00
Bryan Cain
4683529048 Merge branch 'glsl-to-tgsi'
Conflicts:
	src/mesa/state_tracker/st_atom_pixeltransfer.c
	src/mesa/state_tracker/st_program.c
2011-08-04 15:43:34 -05:00
Bryan Cain
9adcab9cd4 st/mesa: replace duplicated create_color_map_texture() function with shared function 2011-08-04 13:52:09 -05:00
Bryan Cain
b7e8911531 glsl_to_tgsi: remove debugging printf 2011-08-04 13:52:06 -05:00
Brian Paul
50073563b2 st/mesa: silence int/float and double/float conversion warnings 2011-08-04 08:22:31 -06:00
Brian Paul
09ba2527e8 st/mesa: move declaration before code 2011-08-04 08:22:31 -06:00
Brian Paul
192baaac0f mesa: minor comment updates in enable.c 2011-08-04 08:22:31 -06:00
Brian Paul
1e89a526c6 mesa: whitespace, formatting fixes in GetTexParameter() code 2011-08-04 08:22:31 -06:00
Brian Paul
02d81dfcaf mesa: add null ptr checks in GetTexParameterI[u]iv() functions 2011-08-04 08:22:31 -06:00
Brian Paul
1254a2b2e4 mesa: condense GL_TEXTURE_RESIDENT query code 2011-08-04 08:22:31 -06:00
Brian Paul
88a4f2fe54 mesa: make error handling in glGetTexParameter() a bit more concise 2011-08-04 08:22:30 -06:00
Christoph Bumiller
e9d84dab88 nv50: implement resource_resolve with custom blit 2011-08-04 15:38:49 +02:00
Christoph Bumiller
f253d83bc7 st/mesa: implement multisample resolve via BlitFramebuffer 2011-08-04 15:38:49 +02:00
Christoph Bumiller
94822c6d83 gallium: extend resource_resolve to accommodate BlitFramebuffer
Resolve via glBlitFramebuffer allows resolving a sub-region of a
renderbuffer to a different location in any mipmap level of some
other texture, and, with a new extension, even scaling. Therefore,
location and size parameters are needed.

The mask parameter was added because resolving only depth or only
stencil of a combined buffer is possible as well.

Full information about the blit operation allows the drivers to
take the most efficient path they possibly can.
2011-08-04 15:38:49 +02:00
Christoph Bumiller
57590e173b st/mesa: determine Const.MaxSamples in init_extensions
v2: Check for non-pow2 sample counts as well.
2011-08-04 15:38:49 +02:00
Benjamin Franzke
32f4cf3808 egl/gbm: Fix EGL_DEFAULT_DISPLAY 2011-08-04 14:09:34 +02:00
Benjamin Franzke
ca6bbfd769 gbm: link gbm_gallium_drm.so against math library
This avoids the following runtime error with EGL on platforms that
require linking with libm for nontrivial math functions:

failed to load module: /xorg/lib64/gbm/gbm_gallium_drm.so: undefined
symbol: powf

(Based on Kristóf RALOVICHs patch and Ian's suggestions in
http://lists.freedesktop.org/archives/mesa-dev/2011-August/010036.html)
2011-08-04 14:09:34 +02:00
RALOVICH, Kristóf
eeed782ecb gbm/dri: avoid crash in dri_screen_create 2011-08-04 14:09:34 +02:00
Marek Olšák
babb26776f r600g: remove more of unused code
This is a follow-up to f6df430a85.
2011-08-04 03:25:18 +02:00
Stephane Marchesin
974c49ed17 i915g: Fix whitespace. 2011-08-04 02:46:18 +02:00
Stephane Marchesin
d476d7ce5a i915g: fix whitespace. 2011-08-03 23:18:30 +02:00
Vadim Girlin
2bde0cc95d r600g: take into account force_add_cf in pops
When we have two ENDIFs in a row, we shouldn't modify the pop_count
for the same alu clause twice.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=38163

Note: this is a candidate for the 7.11 branch.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-03 10:17:50 -04:00
Vadim Girlin
6eb94fc344 r600g: use backend mask for occlusion queries
Use backend_map kernel query if supported, otherwise analyze ZPASS_DONE
results to get the mask.

Fixes lockups with predicated rendering due to incorrect query buffer
initialization on some cards.

Note: this is a candidate for the 7.11 branch.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-03 10:17:44 -04:00
Marek Olšák
2664980760 winsys/radeon: remove dummy function pb_buffer 2011-08-03 01:18:10 +02:00
Marek Olšák
b5e3940583 util: fix a typo in util_format_swizzle_4f
Reported by Gustaw Smolarczyk.
2011-08-03 01:15:41 +02:00
Eric Anholt
e0e4c2e305 radeon: Remove some remaining set-but-unused variables.
These looked more like copy-and-paste to me than the others (which
looked more like possibly someone forgot to write some code in a
refactor), so I didn't verify where they came from.
2011-08-02 13:58:42 -07:00
Eric Anholt
8de1d42f24 radeon: Remove set-but-unused variables in radeon_lock.c
These have been unused since this function's introduction in the FBO
support development around 2009.
2011-08-02 13:58:42 -07:00
Eric Anholt
f5e612ab59 radeon: Remove set-but-unused variables in radeonSetTexBuffer2() variants.
These have been unused since 2009.
2011-08-02 13:58:42 -07:00
Eric Anholt
25fffa9364 radeon: Remove set-but-unused log2depth variable.
r100 doesn't support 3D GL_EXT_texture3D.
2011-08-02 13:51:14 -07:00
Eric Anholt
7cf799d472 radeon: Remove set-but-unused color_mask variable.
This has been around since the initial import in 2003 and never used.
2011-08-02 13:51:14 -07:00