Commit Graph

49455 Commits

Author SHA1 Message Date
José Fonseca a206c4cd69 gallivm: Fix TGSI_OPCODE_ARR's translation.
Like TGSI_OPCODE_ARL, destination should be an integer.

This fixes invalid LLVM IR on an internal state tracker (currently Mesa
never emits this opcode).

In the future consider making ADDR register also a integer-as-float array,
like all other register kinds, or simply replace ADDR & ARR/ARL with
integer temp and instructions.

Reviewed-by: Dave Airlie <airlied@redhat.com>
2012-02-21 08:23:20 +00:00
Vinson Lee d394bc5853 st/egl: Move drm_display_authenticate into HAVE_WAYLAND_BACKEND section.
Fixes this GCC warning.
native_drm.c:153:1: warning: ‘drm_display_authenticate’ defined but not
used [-Wunused-function]

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
2012-02-20 13:17:23 -08:00
José Fonseca dbadd39508 llvmpipe: Don't assume vector is 4 wide in lp_build_sin()/lp_build_cos()
Reviewed-by: Dave Airlie <airlied@redhat.com>
2012-02-20 17:07:22 +00:00
Brian Paul d2003ee7b7 mesa: check for no state change in glPrimitiveRestartIndex()
Reviewed-by: José Fonseca <jfonseca@vmware.com>
2012-02-20 08:04:34 -07:00
Brian Paul 45453d8f69 mesa: check for no state change in Enable/DisableVertexAttribArray()
Avoid setting dirty state flags when enabling or disabling a vertex
attribute arrays when there's no change.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
2012-02-20 08:04:33 -07:00
Brian Paul e14b357367 mesa: add missing return after _mesa_error() in update_array()
NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
2012-02-20 08:04:33 -07:00
Tom Stellard e1044b4082 r300g: Fix build when libdrm is installed to non-standard dir 2012-02-19 19:40:32 -05:00
Kenneth Graunke df5963c256 i965: Make the dummy fragment shader work in SIMD16 mode.
If you're resorting to the dummy shader, you've probably already turned
off SIMD16 mode.  But if you didn't, it would die in a fire.

We could either fail to compile in SIMD16 mode...or just fix it.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-02-18 20:12:46 -08:00
Kenneth Graunke 393b42240f i965: Fix GPU hangs in the dummy fragment shader.
The dummy FB write failed to specify EOT and a message length, causing
the GPU to hang.  Now we can enjoy "everyone's favorite color" again.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-02-18 20:12:38 -08:00
Vinson Lee 0342ffba1f st/vega: Remove unused variable.
Fixes this GCC warning.
mask.c: In function ‘mask_layer_fill’:
mask.c:387:12: warning: variable ‘alpha_color’ set but not used
[-Wunused-but-set-variable]

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
2012-02-18 11:09:27 -08:00
Vinson Lee e77e88740d st/glx: Remove unused variables.
Fixes these GCC warnings.
glx_api.c: In function ‘choose_visual’:
glx_api.c:678:8: warning: variable ‘trans_value’ set but not used
[-Wunused-but-set-variable]
glx_api.c:677:8: warning: variable ‘trans_type’ set but not used
[-Wunused-but-set-variable]
glx_api.c:663:8: warning: variable ‘min_ci’ set but not used
[-Wunused-but-set-variable]

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
2012-02-18 11:02:01 -08:00
Dave Airlie c67a1f1d53 draw: add missing streamout state setup for draw/llvm.
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-02-18 12:44:10 +00:00
Kenneth Graunke 6e738d35c5 vbo: Eliminate short-circuiting in invalid-start case.
Now that we have a index_range_invalid flag, we can just use that rather
than calling vbo_validated_drawrangeelements directly and returning.

NOTE: This is a candidate for release branches.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-02-17 14:57:11 -08:00
Kenneth Graunke 112b02c324 vbo: Rework checking of 'end' against _MaxElement.
This failed to take basevertex into account:

If basevertex < 0:
   (end + basevertex) might actually be in-bounds while 'end' is not.
   We would have clamped in this case when we probably shouldn't.
   This could break application drawing.

If basevertex > 0:
   'end' might be in-bounds while (end + basevertex) might not.
   We would have failed to clamp in this place.  There's a comment
   indicating the TNL module depends on max_index being in-bounds;
   if so, it would likely break horribly.

Rather than trying to clamp correctly in the face of basevertex, simply
delete the clamping code and indicate that we don't have a valid range.
This causes _tnl_vbo_draw_prims to use vbo_get_minmax_indices() to
compute the actual bounds, which is much safer.

NOTE: This is a candidate for release branches.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2012-02-17 14:56:55 -08:00
Kenneth Graunke f00c97b23f vbo: Ignore invalid element ranges which are outside VBO bounds.
Some applications, such as Regnum Online, appear to pass invalid
start/end values to glDrawRangeElements.  In particular, the 'start'
index sometimes exceeds the maximum array element.  This is clearly
invalid behavior, and although the spec isn't clear, seems to result
in undefined, implementation-specific behavior.

This patch takes the conservative approach and simply ignores the range,
while issuing a warning indicating that the application is broken and
should be fixed.

NOTE: This is a candidate for release branches.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45214
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44701
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41152
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=40361
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=28138
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com> [v1]
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2012-02-17 14:56:44 -08:00
Kenneth Graunke f9be8543aa vbo: Remove pedantic warning about 'end' beind out of bounds.
The application supplied [start, end] range is merely a conservative
hint of the ranges of index values inside the index buffer.  There is no
requirement that all vertices in the range [start, end] be referenced.

Passing an 'end' value larger than the maximum legal index is perfectly
acceptible; applications can legally pass 0xffffffff when they don't
have a tighter bound readily available.

