Commit graph

45627 commits

Author SHA1 Message Date
Christoph Bumiller
425b179faf st/mesa: don't resolve stencil twice 2011-08-07 15:34:34 +02:00
Marek Olšák
1554e69e00 winsys/radeon: disable use of the buffer busy-for-write flag 2011-08-06 05:45:19 +02:00
Kenneth Graunke
db726b048e mesa: In validate_program(), initialize errMsg for safety.
validate_program relies on validate_shader_program to fill in errMsg;
empirically, there exist cases where that doesn't happen.

While tracking those down may be worthwhile, initializing the string so
we don't try to ralloc_strdup random garbage also seems wise.

Fixes issues caught by valgrind while running some test case.

NOTE: This is a candidate for stable release branches.

Reviewed-by: Chad Versace <chad@chad-versace.us>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2011-08-05 14:19:39 -07:00
Eric Anholt
a9e97d022c intel: Fix warnings from gl_constant_parameter changes. 2011-08-05 12:56:12 -07:00
Bryan Cain
5164244df0 glsl_to_tgsi: replace open-coded swizzle_for_size()
This is a port of commit 4c7e215c7b to glsl_to_tgsi.
2011-08-05 14:39:18 -05:00
Bryan Cain
b44648c918 glsl_to_tgsi: try to avoid emitting a MOV_SAT to saturate an expression tree
This is a port of commit 62722d9 to glsl_to_tgsi, with minor aesthetic
changes (moved the declaration and assignment of new_inst inside the if block).
2011-08-05 14:39:18 -05:00
Eric Anholt
4c7e215c7b ir_to_mesa: Replace open-coded swizzle_for_size() 2011-08-05 10:37:15 -07:00
Christopher James Halse Rogers
fbc2fcf685 glx/dri2: Paper over errors in DRI2Connect when indirect
DRI2 will throw BadRequest for this when the client is not local, but
DRI2 is an implementation detail and not something callers should have
to know about.  Silently swallow errors in this case, and just propagate
the failure through DRI2Connect's return code.

Note: This is a candidate for the stable release branches.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=28125
Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
2011-08-05 10:11:05 -07:00
Eric Anholt
62722d90af ir_to_mesa: Try to avoid emitting a MOV_SAT to saturate an expression tree.
Fixes a regression in codegen quality for ff_fragment_shader
conversion to GLSL -- glean texCombine produces 7.5% fewer Mesa IR
instructions.
2011-08-05 10:08:31 -07:00
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
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