Commit graph

48156 commits

Author SHA1 Message Date
Eric Anholt
3f41f7d1a0 i965: Drop separate stencil assertions in update_draw_buffer().
The comment said they deserved to be in emit_depthbuffer, and at this
point they were all there already.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-12-14 17:12:41 -08:00
Eric Anholt
7eb0aa398b intel: Simplify and touch up the FBO completeness test.
Now that we have miptrees for everything, we can more easily test for
!has_separate_stencil completeness.  Also, test for whether the
stencil rb is the wrong kind of format for separate stencil, or if we
are trying to do packed to different images of a single miptree.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-12-14 13:18:48 -08:00
Eric Anholt
950310e7a3 intel: Remove another renderbuffer allocation path.
Now there's the thing that CALLOCs and sets up window system vtable,
and the thing that CALLOCs and sets up user renderbuffer vtable.  The
user renderbuffer vtable gets replaced later by
intel_renderbuffer_update_wrapper for wrapped renderbuffers (things
with name == ~0).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-12-14 13:18:46 -08:00
Eric Anholt
a91c31668f intel: Make the separate stencil RB storage path match texture more.
There were too many things making intel_renderbuffer *s and tweaking
their bits.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-12-14 13:18:44 -08:00
Eric Anholt
f22068d5be intel: Move S8 width/height alignment to miptree creation.
We were doing it in the caller in the renderbuffer code, but it was
missed in the separate stencil creation for textures.  Apparently our
testing was using renderbuffers or pre-aligned sizes.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-12-14 13:18:38 -08:00
Eric Anholt
8967f75095 intel: Drop check for wrapped_depth in RB mapping.
This used to be needed because irb->mt would be unset for fake packed
depth/stencil, but no longer.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-12-14 13:18:18 -08:00
Eric Anholt
faa44bc2f6 intel: Fix uninitialized values in debug output for renderbuffer mapping. 2011-12-14 13:18:03 -08:00
Eric Anholt
b2469ff043 swrast: Add a note about overlapping support for framebuffer blit.
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-12-14 13:18:00 -08:00
Eric Anholt
657f3214e7 swrast: Don't do Z24S8 drawpixels fast-paths with Z32_X24S8 input data.
The cool part was that in the "fbo-depthstencil -drawpixels
GL_DEPTH24_STENCIL8 32F_24_8_REV" testcase, the shifting happened to
end up with a value awfully close to the expected value, except for
every other pixel being 0 (the stencil value, shifted away to
nothing).

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-12-14 13:17:45 -08:00
Christian König
5d1de8bc7d st/vdpau: fix unwanted output scaling
vlVdpPresentationQueueDisplay shouldn't scale, so
use size of destination surface as source rectangle.

Based on work of Maarten Lankhorst <m.b.lankhorst@gmail.com>

Signed-off-by: Christian König <deathsimple@vodafone.de>
2011-12-14 14:22:37 +01:00
Christian König
9e51c200a7 st/vdpau: some mixer fixes
Correctly use destination_rect and destination_video_rect
in the mixer, and also use a dirty area tracking for output surfaces.

Based on work of Maarten Lankhorst <m.b.lankhorst@gmail.com>

Signed-off-by: Christian König <deathsimple@vodafone.de>
2011-12-14 14:20:44 +01:00
Christian König
167b1b32c5 g3dvl/compositor: improve dirty area handling
Take viewport and scissors into account and make
the dirty area a parameter instead of a member.

Signed-off-by: Christian König <deathsimple@vodafone.de>
2011-12-14 14:19:41 +01:00
Jian Zhao
606d3a3c3d Add mismatch check for glGetTexImage or it will return -1 and may lead to segment fault.
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-12-14 17:22:47 +08:00
Kenneth Graunke
c87cb98bb4 glsl: Fix crashes caused by Bison error messages involving "'%'".
Invalid shaders containing the character % at an unexpected location
would cause Bison to call yyerror with a message of:

    syntax error, unexpected '%'

Bison expects yyerror() to take a string, while _mesa_glsl_error() is a
printf-style function.  This hit the classic printf string escape issue:

    _mesa_glsl_error(loc, state, "unexpected '%'");       // invalid!
    _mesa_glsl_error(loc, state, "%s", "unexpected '%'"); // correct.

This caused assertion failures after ralloc_asprintf_append called
vsnprintf to determine the length of the text that would be printed:
vsnprintf would see the invalid format and return -1, an invalid length.