Thus, the warning doesn't indicate a correctness issue; it could only
indicate a performance issue.  However, it does not even do that.

glDrawRangeElements is designed to optimize non-VBO vertex data uploads
by providing an upper bound on the size of buffers a driver would need
to allocate.  With VBOs, the data is already in an uploaded buffer, so
the range doesn't help.

The clincher is: we only know _MaxElement for VBOs.  For user-space
arrays, we just set it to 2,000,000,000 (see mesa/main/varray.h:63.)
So we can only check this in the case where it is not useful.

Many applications, including the Unigine demos, currently trigger this
warning, which suggests the applications are buggy when they're actually
fine.  Eliminating the warning should confuse users less while not
actually losing any benefit to application developers.

NOTE: This is a candidate for release branches.

Suggested-by: Jose Fonseca <jfonseca@vmware.com>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2012-02-17 14:56:24 -08:00
Eric Anholt e2dce7f7ee intel: Fix rendering from textures after RenderTexture().
There's a serious trap for drivers: RenderTexture() does not indicate
that the texture is currently bound to the draw buffer, despite
FinishRenderTexture() signaling that the texture is just now being
unbound from the draw buffer.

We were acting as if RenderTexture() *was* the start of rendering and
that we could make texturing incoherent with the current contents of
the renderbuffer.  This caused intel oglconform sRGB
Mipmap.1D_textures to fail, because we got a call to TexImage() and
thus RenderTexture() on a texture bound to a framebuffer that wasn't
the draw buffer, so we skipped validating the new image into the
texture object used for rendering.

We can't (easily) make RenderTexture() indicate the start of drawing,
because both our driver and gallium are using it as the moment to set
up the renderbuffer wrapper used for things like MapRenderbuffer().
Instead, postpone the setup of the workaround render target miptree
until update_renderbuffer time, so that we no longer need to skip
validation of miptrees used as render targets.  As a bonus, this
should make GL_NV_texture_barrier possible.

(This also fixes a regression in the gen4 small-mipmap rendering since
3b38b33c16, which switched
set_draw_offset from image->mt to irb->mt but didn't move the irb->mt
replacement up before set_draw_offset).

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44961
NOTE: This is a candidate for the 8.0 branch.
2012-02-17 13:31:27 -08:00
Eric Anholt 308c6be802 intel: Improve the fallback debug for framebuffer status checks. 2012-02-17 13:31:27 -08:00
Eric Anholt a1fd13fff1 mesa: Only end render-to-texture at bind time for drawbuffers.
If we're only starting for new draw buffers, why would we end for old
read buffers along with draw buffers?
2012-02-17 13:31:27 -08:00
Dave Airlie 7199b0b681 gallivm: fetch immediates to correct type (v2)
Fetch float/uint/int immediates.

v2: bitcast to uint/int to floats as per Jose's suggestions.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-02-17 17:39:02 +00:00
Dave Airlie 117a0e91af gallivm: enable stores of integer types. (v2) + fix ARL
Infer from the operand the type of value to store.
MOV is untyped but we use the float store path.

v2: make MOV use float store path.

I've had to squash merge the ARL fix to be stored
as an integer in here to avoid regressions in a number
of piglit tests.

From now on ARL stores to an integer just like HW does.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-02-17 17:39:02 +00:00
Dave Airlie 141f2c2fc9 gallivm: enable fetch for integer opcodes. (v2)
The infers the type of data required using the opcode,
and casts the input to the appropriate type.

So far this only handles non-indirect constant and temporaries.

v2: as per Jose suggestion, fetch immediates via floats

Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-02-17 17:39:02 +00:00
Dave Airlie 66461aa249 gallivm: add uint/int bld to the base builder. (v2)
These are used inside the action handlers for the integer opcodes.

v2: use uint_bld/int_bld, drop higher level uint_bld.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-02-17 17:39:02 +00:00
Dave Airlie f667a6f3ce gallivm: fix build gather to take a bld context
Then pass the correct build context to it.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-02-17 17:39:01 +00:00
Dave Airlie 639fbe2e75 gallivm: pass build context to exec_mask_store.
For now just pass the current context, but when we want to
store int or unsigned we need to pass those later.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-02-17 17:39:01 +00:00
Dave Airlie 13e2e51f70 tgsi: add source/destination type from opcodes. (v2)
These two functions produce the src/dst types for an opcode.

MOV is special since it can be used to mov float->float and int->int,
so just return VOID.

v2: use a new enum for the opcode type as per Jose's suggestion.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-02-17 17:39:01 +00:00
José Fonseca 9be0f9b0e4 gallivm: Initialize x86 disassembler on x86_64 too. 2012-02-17 17:22:23 +00:00
José Fonseca e648f5e197 llvmpipe: Test lp_test_arit with LP_NATIVE_VECTOR_WIDTH.
Instead of assuming 4 wide vectors.
2012-02-17 16:17:28 +00:00
José Fonseca b5941e33d0 llvmpipe: Specify lp_test_arit's target precision per function. 2012-02-17 16:10:22 +00:00
José Fonseca fc79c4fbd4 llvmpipe: Add a negation test to lp_test_arit. 2012-02-17 15:57:54 +00:00
Ian Romanick f767ee5404 docs: News and release notes link for 8.0.1
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2012-02-16 23:31:50 -08:00
Ian Romanick 578dc605b6 docs: Add 8.0.1 release md5sums
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit d38a2952895d6e859e04bc5dc6d7cfa9f8c36f17)
2012-02-16 23:31:50 -08:00
Ian Romanick 61cf89c002 docs: Add 8.0.1 release notes
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit fe77fd3983ba3da16ec53c58a790c381b07387ce)
2012-02-16 23:31:50 -08:00
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