Commit Graph

49622 Commits

Author SHA1 Message Date
Marek Olšák e05bc52b9c r300g: don't use pipe_screen::winsys 2012-02-17 01:39:48 +01:00
Marek Olšák c9e9cfbf60 r300g: don't use pipe_context::winsys 2012-02-17 01:26:56 +01:00
Ian Romanick f16c40d2f6 mesa: Update the version string to 8.1-devel
The numeric version was updated in 46883e0.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2012-02-16 15:29:26 -08:00
Brian Paul ca1b2da300 docs: replace gitweb link with cgit link 2012-02-16 13:35:02 -07:00
Brian Paul 6f3d918409 mesa: add missing texture integer test in glTexSubImage()
If the texture format is integer, the incoming user data must also be
integer (and similarly for non-integer textures).

NOTE: This is a candidate for the stable branches.

Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-02-16 09:37:11 -07:00
Marek Olšák b0b8121813 r600g: remove the workaround for quads and provoking vertex 2012-02-16 17:15:50 +01:00
Marek Olšák 73191026b4 r600g: remove redundant r600_context::vs_so_stride_in_dw 2012-02-16 15:56:59 +01:00
Kenneth Graunke 709f50928e i965: Emit Ivybridge VS workaround flushes.
I recently discovered this text in the BSpec.  It seems wise to comply,
though I haven't observed it to fix anything yet.

Fixes a regression in glean/fbo since 28cfa1fa21.

NOTE: This is a candidate for stable release branches.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45221
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-02-15 22:17:39 -08:00
Eric Anholt b631b471d8 mesa: Include the multisample enables under GL_MULTISAMPLE_BIT attrib as well.
Fixes (with the previous commit) piglit GL_ARB_multisample/pushpop.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-02-15 15:31:33 -08:00
Eric Anholt 4b6e45c7d6 mesa: Fix push/pop of multisample coverage invert.
In the table of of push/pop attributes, this one doesn't fall under
the enable group.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-02-15 15:31:24 -08:00
Ian Romanick 3e22d4e5fc swrast: Only avoid empty _TexEnvPrograms
If the generated shader for _TexEnvProgram is empty, force the use of
the fixed-function code.  Otherwise, go ahead and use the shader.
This works around a mysterious issue on i915 where fixed-function
software fallbacks are not working correctly.

This isn't really the fix we want, but it works around the issue.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45872
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45876
2012-02-15 14:50:40 -08:00
Ian Romanick 8f3be33985 glapi: Include GLES2 headers for ES2 extension functions
This fixes build errors like

In file included from glapi_dispatch.c:91:
../../../src/mapi/glapi/glapitemp.h:4641: error: no previous prototype for
'glDrawBuffersNV'

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Lucas Stach <dev@lynxeye.de>
2012-02-15 14:50:00 -08:00
Brian Paul 7539a0d677 st/mesa: fix typo: s/patent/parent/ 2012-02-15 14:37:07 -07:00
Brian Paul 456a02b0c7 st/mesa: remove unused st_equal_formats() function
It was incomplete and didn't take byte swapping into account either.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2012-02-15 14:09:01 -07:00
Brian Paul c9d0526084 st/mesa: use _mesa_format_matches_format_and_type() in decompress_with_blit()
st_equal_formats() is no longer used now.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2012-02-15 14:09:01 -07:00
Brian Paul b549fd138e st/mesa: remove INLINE qualifiers
from st_get/create_texture_sampler_view_from stobj() functions.
No real value in these cases.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2012-02-15 14:09:01 -07:00
Brian Paul 9600b0762b st/mesa: simplify st_create_texture_sampler_view()
Implement in terms of st_create_texture_sampler_view_format().

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2012-02-15 14:09:01 -07:00
Brian Paul 91ec17835f st/mesa: remove unused st_get_texture_sampler_view()
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2012-02-15 14:09:01 -07:00
Brian Paul 0315cb9f8f st/mesa: use private pipe_sampler_view in decompress_with_blit()
Similar to the previous commit.  Also fix incorrect setting of the
sampler view's state after it's created.  We need to specify the
first/last_level fields in the template instead.

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2012-02-15 14:09:01 -07:00
Brian Paul c5ba6a7807 st/mesa: use private pipe_sampler_view in st_render_mipmap()
Rather than the one in st_texture_object.  This sampler view really has
no connection to the one used for rendering.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2012-02-15 14:09:01 -07:00
Brian Paul 0bda900743 mesa: use z32f_x24s8 struct in format pack/unpack code
And remove needless & 0xff in _mesa_pack_uint_24_8_depth_stencil_row().
As suggested by José.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2012-02-15 14:08:50 -07:00
Brian Paul dba7ad0ca9 st/mesa: assorted clean-ups in st_cb_fbo.c
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2012-02-15 14:07:43 -07:00
Brian Paul 418306397f st/mesa: remove st_framebuffer_renderbuffer()
Just use _mesa_framebuffer_renderbuffer().

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2012-02-15 14:07:43 -07:00
Brian Paul ea2aca036c st/mesa: remove st_get_default_texture()
Just use _mesa_get_fallback_texture() instead.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2012-02-15 14:07:43 -07:00
Brian Paul c04db7f7fa mesa: fix _mesa_get_fallback_texture() to handle all texture targets
Previously, this function only handled 2D textures.

