Commit graph

49245 commits

Author SHA1 Message Date
nobled
03bfdb2bad gen_matypes: eliminate printf warnings
The VERT_BIT_* defines are 64-bit values now, but the printf
was still expecting a simple int.
2011-12-18 17:08:31 +00:00
Marek Olšák
745d990b8d r600g: fix MAX_STREAM_OUTPUT_SEPARATE_ATTRIBS limit 2011-12-17 19:42:13 +01:00
Marek Olšák
211520450b mesa/x86: fix printf warning 2011-12-17 15:14:03 +01:00
Marek Olšák
5016b09f89 drisw: remove unused variable 2011-12-17 15:13:37 +01:00
Marek Olšák
a3bfbccd0a r600g: handle new caps 2011-12-17 15:13:23 +01:00
Marek Olšák
f47da7f580 r300g: handle new caps 2011-12-17 15:12:59 +01:00
Marek Olšák
06dcb17725 docs: update GL3 status 2011-12-17 14:56:21 +01:00
Marek Olšák
543b2331d7 r600g: implement transform feedback
r600: DONE.
r700: MOSTLY (done but locks up).
Evergreen: MOSTLY (done but doesn't work for an unknown reason).

The kernel support will come soon.
2011-12-17 14:56:21 +01:00
Marek Olšák
047363a07b st/mesa: expose conservative_depth if GLSL 1.3 is supported
It's not yet, but it can be enabled by the override environment variable.
2011-12-17 14:56:21 +01:00
Vinson Lee
95aa0e5d84 gallivm: Fix build with llvm-3.1svn.
llvm-3.1svn r145714 moved global variables into a new TargetOptions
class. TargetMachine constructor now needs a TargetOptions object as
well.

Signed-off-by: Vinson Lee <vlee@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-12-16 21:22:39 -08:00
Vinson Lee
5d32b00db9 mesa: Fix memory leak on error path.
Fixes Coverity resource leak defect.

Signed-off-by: Vinson Lee <vlee@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-12-16 21:21:01 -08:00
Vinson Lee
7b6b5f5102 st/mesa: Fix memory leak in out-of-memory path.
Fixes Coverity resource leak defect.

Signed-off-by: Vinson Lee <vlee@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-12-16 17:51:41 -08:00
Brian Paul
cf79e22509 meta: use _mesa_prepare_mipmap_level() in the mipmap generation code
See previous commit for more information.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-12-16 12:14:32 -07:00
Brian Paul
d77b963245 mesa: new _mesa_prepare_mipmap_level() function for mipmap generation
This helper function is used during mipmap generation to prepare space
for the destination mipmap levels.

This improves/fixes two things:
1. If the texture object was created with glTexStorage2D, calling
   _mesa_TexImage2D() to allocate the new image would generate
   INVALID_OPERATION since the texture is marked as immutable.
2. _mesa_TexImage2D() always frees any existing texture image memory
   before allocating new memory.  That's inefficient if the existing
   image is the right size already.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-12-16 12:14:27 -07:00
Brian Paul
d842a118b2 mesa: make update_fbo_texture() non-static
We'll call this from the mipmap generation code.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-12-16 12:13:35 -07:00
Brian Paul
45bd5c43ca mesa: whitespace and comment fixes in fbobject.c 2011-12-16 08:44:43 -07:00
Brian Paul
2b3fdb1fae mesa: add MESA_FORMAT_RGB565[_REV] as candidates for GL_R3_G3_B2
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-12-16 08:44:43 -07:00
Brian Paul
3d3a21c5fa vbo: add comment for map_vp_non[] array 2011-12-16 08:44:43 -07:00
Brian Paul
89da5a1415 mesa: add a few comments for the z unpacking functions 2011-12-16 08:44:42 -07:00
Anuj Phogat
36a484bc98 Enabling display list support for glClearBuffer functions with minor fixes
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Ian Romanick <idr@freedesktop.org>
2011-12-15 15:28:38 -08:00
Fredrik Höglund
cf59483808 gallium: fix a crash in drivers that don't support stream output 2011-12-15 20:50:29 +01:00
Christoph Bumiller
97144eef03 llvmpipe: adapt to struct stream_output_info modifications
My fault, I broke it with v5 of 861a029ddb.
2011-12-15 20:10:16 +01:00
Christoph Bumiller
14bd9d7648 nvc0: implement new stream output interface 2011-12-15 18:51:48 +01:00
Christoph Bumiller
14193da589 d3d1x: implement new stream output interface 2011-12-15 18:51:48 +01:00
Marek Olšák
c05fafa4a0 st/mesa: implement EXT_transform_feedback and ARB_transform_feedback2 2011-12-15 18:51:48 +01:00
Marek Olšák
36d66f8d4a u_blitter: implement copy_buffer using stream output 2011-12-15 18:51:48 +01:00
Marek Olšák
b177e2c54c u_blitter: restore stream output targets 2011-12-15 18:51:48 +01:00
Christoph Bumiller
1114b192af trace: implement stream output interface 2011-12-15 18:51:48 +01:00
Marek Olšák
6a00e4eaee noop: implement stream output 2011-12-15 18:51:48 +01:00
Marek Olšák
8a9a37cebe gallium: utility helper functions for stream output 2011-12-15 18:51:48 +01:00
Marek Olšák
861a029ddb gallium: interface changes necessary to implement transform feedback (v5)
Namely:
- EXT_transform_feedback
- ARB_transform_feedback2
- ARB_transform_feedback_instanced

The old interface was not useful for OpenGL and had to be reworked.

This interface was originally designed for OpenGL, but additional
changes have been made in order to make st/d3d1x support easier.

The most notable change is the stream-out info must be linked
with a vertex or geometry shader and cannot be set independently.
This is due to limitations of existing hardware (special shader
instructions must be used to write into stream-out buffers),
and it's also how OpenGL works (stream outputs must be specified
prior to linking shaders).