The solution is to define a proper yyerror() wrapper function that calls
_mesa_glsl_error with the "%s".  Since we compile with -p "_mesa_glsl",
yyerror is defined as:

    #define yyerror         _mesa_glsl_error

So we have to #undef yyerror in order to be able to declare it.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43564
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Paul Berry <stereotype441@gmail.com>
2011-12-13 22:54:16 -08:00
Ian Romanick
7e9cb2ac6d Regenerate files from previous commits
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2011-12-13 16:07:17 -08:00
Ian Romanick
0c6b930322 glapi/glx: For GLX code, use the existing _X_HIDDEN and _X_INTERNAL defines
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2011-12-13 16:07:17 -08:00
Ian Romanick
bc35da409b glapi/glx: Generate glapi_gentable.c so that the xserver can use it
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2011-12-13 16:07:17 -08:00
Ian Romanick
af50f3bf44 glapi/glx: Generate dispatch.h so that the xserver can use it
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2011-12-13 16:07:17 -08:00
Ian Romanick
2e16875873 glapi/glx: Xserver wants dispatch.h, not glapidispatch.h
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2011-12-13 16:07:17 -08:00
Ian Romanick
c0d2f4c123 glapi/glx: Don't send GL API files to the xserver
The versions in the xserver and in libGL have diverged enough that the
xserver doesn't want these.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2011-12-13 16:07:17 -08:00
Ian Romanick
e089a0e2ee glapi: Remove mention of nonexistent enums
glext.h doesn't have GL_MIN_PROGRAM_TEXEL_OFFSET_EXT or
GL_MAX_PROGRAM_TEXEL_OFFSET_EXT.  Using them in the XML causes code to
be generated for the xserver that won't compile.  Use the names that
exist instead.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2011-12-13 16:07:17 -08:00
Ian Romanick
090dd9428d glapi/glx: Remove g_disptab.h from xserver generated files
That file was removed from the xserver with commit:

    commit a80780a7638f847c3be20e5e0c7fe85e83d9bdd1
    Author: Adam Jackson <ajax@redhat.com>
    Date:   Wed Nov 17 09:03:06 2010 -0500

        glx: Remove swap barrier and hyperpipe support

        Never implemented in any open source driver.  The implementation
        assumed explicit DDX driver knowledge of how the client-side driver
        worked, since at the time the server's GL renderer was not a DRI driver.
        But now, it is, so any implementation of these should be done with
        additional DRI driver API, like the swap control extension.

        Reviewed-by: Julien Cristau <jcristau@debian.org>
        Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
        Signed-off-by: Adam Jackson <ajax@redhat.com>

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2011-12-13 16:07:17 -08:00
Marek Olšák
35d2764f85 r300g: take advantage of KEEP_TILING_FLAGS flush flag
This fixes at least two multi-context-related races.
2011-12-13 21:34:18 +01:00
Marcin Slusarz
10e931219f nouveau: get rid of winsys object
Its only purpose was to destroy itself.
2011-12-13 21:06:29 +01:00
Stéphane Marchesin
642d11da20 i915g: Roll back to the previous shader limits.
Those shader limits seem to be responsible for a piglit hang.
2011-12-13 11:26:49 -08:00
Stéphane Marchesin
f41fd6b6c3 i915g: Update TODO. 2011-12-13 11:26:49 -08:00
Marek Olšák
41b75dc92c winsys/radeon: add flush option not to rewrite tiling flags in registers
Not used yet.
2011-12-13 18:41:17 +01:00
Marek Olšák
df809ae923 mesa: add const flags to skip MaxVarying and MaxUniform linker checks (v2)
This is only temporary until a better solution is available.

v2: print warnings and add gallium CAPs

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-12-13 17:49:00 +01:00
Marek Olšák
8a11d40c4e mesa: fix an out-of-bounds access in prog_print.c
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-12-13 17:49:00 +01:00
Bryan Cain
3b15f5046c glsl_to_tgsi: fix typo in comment 2011-12-13 10:39:52 -06:00
Bryan Cain
d24b44c37d glsl_to_tgsi: emit both operands of shift and bitwise operations
Fixes these operations when native integers are enabled.
2011-12-13 10:39:52 -06:00
Benjamin Franzke
2a58453e25 egl_dri2: Fix some valgrind reported leaks
Free the device_name, reported by Pekka Paalanen.