The fallback texture is used when we try to sample from an incomplete
texture object.  GLSL says sampling an incomplete texture should return
(0,0,0,1).

v2: use a 1-texel texture image, per José.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2012-02-15 14:07:43 -07:00
Brian Paul 447071cfb0 st/mesa: improve assertion/check for stencil format 2012-02-15 14:07:43 -07:00
Brian Paul f1334f232f gallium: fix some comments in p_state.h
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2012-02-15 14:07:43 -07:00
Brian Paul 82ddd1129e mesa: add MESA_FORMAT_Z32_FLOAT_X24S8 case in format unpack code
Added in _mesa_pack_uint_24_8_depth_stencil_row().  This could be hit
by something like glDrawPixels(GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8)
into a MESA_FORMAT_Z32_FLOAT_X24S8 buffer.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2012-02-15 14:07:43 -07:00
Brian Paul 5e81d3b853 st/mesa: use _mesa_pack_ubyte_stencil_row() in draw_stencil_pixels()
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2012-02-15 14:07:43 -07:00
Brian Paul 5a70e12fc0 st/mesa: don't set PIPE_BIND_DISPLAY_TARGET for user-created renderbuffers
The st_renderbuffer_alloc_storage() function is used to allocate both
window-system buffers and user-created renderbuffers.  The later kind
are never directly displayed so don't set PIPE_BIND_DISPLAY_TARGET for
those surfaces.

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2012-02-15 14:07:43 -07:00
Brian Paul fc855f85d0 st/mesa: use u_surface_default_template() helper
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2012-02-15 14:07:43 -07:00
Brian Paul d9ae5db6e3 st/mesa: remove redundant memset(surface_template,0)
The subsequent u_surface_default_template() call does that for us.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2012-02-15 14:07:43 -07:00
Brian Paul 2e12b4cfef st/mesa: remove st_renderbuffer::stride
It was only used for software buffers and easily computed.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2012-02-15 14:07:43 -07:00
Brian Paul d765c8ee8c st/mesa: remove st_renderbuffer::format
We only used it in a few places that can implemented differently.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2012-02-15 14:07:43 -07:00
Brian Paul dbe88515c5 mesa: fix comment typos in fbobject.c 2012-02-15 14:07:43 -07:00
Kenneth Graunke 4b27406820 i965/fs: Take # of components into account in try_rewrite_rhs_to_dst.
Commit dc7f449d1a introduced a new method
for avoiding MOVs: try to rewrite the destination of the instruction
that produced the RHS so it writes into the LHS.

Unfortunately, this is not safe for swizzled texturing operations, as
they return a set of four contiguous registers.  Consider the following:

(assign (x)
        (var_ref vec_ctor_x)
        (swiz x (tex vec4 (var_ref m_sampY) (var_ref m_cordY) 0 1 ())))

