Commit graph

45370 commits

Author SHA1 Message Date
Christian König
4e837f557b [g3dvl] move video buffer creation out of video context 2011-07-08 16:56:11 +02:00
Gustaw Smolarczyk
fc98444bd5 gallivm: Fix build with llvm-3.0
LLVM 3.0svn changes pretty rapidly. The change in
Target->createMCInstPrinter() signature which inspired commits
40ae214067 and
92e29dc5b0 has been reverted.

Signed-off-by: Gustaw Smolarczyk <wielkiegie@gmail.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
2011-07-08 07:57:27 -06:00
Christian König
3bb33c911b [g3dvl] remove the unused priv member from pipe_video_context 2011-07-08 15:07:39 +02:00
Christian König
bd5fd67a3e [g3dvl] move compositor creation and handling directly into the state trackers 2011-07-08 14:44:19 +02:00
Marek Olšák
7de28e80dc st/mesa: handle float formats in st_format_datatype
NOTE: This is a candidate for the 7.11 branch.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-07-08 13:02:27 +02:00
Marek Olšák
292148dc4b st/mesa: use the first non-VOID channel in st_format_datatype
Otherwise PIPE_FORMAT_X8B8G8R8_UNORM and friends would fail.

NOTE: This is a candidate for the 7.10 and 7.11 branches.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-07-08 13:02:22 +02:00
Christian König
10fd45114d [g3dvl] remove sampler view handling from video context 2011-07-08 12:47:52 +02:00
Christian König
06ddbc3b8e [g3dvl] remove create_surface from video context 2011-07-08 12:15:48 +02:00
Christian König
2ec350ff1d [g3dvl] make pipe_context mandatory for creation pipe_video_context 2011-07-08 12:03:13 +02:00
Christian König
7eca76952b [g3dvl] rename is_format_supported to is_video_format_supported and move it into screen object 2011-07-08 11:20:39 +02:00
Thomas Hellstrom
a65e970603 mesa/st: Fix piglit read-front with new drawable invalidation v2
When the state tracker adds a front buffer, nothing triggers a validate
drawable call, since the state tracker manager is never notified.

Force a validate drawable call by invalidating the framebuffer's stamp, so
that the window system's renderbuffer (if any) is picked up.

This fixes bug 38988
https://bugs.freedesktop.org/show_bug.cgi?id=38988

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-07-08 08:37:42 +02:00
Stéphane Marchesin
8c1a2e128e i915g: Make the optimizer more generic. 2011-07-07 21:59:09 -07:00
Brian Paul
d8f65c07e9 intel: add null src pointer check in intel_region_reference()
Fixes segfault when running cubemap demo on i945.  This happened
when intel_region_reference() was called in i915_set_draw_region()
with depth_region=NULL.

Reviewed-by: Eric Anholt <eric@anholt.net>
2011-07-07 19:22:06 -06:00
Stéphane Marchesin
9baad92660 i915g: Make optimization more generic. 2011-07-07 16:57:37 -07:00
Stéphane Marchesin
3c0c624879 Revert "i915: Eliminate redundant CONSTANTS updates"
This reverts commit 87641cffd9.
2011-07-07 16:57:37 -07:00
Brian Paul
7eb7d67d50 glsl: use casts to silence warning 2011-07-07 17:28:48 -06:00
José Fonseca
61efad6865 scons: Generate libGL.so.1.5 and libGL.so.1 symlinks.
In build/xxx/src/gallium/targets/libgl-xlib/SConscript
2011-07-07 23:41:06 +01:00
Eric Anholt
066bee64e1 intel: Fix use of freed buffer if glBitmap is called after a swap.
Regions looked up from the framebuffer are invalid after
intel_prepare_render().

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=30266
Tested-by: Thomas Jones <thomas.jones@utoronto.ca>
2011-07-07 14:43:44 -07:00
Eric Anholt
a7a2704ab4 intel: Remove dead comment about software clears -- it's handled just above. 2011-07-07 14:43:44 -07:00
John
f39476b234 i915: Fix leak of ViewportMatrix data on context destroy.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=30217
2011-07-07 14:43:44 -07:00
Eric Anholt
007c2d6cd2 intel: Remove gratuitous context checks in intel_delete_renderbuffer().
Even if we don't have a current context, if we're freeing the rb we
should free its region (and BO).  The renderbuffer unreference checks
appear to be just cargo-cult from the region unreference code.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=30217
Reviewed-by: Chad Versace <chad@chad-versace.us>
2011-07-07 14:43:44 -07:00
Eric Anholt
c7ef5e8498 intel: Remove now trivial intel_renderbuffer_set_{hiz_,}region().
As a result of this cleanup, a bug in
intel_process_dri2_buffer_no_separate_stencil() became quite apparent.
We were associating the NULL pointer after an unreference with the
STENCIL attachment -- clarify the logic and attach the right region.