Destroy wayland display and drm resources,
if created by dri2_initialize_wayland.
2011-12-13 15:32:43 +01:00
Brian Paul
cbd65fe149 mesa: update comments for _DepthBuffer, _StencilBuffer fields
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-12-13 06:45:38 -07:00
Brian Paul
6596aeb4ff mesa: remove _DepthBuffer, _StencilBuffer resize code
This is handled in swrast now when we validate the framebuffer state.

Reviewed-by: Eric Anholt <eric@anholt.net>
2011-12-13 06:45:38 -07:00
Brian Paul
d7c0fac90b swrast: add debug code to test combined depth/stencil buffers
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-12-13 06:45:37 -07:00
Brian Paul
8ba9c22cdb mesa: remove unused depthstencil.[ch] files
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-12-13 06:45:37 -07:00
Brian Paul
6e1228976b mesa: move depth/stencil buffer validation to swrast
Since gl_framebuffer::_DepthBuffer and _StencilBuffer are only used
by swrast, do the validation of those fields in swrast too.
The main/depthstencil.[ch] code is no longer used and will be removed
next.

Reviewed-by: Eric Anholt <eric@anholt.net>
2011-12-13 06:45:37 -07:00
Brian Paul
2ac02ea29f swrast: update depth/stencil wrapper sizes
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-12-13 06:45:37 -07:00
Brian Paul
23527eb357 mesa: build swrast/s_depthstencil.c
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-12-13 06:45:37 -07:00
Brian Paul
ba35094068 swrast: add new s_depthstencil.[ch] files
These files are copies of main/depthstencil.[ch] with s/mesa/swrast/.
The main/depthstencil.[ch] will go away soon.

Reviewed-by: Eric Anholt <eric@anholt.net>
2011-12-13 06:45:37 -07:00
Brian Paul
c0a55cf68a mesa: move update_depth/stencil_buffer() functions
These functions update the gl_framebuffer::_DepthBuffer and _StencilBuffer
fields, possibly creating renderbuffer wrappers that make a shared
depth+stencil accessible as depth-only or stencil only.
This stuff is only used by swrast now and will be moved there next.

Reviewed-by: Eric Anholt <eric@anholt.net>
2011-12-13 06:45:37 -07:00
Brian Paul
2750809b2e radeon: stop using _DepthBuffer, _StencilBuffer fields
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-12-13 06:45:36 -07:00
Brian Paul
a782db5570 nouveau: stop using _DepthBuffer, _StencilBuffer fields
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-12-13 06:45:36 -07:00
Brian Paul
d124092864 mesa: stop using _Depth, _StencilBuffer fields in _mesa_BlitFramebufferEXT()
We're just looking at the depth/stencil renderbuffers to do error
checking.  We don't need to look at the depth/stencil wrappers to do
that.  Also, remove pointless readRb = depthRb = NULL assignments.

Reviewed-by: Eric Anholt <eric@anholt.net>
2011-12-13 06:45:36 -07:00
Brian Paul
02d12719e3 st/mesa: stop using _DepthBuffer, _StencilBuffer fields
We never want to use the depth/stencil buffer wrappers so always just
use the attachment renderbuffers.  This is a step toward removing the
_DepthBuffer, _StencilBuffer fields.

Reviewed-by: Eric Anholt <eric@anholt.net>
2011-12-13 06:45:36 -07:00
Brian Paul
22e806f570 swrast: add missing state validation calls for Blit, Clear 2011-12-13 06:45:36 -07:00
Alex Deucher
23895cc006 r600g: add some new pci ids
fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=43739

Note: this is a candidate for the stable branches.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2011-12-12 09:48:15 -05:00
Marek Olšák
fc52534f01 mesa: fix possible precision issues in pack/unpack/fetch functions
GLfloat doesn't have enough precision to exactly represent 0xffffff
and 0xffffffff. (and a reciprocal of those, if I am not mistaken)

If -ffast-math is enabled, using GLfloat causes assertion failures in:
- fbo-blit-d24s8
- fbo-depth-sample-compare
- fbo-readpixels-depth-formats
- glean/depthStencil

For example:
fbo-depth-sample-compare: main/format_unpack.c:1769:
unpack_float_z_Z24_X8: Assertion `dst[i] <= 1.0F' failed.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-12-12 08:04:51 +01:00
Marek Olšák
4298c88f65 r300g: integer and fixed-point 16.16 textures are not supported 2011-12-12 08:04:51 +01:00
Marek Olšák
1ded658ce0 st/mesa: add color varyings to MaxVarying
The linker now adds color varyings to the number of used varyings and checks
against that limit.

NOTE: This is a candidate for the 7.11 branch.
2011-12-12 08:04:51 +01:00