Marek Olšák [Mon, 11 Jul 2011 13:18:14 +0000 (15:18 +0200)]
mesa: add a comment in _mesa_test_formats
Marek Olšák [Mon, 11 Jul 2011 11:53:42 +0000 (13:53 +0200)]
mesa: fix assertion failure in _mesa_test_formats
Z32_FLOAT_X24S8 has DataType of GL_NONE.
Marek Olšák [Mon, 11 Jul 2011 02:17:37 +0000 (04:17 +0200)]
Revert "WIP r600g: depth_buffer_float renderbuffer support on evergreen"
This reverts commit
91a52dae97379d118965567b5c11e393996baeb9.
Pushed accidentally.
Marek Olšák [Mon, 11 Jul 2011 02:13:35 +0000 (04:13 +0200)]
r600g: more valgrind fixes
Marek Olšák [Mon, 11 Jul 2011 02:01:06 +0000 (04:01 +0200)]
r600g: zero memory of ioctl parameters
Fixes valgrind warning.
Marek Olšák [Sun, 10 Jul 2011 23:39:53 +0000 (01:39 +0200)]
mesa: implement packing of DEPTH_STENCIL & FLOAT_32_UNSIGNED_INT_24_8_REV combo
Tested with the new piglit fbo-depthstencil test.
Marek Olšák [Tue, 21 Jun 2011 21:22:37 +0000 (23:22 +0200)]
WIP r600g: depth_buffer_float renderbuffer support on evergreen
Marek Olšák [Sun, 10 Jul 2011 18:03:05 +0000 (20:03 +0200)]
swrast: fix depth/stencil blits when there's no colorbuffer
NOTE: This is a candidate for the 7.10 and 7.11 branches.
Marek Olšák [Sun, 10 Jul 2011 18:01:33 +0000 (20:01 +0200)]
mesa: return early if mask is cleared to zero in BlitFramebuffer
From ARB_framebuffer_object:
If a buffer is specified in <mask> and does not exist in both the
read and draw framebuffers, the corresponding bit is silently
ignored.
Marek Olšák [Wed, 29 Jun 2011 00:10:55 +0000 (02:10 +0200)]
docs: update GL3 status
Marek Olšák [Mon, 20 Jun 2011 17:40:41 +0000 (19:40 +0200)]
r600g: depth_buffer_float support on r600-r700
Marek Olšák [Tue, 21 Jun 2011 19:14:07 +0000 (21:14 +0200)]
gallium/util: handle Z32F_FLOAT_S8X24_USCALED in pipe_tile_raw_to_rgba
And make pipe_put_tile_rgba_format no-op like the other Z formats.
Marek Olšák [Fri, 24 Jun 2011 21:39:51 +0000 (23:39 +0200)]
gallium/util: implement software Z32F_S8X24 depth-stencil clear
Marek Olšák [Fri, 24 Jun 2011 21:38:36 +0000 (23:38 +0200)]
gallium/util: implement pack functions for Z32F and Z32F_S8X24
Marek Olšák [Mon, 27 Jun 2011 17:09:24 +0000 (19:09 +0200)]
st/mesa: implement read/draw/copypixels for Z32F and Z32F_S8X24
Marek Olšák [Wed, 1 Jun 2011 13:49:33 +0000 (15:49 +0200)]
st/mesa: initial ARB_depth_buffer_float support
Marek Olšák [Fri, 1 Jul 2011 00:04:34 +0000 (02:04 +0200)]
mesa: implement depth/stencil renderbuffer wrapper accessors for Z32F_X24S8
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Marek Olšák [Tue, 21 Jun 2011 12:18:25 +0000 (14:18 +0200)]
mesa: implement generatemipmap for GL_FLOAT_32_UNSIGNED_INT_24_8_REV
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Marek Olšák [Tue, 21 Jun 2011 03:17:51 +0000 (05:17 +0200)]
mesa: implement texstore for DEPTH32F_STENCIL8
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Marek Olšák [Tue, 21 Jun 2011 11:36:27 +0000 (13:36 +0200)]
mesa: implement texstore for DEPTH_COMPONENT32F
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Marek Olšák [Tue, 21 Jun 2011 03:09:24 +0000 (05:09 +0200)]
mesa: implement depth unpacking for GL_FLOAT_32_UNSIGNED_INT_24_8_REV
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Marek Olšák [Tue, 21 Jun 2011 03:06:36 +0000 (05:06 +0200)]
mesa: implement stencil unpacking for GL_FLOAT_32_UNSIGNED_INT_24_8_REV
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Marek Olšák [Mon, 20 Jun 2011 01:07:16 +0000 (03:07 +0200)]
mesa: implement texfetch functions for depth_buffer_float
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Marek Olšák [Wed, 1 Jun 2011 13:48:51 +0000 (15:48 +0200)]
mesa: initial ARB_depth_buffer_float support
Using GL_NONE as DataType of Z32_FLOAT_X24S8, not sure what I should put there.
The spec says the type is n/a.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Vadim Girlin [Sun, 10 Jul 2011 17:19:38 +0000 (13:19 -0400)]
r600g: LIT: clamp negative src.y to 0
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=39083
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Marek Olšák [Sun, 10 Jul 2011 15:40:38 +0000 (17:40 +0200)]
st/dri: remove unused variables
Chia-I Wu [Sat, 9 Jul 2011 17:27:20 +0000 (01:27 +0800)]
st/egl: fix linking errors
Add symbols referenced by src/glx/dri2.c.
Kenneth Graunke [Sat, 9 Jul 2011 09:46:03 +0000 (02:46 -0700)]
intel: Recognize all depth formats in get_teximage_readbuffer.
The existing code was missing GL_DEPTH_COMPONENT32, resulting in it
wrongly returning the color buffer instead of the depth buffer.
Fixes an issue in PlaneShift 0.5.7 when casting spells. The game calls
CopyTexSubImage2D on buffers with a GL_DEPTH_COMPONENT32 internal
format, which (prior to this patch) resulted in an attempt to copy
ARGB8888 to X8_Z24.
Instead of adding the missing enumeration directly, convert the code to
use _mesa_is_depth_format() and _mesa_is_depthstencil_format() as these
should catch any newly added depth formats in the future.
NOTE: This is a candidate for the 7.10 and 7.11 branches.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Henri Verbeet [Sat, 9 Jul 2011 15:19:00 +0000 (17:19 +0200)]
r600g: Get rid of some superfluous braces.
Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
Henri Verbeet [Sat, 9 Jul 2011 15:19:00 +0000 (17:19 +0200)]
r600g: Check for Evergreen chip class instead of Cedar family in r600_context_flush().
Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
Henri Verbeet [Sat, 9 Jul 2011 15:18:59 +0000 (17:18 +0200)]
r600g: Store the chip class directly in r600_bc.
Instead of deriving it from the family again.
Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
Henri Verbeet [Sat, 9 Jul 2011 15:18:59 +0000 (17:18 +0200)]
r600g: Replace the CHIPREV_* defines with the chip_class enum.
Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
Henri Verbeet [Sat, 9 Jul 2011 15:18:59 +0000 (17:18 +0200)]
r600g: Get rid of the superfluous family field from r600_shader.
Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
Henri Verbeet [Sat, 9 Jul 2011 15:18:59 +0000 (17:18 +0200)]
r600g: Store the chip class in r600_pipe_context.
Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
Henri Verbeet [Sat, 9 Jul 2011 15:18:59 +0000 (17:18 +0200)]
r600g: Fix the type of the family field in r600_pipe_context.
Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
Eric Anholt [Fri, 8 Jul 2011 22:30:48 +0000 (15:30 -0700)]
i965/gen4: Fix GPU hangs since the program streaming change.
This was tricky. We were doing a use-before-initialize of
grf_reg_count, but the value usually got overwritten anyway -- when we
didn't have to do a relocation (typical), or on gen5 when we didn't
have relocations at all.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38771
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Kenneth Graunke [Sat, 9 Jul 2011 03:17:50 +0000 (20:17 -0700)]
i965/gen7: Remove gratuitous dirty flags from WM and PS state.
Commit
b46dc45ceef3deb17ba2b0b4300eeb93e9cf7833 claimed that
NEW_POLYGONSTIPPLE is gratuitous, but somehow just changed comments
and whitespace instead of actually removing the flag.
While we're at it, 3DSTATE_PS doesn't appear to need NEW_LINE or
NEW_POLYGON either (those are in 3DSTATE_WM). Also, 3DSTATE_WM
doesn't appear to need BRW_NEW_NR_WM_SURFACES or BRW_NEW_CURBE_OFFSETS
either (those are in 3DSTATE_PS).
NOTE: This is a candidate for the 7.11 branch.
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Vadim Girlin [Fri, 8 Jul 2011 02:19:37 +0000 (06:19 +0400)]
r600g: introduce r600_bc_src_toggle_neg helper and fix SUB & LRP
SUB & LRP instructions should toggle NEG bit instead of setting it,
otherwise e.g. "SUB a,b,-1" is translated as "ADD a,b,-1"
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Vadim Girlin [Fri, 8 Jul 2011 02:19:36 +0000 (06:19 +0400)]
r600g: introduce r600_bc_src_set_abs helper and fix LOG
LOG instruction should use absolute values of source operand.
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Vadim Girlin [Wed, 6 Jul 2011 01:29:09 +0000 (05:29 +0400)]
r600g: RSQ: clear NEG for operand
Need to clear NEG bit because it applies after ABS, e.g. "RSQ ..., -1"
uses -|1| as operand.
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Vadim Girlin [Wed, 6 Jul 2011 01:29:08 +0000 (05:29 +0400)]
r600g: LIT: swap MUL_LIT operands to fix 0^0
For 0^0 case result of "LOG_CLAMPED ...,0" is -MAX_FLOAT, and then result of
"MUL_LIT ...,0,-MAX_FLOAT,..." is -MAX_FLOAT instead of 0 because of special
src1 checks for -MAX_FLOAT. So swap src0/1:
"MUL_LIT ...,-MAX_FLOAT,0,..." to get expected 0, then result of
"EXP_IEEE ...,0" is 1 as expected for LIT.
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Jesse Barnes [Fri, 6 May 2011 17:31:24 +0000 (10:31 -0700)]
GLX/DRI2: handle swap event swap count wrapping
Create a new GLX drawable struct to track client related info, and add a
wrap counter to it drawable and track it as we receive events. This
allows us to support the full 64 bits of the event structure we pass to
the client even though the server only gives us a 32 bit count.
Reviewed-by: Michel Dänzer <michel@daenzer.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Jesse Barnes [Thu, 5 May 2011 20:09:16 +0000 (13:09 -0700)]
DRI2/GLX: use new swap event types
Use the new swap event type so we get valid SBC values.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Paul Berry [Sat, 2 Jul 2011 00:29:35 +0000 (17:29 -0700)]
glsl: Lower break instructions when necessary at the end of a loop.
Normally lower_jumps.cpp doesn't need to lower a break instruction
that occurs at the end of a loop, because all back-ends can produce
proper GPU instructions for a break instruction in this "canonical"
location. However, if other break instructions within the loop are
already being lowered, then a break instruction at the end of the loop
needs to be lowered too, since after the optimization is complete a
new conditional break will be inserted at the end of the loop.
Without this patch, lower_jumps.cpp may require multiple passes in
order to lower all jumps. This results in sub-optimal output because
lower_jumps.cpp produces a brand new set of temporary variables each
time it is run, and the redundant temporary variables are not
guaranteed to be eliminated by later optimization passes.
Fixes unit test test_lower_breaks_6.
Paul Berry [Fri, 1 Jul 2011 22:33:36 +0000 (15:33 -0700)]
glsl: In lower_jumps.cpp, lower both branches of a conditional.
Previously, lower_jumps.cpp would break out of its loop after lowering
a jump instruction in just the then- or else-branch of a conditional,
and it would fail to lower a jump instruction occurring in the other
branch.
Without this patch, lower_jumps.cpp may require multiple passes in
order to lower all jumps. This results in sub-optimal output because
lower_jumps.cpp produces a brand new set of temporary variables each
time it is run, and the redundant temporary variables are not
guaranteed to be eliminated by later optimization passes.
Fixes unit test test_lower_returns_4.
Paul Berry [Fri, 1 Jul 2011 19:36:23 +0000 (12:36 -0700)]
glsl: Use foreach_list in lower_jumps.cpp
The visitor class in lower_jumps.cpp never removes or replaces the
instruction being visited, but it frequently alters or removes the
instructions that follow it. Therefore, to make sure the altered IR
is visited, it needs to iterate through exec_lists using foreach_list
rather than visit_exec_list().
Without this patch, lower_jumps.cpp may require multiple passes in
order to lower all jumps. This results in sub-optimal output because
lower_jumps.cpp produces a brand new set of temporary variables each
time it is run, and the redundant temporary variables are not
guaranteed to be eliminated by later optimization passes.
Also, certain invariants assumed by lower_jumps.cpp may fail to hold,
causing assertion failures.
Fixes unit tests test_lower_pulled_out_jump,
test_lower_unified_returns, test_lower_guarded_conditional_break,
test_lower_return_non_void_at_end_of_loop, and test_lower_returns_3.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Paul Berry [Sat, 2 Jul 2011 01:26:05 +0000 (18:26 -0700)]
glsl: lower unconditional returns and continues in loops.
Previously, lower_jumps.cpp would only lower return and continue
statements that appeared inside conditionals. This patch makes it
lower unconditional returns and continue statements that occur inside
a loop.
Such unconditional flow control statements would be unlikely to be
explicitly coded by a reasonable user, however they might arise as a
result of other optimizations.
Without this patch, lower_jumps.cpp might not lower certain return and
continue statements, causing some backends to fail.
Fixes unit tests test_lower_return_void_at_end_of_loop and
test_remove_continue_at_end_of_loop.
Paul Berry [Fri, 1 Jul 2011 19:14:07 +0000 (12:14 -0700)]
glsl: Lower unconditional return statements.
Previously, lower_jumps.cpp only lowered return statements that
appeared inside of an if statement.
Without this patch, lower_jumps.cpp might not lower certain return
statements, causing some back-ends to fail (as in bug #36669).
Fixes unit test test_lower_returns_1.
Paul Berry [Fri, 1 Jul 2011 18:59:32 +0000 (11:59 -0700)]
glsl: Refactor logic for determining whether to lower return statements.
Previously, do_lower_jumps.cpp determined whether to lower return
statements in ir_lower_jumps_visitor::should_lower_jumps(). Moved
this logic to ir_lower_jumps_visitor::visit(ir_function_signature *),
so that it can be used in determining whether to lower a return
statement at the end of a function.
Paul Berry [Wed, 29 Jun 2011 17:28:40 +0000 (10:28 -0700)]
glsl: Add explanatory comments to lower_jumps.cpp.
No functional change.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Paul Berry [Wed, 29 Jun 2011 22:30:40 +0000 (15:30 -0700)]
glsl: Make ir_reader able to read plain (return) statements.
Previously ir_reader was only able to handle return of non-void.
This patch is necessary in order to allow optimization passes to be
tested in isolation.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Paul Berry [Tue, 5 Jul 2011 18:29:40 +0000 (11:29 -0700)]
glsl: Remove unused function prototypes.
No functional change. Remove prototypes for do_mod_to_fract() and
do_sub_to_add_neg(), which haven't existed since November 2010.
Gustaw Smolarczyk [Wed, 6 Jul 2011 21:12:11 +0000 (23:12 +0200)]
gallivm: Fix build with llvm-3.0
LLVM 3.0svn changes pretty rapidly. The change in
Target->createMCInstPrinter() signature which inspired commits
40ae214067673edbda79371969d1730b6194d83e and
92e29dc5b0474c073b0f05d60629fc6c3decfca4 has been reverted.
Signed-off-by: Gustaw Smolarczyk <wielkiegie@gmail.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
Marek Olšák [Mon, 27 Jun 2011 16:57:59 +0000 (18:57 +0200)]
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>
Marek Olšák [Mon, 27 Jun 2011 17:01:25 +0000 (19:01 +0200)]
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>
Thomas Hellstrom [Fri, 8 Jul 2011 06:26:29 +0000 (08:26 +0200)]
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>
Stéphane Marchesin [Fri, 8 Jul 2011 04:58:31 +0000 (21:58 -0700)]
i915g: Make the optimizer more generic.
Brian Paul [Thu, 7 Jul 2011 23:29:28 +0000 (17:29 -0600)]
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>
Brian Paul [Thu, 7 Jul 2011 22:47:59 +0000 (16:47 -0600)]
glsl: use casts to silence warning
José Fonseca [Thu, 7 Jul 2011 22:41:06 +0000 (23:41 +0100)]
scons: Generate libGL.so.1.5 and libGL.so.1 symlinks.
In build/xxx/src/gallium/targets/libgl-xlib/SConscript
Eric Anholt [Wed, 6 Jul 2011 18:31:00 +0000 (11:31 -0700)]
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>
Eric Anholt [Thu, 7 Jul 2011 15:59:07 +0000 (08:59 -0700)]
intel: Remove dead comment about software clears -- it's handled just above.
John [Wed, 29 Jun 2011 18:45:04 +0000 (11:45 -0700)]
i915: Fix leak of ViewportMatrix data on context destroy.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=30217
Eric Anholt [Wed, 29 Jun 2011 18:37:35 +0000 (11:37 -0700)]
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>
Eric Anholt [Wed, 29 Jun 2011 18:26:32 +0000 (11:26 -0700)]
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>
Eric Anholt [Wed, 29 Jun 2011 18:14:23 +0000 (11:14 -0700)]
intel: Rely on intel_region_reference()'s support of *dst != NULL.
Reviewed-by: Chad Versace <chad@chad-versace.us>
Eric Anholt [Wed, 29 Jun 2011 18:09:49 +0000 (11:09 -0700)]
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>
Eric Anholt [Wed, 15 Jun 2011 19:02:12 +0000 (12:02 -0700)]
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>
Kenneth Graunke [Thu, 30 Jun 2011 07:15:34 +0000 (00:15 -0700)]
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>
Kenneth Graunke [Thu, 30 Jun 2011 07:11:39 +0000 (00:11 -0700)]
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>
Kenneth Graunke [Thu, 30 Jun 2011 07:05:49 +0000 (00:05 -0700)]
i965: Convert PIPELINE_SELECT to OUT_BATCH style.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Kenneth Graunke [Thu, 30 Jun 2011 07:00:36 +0000 (00:00 -0700)]
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>
Kenneth Graunke [Thu, 30 Jun 2011 06:50:05 +0000 (23:50 -0700)]
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>
Henri Verbeet [Sun, 3 Jul 2011 22:57:43 +0000 (00:57 +0200)]
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>
Henri Verbeet [Sun, 3 Jul 2011 22:57:42 +0000 (00:57 +0200)]
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>
Henri Verbeet [Sun, 3 Jul 2011 22:57:42 +0000 (00:57 +0200)]
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>
Henri Verbeet [Sun, 3 Jul 2011 22:57:42 +0000 (00:57 +0200)]
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>
Henri Verbeet [Sun, 3 Jul 2011 22:57:42 +0000 (00:57 +0200)]
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>
Christoph Bumiller [Thu, 7 Jul 2011 12:58:29 +0000 (14:58 +0200)]
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.
Christoph Bumiller [Tue, 28 Jun 2011 14:06:56 +0000 (16:06 +0200)]
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.
Stéphane Marchesin [Thu, 7 Jul 2011 07:15:05 +0000 (00:15 -0700)]
i915g: Apply optimization to ADDS/MUL and only if we're not saturating.
Thomas Hellstrom [Thu, 7 Jul 2011 08:18:24 +0000 (10:18 +0200)]
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>
Thomas Hellstrom [Wed, 6 Jul 2011 19:58:33 +0000 (21:58 +0200)]
st/xa: Fix render to xa_format_a8, which is backed by a gallium L8 texture
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Brian Paul [Wed, 6 Jul 2011 23:18:32 +0000 (17:18 -0600)]
i915g: move code after declaration
Ian Romanick [Tue, 28 Jun 2011 00:59:58 +0000 (17:59 -0700)]
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>
Ian Romanick [Sat, 25 Jun 2011 00:30:41 +0000 (17:30 -0700)]
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>
Ian Romanick [Sat, 25 Jun 2011 00:12:31 +0000 (17:12 -0700)]
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>
Ian Romanick [Mon, 27 Jun 2011 23:33:13 +0000 (16:33 -0700)]
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>
Stéphane Marchesin [Wed, 6 Jul 2011 21:10:51 +0000 (14:10 -0700)]
i915g: Fix optimize so that it actually gets used.
Brian Paul [Wed, 6 Jul 2011 21:04:17 +0000 (15:04 -0600)]
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.
Brian Paul [Wed, 6 Jul 2011 21:02:58 +0000 (15:02 -0600)]
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
Brian Paul [Wed, 6 Jul 2011 21:02:25 +0000 (15:02 -0600)]
tgsi: add some debug/print code in exec_tex(), disabled
Brian Paul [Wed, 6 Jul 2011 18:15:10 +0000 (12:15 -0600)]
softpipe: minor clean-ups in sp_quad_depth_test.c
Stéphane Marchesin [Wed, 6 Jul 2011 18:44:19 +0000 (11:44 -0700)]
i915g: Fix optimization, also make it more generic.
Eric Anholt [Tue, 28 Jun 2011 23:39:15 +0000 (16:39 -0700)]
mesa: Don't error on glFeedbackBuffer(size = 0, buffer = NULL)
The existing error result doesn't appear in the GL 2.1 or 3.2
compatibility specs, and triggers an unexpected GL error in Intel's
oglconform when it tries to reset the feedback state after usage so
that the "diff the state at error time vs. context init time" code
doesn't generate spurious diffs. The unexpected GL error then
translates into testcase failure. Brian wants the safety check on
buffer = NULL, though, so that people can't as easily set up a broken
buffer.
Eric Anholt [Tue, 28 Jun 2011 22:04:22 +0000 (15:04 -0700)]
mesa: Don't skip glGetProgramLocalParam4dvARB if there was already an error.
Like the previous commit, but fixes
ARB_vertex_program/getlocal4d-with-error.
v2: Move the success case line into the conditional, use ASSIGN_4V more.
Eric Anholt [Tue, 28 Jun 2011 20:55:44 +0000 (13:55 -0700)]
mesa: Don't skip glGetProgramEnvParam4dvARB if there was already an error.
Fixes a bug caught by oglconform, and now piglit
ARB_vertex_program/getenv4d-with-error. The wrapping of an existing
GL function made it so that we couldn't distinguish an error in
looking up our arguments from an existing error. Instead, make a
helper function to choose the param, and use it from multiple callers.
v2: Move the success case line into the conditional, use COPY_4V more.
Eric Anholt [Wed, 6 Jul 2011 05:02:33 +0000 (22:02 -0700)]
glsl: Suppress warning from matching_signature change.
gcc isn't smart enough to see that we only look at matched_score after
we've initialized it (because match != NULL happens at the same time)
Eric Anholt [Wed, 6 Jul 2011 04:59:33 +0000 (21:59 -0700)]
glsl: Fix make clean for dricore.
Kenneth Graunke [Wed, 29 Jun 2011 23:47:30 +0000 (16:47 -0700)]
i965/fs: Fix message register allocation in FB writes.
Commit
6750226e6d915742ebf96bae2cfcdd287b85db35 bumped the base MRF to
m2 instead of m0, but failed to adjust inst->mlen, which was being set
to the highest MRF. Subtracting the base MRF solves the issue.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>