Commit Graph

44441 Commits

Author SHA1 Message Date
Benjamin Franzke 15d7f1c1c7 st/dri: Implement DRIimageExtension::dupImage 2011-06-23 21:07:17 +02:00
Benjamin Franzke 3af3c58dfd intel: Implement DRIimageExtension::dupImage 2011-06-23 21:07:17 +02:00
Benjamin Franzke 5fbbd4c19f dri: Add dupImage to DRIimageExtension 2011-06-23 21:07:17 +02:00
Benjamin Franzke fa5478c5fe r600g: Add R8G8B8A8_UNORM to evergreen colorswap table
Fixes broken glTexImage2D with format=GL_RGBA since
1a339b6c71

The origin for this behaviour is that r600_is_format_supported
checks only against r600_state_inline.h tables not evergreens.
2011-06-23 21:06:36 +02:00
Marek Olšák 1e5cef96d1 r600g: bump shader input limits 2011-06-23 15:58:49 +02:00
Brian Paul 8a5a28b731 st/wgl: return height, not width for WGL_PBUFFER_HEIGHT_ARB
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=38599
2011-06-23 06:54:53 -06:00
Benjamin Franzke 87c3bb65bb st/egl/wayland: Take resize parameters only if size changes
This matches what we do in egl_dri2, and clients should
behave like this anyway.
2011-06-23 12:17:48 +02:00
Chia-I Wu 7587c140cd st/mesa: use a helper for st_framebuffer creation
In st_api_make_current, we would like to reuse the exising
st_framebuffer if possible.  Use a helper function to make the code
clearer.
2011-06-23 10:36:00 +09:00
Stéphane Marchesin 1a339b6c71 st/mesa: prefer native texture formats when possible.
If possible, we want to match the hardware format to what the app uses. By
doing so, we avoid the need for pixel conversions and therefore greatly speed
up texture uploads.
2011-06-22 17:02:21 -07:00
Stéphane Marchesin 98ce1373e4 i915g: Add draw point sprites.
It's not that much work; hopefully blend func separate also works and we get GL 2.0 for real.
2011-06-22 16:51:02 -07:00
Stéphane Marchesin 468c2c0841 i915g: Fix comment.
Reported-by: Marcin Baczynski <marbacz@gmail.com>
2011-06-22 16:47:36 -07:00
Stéphane Marchesin 465183c6ae i915g: Support more texture and render target formats. 2011-06-22 16:44:54 -07:00
Alex Deucher 5ff22ab229 r600c: add missing bank tiling case for evergreen
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-06-22 12:38:29 -04:00
Alex Deucher c4930cb417 r600g: fix num_banks interpretation on eg+
Field is encoded:
0 = 4 banks
1 = 8 banks
2 = 16 banks

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-06-22 12:34:37 -04:00
Michel Dänzer eb2c9b5814 r600g: Fix use of uninitialized local variable extra_size.
Should fix http://bugs.freedesktop.org/show_bug.cgi?id=38566 .
2011-06-22 16:23:36 +02:00
Thierry Vignaud 76bd1c1818 mesa: add missing DRI Makefiles to tarball
Signed-off-by: Brian Paul <brianp@vmware.com>
2011-06-22 08:22:02 -06:00
Brian Paul 9786688672 mesa: comments and 80-column wrapping 2011-06-22 08:12:10 -06:00
Brian Paul 3c95ff209f mesa: update comments in update_program_enables() 2011-06-22 08:12:10 -06:00
Brian Paul 79dddedfd1 mesa: update/fix comments in update_program() 2011-06-22 08:12:10 -06:00
Brian Paul f3f080e526 mesa: update comment for gl_texture_unit 2011-06-22 08:12:10 -06:00
Marcin Slusarz 50d7d03a79 xorg/nouveau: blacklist all pre NV30 cards
Bail out early in probe, so other driver can take control of the card.
Doing it in screen_create would be too late.
2011-06-22 12:35:40 +02:00
Andre Maasikas 63e8cda9f1 r600c: use BASE_VTX_LOC & AUTO_INDEX for drawing nonindexed with offset
Saves cmd buffer space as we were generating indexes into cs  in this case.
This was laying around in https://bugs.freedesktop.org/show_bug.cgi?id=32768
for a long time.
2011-06-22 12:40:12 +03:00
Alex Deucher 21972c85ea r600g: fix fbo depth/stencil texture allocation for evergreen+
evergreen+ stores depth and stencil separately so when we
allocate a depth/stencil fbo, make sure we allocate enough
memory for both depth and stencil buffers.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-06-21 17:32:42 -04:00
Chad Versace 3db27d4a4a intel: Allocate s8_z24 non-texture renderbuffers when using separate stencil
Now all infrastructure is in place to support s8_z24 non-texture
renderbuffers for gen7.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Chad Versace <chad@chad-versace.us>
2011-06-21 11:22:05 -07:00
Chad Versace 36e05c6870 intel: Unobfuscate intel_alloc_renderbuffer_storage
Hiz buffer allocation can only occur if the 'else' branch has been taken,
so move the hiz buffer allocation into the 'else' branch.