Reviewed-by: Chad Versace <chad@chad-versace.us>
2011-07-07 14:42:47 -07:00
Eric Anholt
b904321ed0 intel: Rely on intel_region_reference()'s support of *dst != NULL.
Reviewed-by: Chad Versace <chad@chad-versace.us>
2011-07-07 14:05:20 -07:00
Eric Anholt
036b74a7f8 intel: Allow intel_region_reference() with *dst != NULL.
This should help us avoid leaking regions in region reference code by
making the API more predictable.

Reviewed-by: Chad Versace <chad@chad-versace.us>
2011-07-07 14:05:20 -07:00
Eric Anholt
86e62b2357 intel: Mark MESA_FORMAT_X8_Z24 as always supported.
This prevents developer surprise at seeing a GL_DEPTH_COMPONENT
texture have stencil bits, and avoids the metaops path accidentally
copying stencil bits around in glCopyTexImage(GL_DEPTH_COMPONENT) (and
being broken because swrast's glReadPixels(GL_UNSIGNED_INT_24_8) is
broken).

Acked-by: Chad Versace <chad@chad-versace.us>
2011-07-07 14:05:20 -07:00
Christian König
f265a19426 [g3dvl] rename get_param to get_video_param and move into screen object 2011-07-07 22:51:45 +02:00
Kenneth Graunke
3de9405763 i965: Remove unused structures for command packets.
We simply emit these using OUT_BATCH and bitshifting, as it results in
better compiled code than packed structures.  Since our documentation
is public, it's not terribly useful to keep these around for reference.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-07-07 13:31:41 -07:00
Kenneth Graunke
247e4c69ce i965: Convert system instruction pointer to OUT_BATCH style.
Also rename it from CMD_STATE_INSN_POINTER to CMD_STATE_SIP to match the
documentation.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-07-07 13:31:41 -07:00
Kenneth Graunke
87de78523a i965: Convert PIPELINE_SELECT to OUT_BATCH style.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-07-07 13:31:41 -07:00
Kenneth Graunke
473a519d20 i965: Emit 3DSTATE_VF_STATISTICS in OUT_BATCH style.
This is a little different from most because it's a single DWord;
there's no length field.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-07-07 13:31:41 -07:00
Kenneth Graunke
a68c5e6b71 i965: Convert 3DSTATE_GLOBAL_DEPTH_OFFSET_CLAMP to OUT_BATCH style.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-07-07 13:31:41 -07:00
Henri Verbeet
e01e30b916 mesa: Fix the BindSampler unit limit.
I'm not sure about this one. The current code actually follows the spec, but
considering the spec is supposed to be written against GL 3.2 I'd say the spec
is broken. I filled out a spec feedback form over a month ago, but either the
form is broken, or nobody cares.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-07-07 20:30:13 +02:00
Henri Verbeet
bfe284fd26 mesa: Fix a couple of TexEnv unit limits.
NOTE: This is a candidate for the 7.11 branch.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-07-07 20:30:13 +02:00
Henri Verbeet
4744195628 mesa: Use the Elements macro for the sampler index assert in validate_samplers().
This is probably nicer if the array size ever changes.

NOTE: This is a candidate for the 7.11 branch.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-07-07 20:30:13 +02:00
Henri Verbeet
86adc2b29e mesa: Allow sampling from units >= MAX_TEXTURE_UNITS in shaders.
The total number of units used by a shader is limited to MAX_TEXTURE_UNITS,
but the actual indices are only limited by MAX_COMBINED_TEXTURE_IMAGE_UNITS,
since they're shared between vertex and fragment shaders.