In this case, the source and destination registers are equal, since
reg_offset is 0 for both.  Yet, this is only a partial move: the texture
operation generates four registers, and the LHS only covers one.

Fixes color distortion in XBMC when using GLSL shaders.

NOTE: This is a candidate for the 8.0 branch (with the previous commit).

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44333
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2012-02-15 11:44:37 -08:00
Kenneth Graunke 8ab02b5118 i965/fs: Add a new fs_inst::regs_written function.
Certain instructions write more than one register.  Texturing, for
example, returns 4 registers.  (We set rlen to 4 even for TXS and float
shadow sampling.)  Some math functions return 2.  Most return 1.

The next commit introduces a use of this function.

NOTE: This is a candidate for the 8.0 branch (dependency of a fix).

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2012-02-15 11:44:05 -08:00
Dave Airlie c89b471f8c llvmpipe: fix fogcoord writing (v2)
this fixes the fogcoord related piglit tests, like I fixed them in softpipe.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-02-15 19:25:27 +00:00
Anuj Phogat 66bf25f1a2 meta: Avoid FBO resizing/reallocating in decompress_texture_image
Reallocate/resize decompress FBO only if texture image width/height is
greater than existing decompress FBO width/height.

This is a candidate for stable branches.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-02-15 09:23:13 -08:00
Christian König 78734e375a st/vdpau: fix a small memory leak
The matrix filter wasn't freed on mixer destruction.

Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-02-14 22:32:08 +01:00
Christian König 553e820387 vl: fix low strength denoise filter
A filter strength of zero or one doesn't make any
sense. Thanks to Andy Furniss for pointing this out.

Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-02-14 22:31:29 +01:00
Jerome Glisse 356eb0aadb r600g: fix tiling with cayman and virtual memory
The virtual address but follow the alignment requirement of the
tiled surface. The bo from handle case is not properly fix. Need
bigger change for a proper fix. Work around that by enforcing 1M
alignment for those bo.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2012-02-14 15:56:09 -05:00
Paul Berry 6b0a07f9ce i915: Fix type of "specoffset" variable.
Commit 2e5a1a2 (intel: Convert from GLboolean to 'bool' from
stdbool.h.) converted the "specoffset" local variable (in
intel_tris.c) from a GLboolean to a bool.  However, GLboolean was the
wrong type for specoffset--it should have been a GLuint (to match the
declaration of specoffset in struct intel_context).

This patch changes specoffset to the proper type.

Fixes piglit test general/two-sided-lighting-separate-specular.

This is a candidate for stable branches.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45917
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-02-14 11:40:02 -08:00
Eric Anholt 93831a54c7 i965/fs: Enable register spilling on gen7 too.
It turns out the same messages work on gen7, we were just being paranoid.

Fixes the penumbra shadows mode of Lightsmark since the register
allocation fix.

NOTE: This is a candidate for release branches.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-02-14 10:19:04 -08:00
Eric Anholt a7f46eadea i965: Report the failure message when failing to compile the fragment shader.
We just abort later, but at least this should result in more
informative bug reports.

NOTE: This is a candidate for release branches.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-02-14 10:19:04 -08:00
Simon Farnsworth 8cd03b933c r600g: Use a fake reloc to sleep for fences
r300g is able to sleep until a fence completes rather than busywait because
it creates a special buffer object and relocation that stays busy until the
CS containing the fence is finished.

Copy the idea into r600g, and use it to sleep if the user asked for an
infinite wait, falling back to busywaiting if the user provided a timeout.

Note: this is a candidate for the stable branches.

Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2012-02-14 09:56:23 -05:00
Marek Olšák 014198ec88 r600g: consolidate set_blend_color code 2012-02-14 15:51:59 +01:00
Marek Olšák 5cc9aa0e02 r600g: consolidate more translate functions 2012-02-14 15:49:24 +01:00
Marek Olšák d214275ace r600g: inline r600_translate_ds_func 2012-02-14 15:49:24 +01:00
Marek Olšák 85571ed53c r600g: remove unused variable 2012-02-14 15:49:24 +01:00