Having the hiz buffer allocation dangling outside of the if-tree was just
damn confusing.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Chad Versace <chad@chad-versace.us>
2011-06-21 11:21:57 -07:00
Chad Versace 39d0e3632a intel: Add fields to intel_renderbuffer for unwrapping packed depth/stencil buffers
Add the following fields:
    intel_renderbuffer.wrapped_depth;
    intel_renderbuffer.wrapped_stencil

If the intel_context is using separate stencil and the renderbuffer has
a packed depth/stencil format, then wrapped_depth and wrapped_stencil are
the real renderbuffers.

Alter the following functions to accomodate the wrapped buffers:
    intel_delete_renderbuffer
    intel_draw_buffer
    intel_get_renderbuffer
    intel_renderbuffer_map
    intel_renderbuffer_unmap

Subsequent commits allocate renderbuffer storage for wrapped_depth and
wrapped_stencil.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Chad Versace <chad@chad-versace.us>
2011-06-21 11:21:57 -07:00
Chad Versace 23ed3b90c7 intel: Unconditionally enable support for S8_Z24 texture format
Commit b5c847c7ca erroneously disabled
support for S8_Z24 texture format when the context required separate
stencil (intel_context.must_use_separate_stencil).

But the GL spec requires implementations to support GL_DEPTH24_STENCIL8.
So we better find a way to fake it...

From page 180 (196 of pdf) of the OpenGL 3.0 spec:
    In addition, implementations are required to support the following
    sized internal [texture] formats.

    [...]

    - Combined depth+stencil formats: DEPTH32F_STENCIL8 and and
      DEPTH24_STENCIL8.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Chad Versace <chad@chad-versace.us>
2011-06-21 11:21:57 -07:00
Benjamin Franzke 0cb356dd5c egl_dri2/wayland: Hook up new buffer.release event 2011-06-21 13:11:43 -04:00
Benjamin Franzke 8c91d751c8 winsys/wayland: Fix warning 2011-06-21 13:11:43 -04:00
Benjamin Franzke 0c74091591 st/mesa: Invalidate drawables on context switch 2011-06-21 15:09:55 +02:00
Dave Airlie e251b3903a r600g: use maths instead of a loop to work out mask.
This is equivalent results with less looping.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-21 15:18:44 +10:00
Dave Airlie 59a402cecd r600g: optimise draw vbo function a bit more.
this drop a bunch of unnecessary checks (i.e. should be trapped
at gallium level), and also removes the switch statement in favour
of some calculated values for the vgt values.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-21 14:20:49 +10:00
Pierre-Eric Pelloux-Prayer abe74a9820 r600g: reorder LIT instructions to support src == dst
the attached patch should be an improvement over Vadim Girlin's patch
fixing LIT instruction for r600g (commit
2fe39b46e7).