Other than that, each stream output buffer has a "view" into it that
internally maintains the number of bytes which have been written
into it. (one buffer can be bound in several different transform
feedback objects in OpenGL, so we must be able to have several views
around) The set_stream_output_targets function contains a parameter
saying whether new data should be appended or not.

Also, the view can optionally be used to provide the vertex
count for draw_vbo. Note that the count is supposed to be stored
in device memory and the CPU never gets to know its value.

OpenGL way | Gallium way
------------------------------------
BeginTF    = set_so_targets(append_bitmask = 0)
PauseTF    = set_so_targets(num_targets = 0)
ResumeTF   = set_so_targets(append_bitmask = ~0)
EndTF      = set_so_targets(num_targets = 0)
DrawTF     = use pipe_draw_info::count_from_stream_output

v2: * removed the reset_stream_output_targets function
    * added a parameter append_bitmask to set_stream_output_targets,
      each bit specifies whether new data should be appended to each
      buffer or not.
v3: * added PIPE_CAP_STREAM_OUTPUT_PAUSE_RESUME for ARB_tfb2,
      note that the draw-auto subset is always required (for d3d10),
      only the pause/resume functionality is limited if the CAP is not
      advertised
v4: * update gallium/docs
v5: * compactified struct pipe_stream_output_info, updated dump/trace
2011-12-15 18:51:48 +01:00
Marek Olšák
4f4a1be200 gallium: disable stream output in drivers that support it
I am going to make interface changes and I don't want to break compilation.
2011-12-15 18:50:44 +01:00
Marek Olšák
14bb957b99 mesa: implement DrawTransformFeedback from ARB_transform_feedback2
It's like DrawArrays, but the count is taken from a transform feedback
object.

This removes DrawTransformFeedback from dd_function_table and adds the same
function to GLvertexformat (with the function parameters matching GL).

The vbo_draw_func callback has a new parameter
"struct gl_transform_feedback_object *tfb_vertcount".

The rest of the code just validates states and forwards the transform
feedback object into vbo_draw_func.
2011-12-15 18:50:44 +01:00
Thomas Hellstrom
3baaa1bbd7 st/xa: Disable composite solid fill with mask
Xa doesn't support it yet. Trying to do that would cause a segfault.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2011-12-15 08:28:22 +01:00
Thomas Hellstrom
aa7d7656f5 st/xa: Fix format conversion copy alpha channel
When doing format conversion copies between a format without an
alpha channel and a format with an alpha channel, make sure the
destination alpha is set to 1.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2011-12-15 08:28:09 +01:00
Thomas Hellstrom
11c9459ba0 st/xa: Fix component alpha check
Component alpha only affects mask pictures.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2011-12-15 08:27:47 +01:00
Chia-I Wu
7aadb53ef0 st/egl: fix compiler warnings
One is about casting a pointer to integer and the other is about an unused
function when HAVE_WAYLAND_BACKEND is not defined.
2011-12-15 15:07:00 +08:00
Fredrik Höglund
a06f58fee5 st/egl: Implement EGL_NOK_swap_region for x11
v2: inline x11_drawable_copy_buffers().

Signed-off-by: Fredrik Höglund <fredrik@kde.org>

[olv: s/inline/INLINE/]
2011-12-15 15:02:56 +08:00
Fredrik Höglund
fa0f70e45e st/egl: Add support for EGL_NOK_swap_region
Backends indicate that they support this extension by returning
EGL_TRUE when native_display::get_param() is called with
NATIVE_PARAM_PRESENT_REGION and NATIVE_PARAM_PRESERVE_BUFFER.

native_present_control is extended to include the region that should
be presented. When native_present_control::num_rects is zero,
the whole surface is to be presented.

Signed-off-by: Fredrik Höglund <fredrik@kde.org>
2011-12-15 15:00:15 +08:00
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