NOTE: This is a candidate for the 7.11 branch.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-07-07 20:30:13 +02:00
Henri Verbeet
2e35d90fb9 mesa: Check the texture against all units in unbind_texobj_from_texunits().
NOTE: This is a candidate for the 7.11 branch.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-07-07 20:30:13 +02:00
Christoph Bumiller
3069a7eaa5 nv50,nvc0: use screen instead of context for flush notifier
Context may become NULL and we still have to be able to flush
pending fences.
2011-07-07 15:00:12 +02:00
Christoph Bumiller
e54354e885 nv50: more formats for nv50_resource_copy_region conversion path
It's not supposed to do conversion, but st sometimes asks us to.
Sometimes conversion is even wrong (e.g. between UNORM and SRGB).

This should now include all formats the 2D engine supports.
2011-07-07 15:00:12 +02:00
Stéphane Marchesin
f934c80faf i915g: Apply optimization to ADDS/MUL and only if we're not saturating. 2011-07-07 01:47:33 -07:00
Thomas Hellstrom
1b23d4c9a5 st/xa: Fix up error reporting. Disable component alpha.
Component alpha is temporarily disabled since it seems a bit buggy.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-07-07 10:21:48 +02:00
Thomas Hellstrom
568d99cc6c st/xa: Fix render to xa_format_a8, which is backed by a gallium L8 texture
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-07-07 10:21:48 +02:00
Brian Paul
7a10976adb i915g: move code after declaration 2011-07-06 18:10:00 -06:00
Ian Romanick
d32d4f780f linker: Assign locations for fragment shader output
Fixes an assertion failure in the piglib out-01.frag
ARB_explicit_attrib_location test.  The locations set via the layout
qualifier in fragment shader were not being applied to the shader
outputs.  As a result all of these variables still had a location of
-1 set.

This may need some more work for pre-3.0 contexts.  The problem is
dealing with generic outputs that lack a layout qualifier.  There is
no way for the application to specify a location
(glBindFragDataLocation is not supported) or query the location
assigned by the linker (glGetFragDataLocation is not supported).

NOTE: This is a candidate for the 7.10 and 7.11 branches.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38624
Reviewed-by: Eric Anholt <eric@anholt.net>
Cc: Kenneth Graunke <kenneth@whitecape.org>
Cc: Vinson Lee <vlee@vmware.com>
2011-07-06 16:59:34 -07:00
Ian Romanick
174cef7fee glsl: Don't choke when printing an anonymous function parameter
NOTE: This is a candidate for the 7.10 and 7.11 branches.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38584
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-07-06 16:41:34 -07:00
Ian Romanick
dbda466fc0 ir_to_mesa: Allocate temporary instructions on the visitor's ralloc context
And don't delete them.  Let ralloc clean them up.  Deleting the
temporary IR leaves dangling references in the prog_instruction.  That
results in a bad dereference when printing the IR with MESA_GLSL=dump.

NOTE: This is a candidate for the 7.10 and 7.11 branches.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38584
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-07-06 16:41:34 -07:00
Ian Romanick
0eb9797958 glsl: Track initial mask in constant propagation live set
The set of values initially available (before any kills) must be
tracked with each constant in the set.  Otherwise the wrong component
can be selected after earlier components have been killed.

NOTE: This is a candidate for the 7.10 and 7.11 branches.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=37383
Reviewed-by: Eric Anholt <eric@anholt.net>
Cc: Kenneth Graunke <kenneth@whitecape.org>
Cc: Matthias Bentrup <matthias.bentrup@googlemail.com>
2011-07-06 16:41:34 -07:00
Stéphane Marchesin
31484b068d i915g: Fix optimize so that it actually gets used. 2011-07-06 14:18:24 -07:00
Brian Paul
b786db0654 mesa: fix texstore addressing bugs for depth/stencil formats
Using GLuint pointers worked when the pixel size was four bytes
or the row stride was a multiple of four but was otherwise broken.
Fixes failures found with the piglit fbo-stencil test.

This helps to fix https://bugs.freedesktop.org/show_bug.cgi?id=38729

NOTE: This is a candidate for the 7.11 branch.
2011-07-06 15:14:47 -06:00
Brian Paul
057a107d44 softpipe: add missing stencil format case in convert_quad_stencil()
Part of the fix for https://bugs.freedesktop.org/show_bug.cgi?id=38729

NOTE: This is a candidate for the 7.11 branch
2011-07-06 15:14:27 -06:00
Brian Paul
2ea7b374f6 tgsi: add some debug/print code in exec_tex(), disabled 2011-07-06 15:14:27 -06:00