Instructions used in tgsi_lit have been reordered to always write to a
dst channel after the same channel in src has been read (so if src ==
dst, input values are not overwritten before being used).

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-21 12:50:44 +10:00
Ben Skeggs 4112ca54e3 nvfx: nasty hack to make glFinish() actually finish..
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-06-21 12:59:53 +10:00
Stéphane Marchesin 75be6b76ee glx: Fix compile. 2011-06-20 17:19:00 -07:00
Stéphane Marchesin 649d03d54d st/mesa: Remove unneeded texture format terminators.
Signed-off-by: Brian Paul <brianp@vmware.com>
2011-06-20 18:15:50 -06:00
Brian Paul bc60a7515a st/mesa: put const qualifer on format_map table 2011-06-20 18:15:50 -06:00
Jeremy Huddleston 4fbdde889c glx: Bind to our context before __glXSetCurrentContext
We want to bind to our context before calling __glXSetCurrentContext or
messing with the gc rect in order to properly handle error conditions.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-20 16:54:58 -07:00
Jeremy Huddleston 517614141b glx: Destroy the old context only after the new one has been bound
This fixes a regression introduced by 49d7e48b33

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-20 16:54:58 -07:00
Jeremy Huddleston 559e4f8ebc glx: Allow a context-specific fallback for glXGetProcAddress
In applegl, GLX advertises the same extensions provided by OpenGL.framework
even if such extensions are not provided by glapi.  This allows a client
to get access to such API.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-20 16:54:58 -07:00
Jeremy Huddleston fbd7448977 glapi: Update specs to correctly list FramebufferTextureLayerARB as an alias of FramebufferTextureLayerEXT
FramebufferTextureLayer is an alias of FramebufferTextureLayerEXT, so
FramebufferTextureLayerARB needs to be listed as an alias of
FramebufferTextureLayerEXT rather than FramebufferTextureLayer.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-20 16:54:58 -07:00
Ian Romanick de77324d8f linker: Reject shaders that use too many varyings
Previously it was up to the driver or later code generator to reject
these shaders.  It turns out that nobody did this.

This will need changes to support geometry shaders.

NOTE: This is a candidate for the stable branches.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=37743
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-06-20 15:01:10 -07:00
Dan Nicholson 4e5c51a05e glw: Mark all extern symbols GLAPI to regain default visibility (#31294)
Since switching to hidden visibility on gcc, GLw apps were failing to
link. Use the GLAPI definition to use default visibility where necessary.

$ nm lib/libGLw.so | grep DrawingArea
0000000000004020 T GLwCreateMDrawingArea
0000000000003430 T GLwDrawingAreaMakeCurrent
0000000000003410 T GLwDrawingAreaSwapBuffers
0000000000204c60 D glwDrawingAreaClassRec
0000000000204d48 D glwDrawingAreaWidgetClass
00000000002053c0 D glwMDrawingAreaClassRec
00000000002054e0 D glwMDrawingAreaWidgetClass

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Tested-by: justin <jlec@gentoo.org>
2011-06-20 12:31:01 -07:00
Eric Anholt f6e5230b26 i965/gen6: Apply documented workaround for nonpipelined state packets.
Fixes a 100% reproducible GPU hang in topogun-1.06-orc-84k.trace.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-06-20 08:42:16 -07:00
Eric Anholt 0ab7d6f437 i965/gen6: Limit the workaround flush to once per primitive.
We're about to call this function in a bunch of state emits, so let's
not spam the hardware with flushes too hard.
2011-06-20 08:37:43 -07:00
Eric Anholt dfada714f8 i965/gen6: Use an BO instead of writing to address 0 for PIPE_CONTROL W/A.
This was spectacularly unsafe.  On my system, address 0 happens to be
the hardware status page for the render ring, and the first quadword
of that happens to contain nothing we ever look at, but I sure didn't
look forward to having to debug some day when, for example, the kernel
happened to bind the ringbuffer before binding the hwsp.
2011-06-20 08:37:43 -07:00
Eric Anholt 8f9e8d79c8 i965/gen6: Factor the PIPE_CONTROL workaround to a separate function.
We're need this workaorund a lot more than we're currently doing, so
let's reuse it.
2011-06-20 08:37:43 -07:00
Eric Anholt 911768700e i965/gen6: Remove state flagging on BRW_NEW_CURBE_OFFSETS.
That flag was leftover from gen4, where brw_curbe.c is choosing ranges
of the CURBE space for constants to live in, and the unit state tells
where to load them from.  That's not the case on gen6 -- we don't set
this flag (since constants aren't in the URB), nor do we have any
state like that to upload.
2011-06-20 08:37:43 -07:00
Eric Anholt c860f48f11 i965/gen4: Remove old VS unit state key structure.
We're streaming VS state out now, not caching it.
2011-06-20 08:37:42 -07:00
Eric Anholt 7d4d608240 i965/gen6: Add missing state flag for VS push constants.
It was already annotated up above and everything.
2011-06-20 08:37:42 -07:00