Commit Graph

55288 Commits

Author SHA1 Message Date
Adam Sampson 2506b03503 autotools: oprofilejit should be included in the list of LLVM components required
NOTE: This is a candidate for the stable branch.

Signed-off-by: José Fonseca <jfonseca@vmware.com>
2013-02-28 15:37:09 +00:00
Jerome Glisse 6bc7605745 r600g: workaround hyperz lockup on evergreen
This work around disable hyperz if write to zbuffer is disabled. Somehow
using hyperz when not writting to the zbuffer trigger GPU lockup. See :

https://bugs.freedesktop.org/show_bug.cgi?id=60848

Candidate for 9.1

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2013-02-28 09:48:05 -05:00
Jordan Justen c6ae10887e texobj: add verbose api trace messages to several routines
Motivated by wanting to see if GenTextures was called by an
application while debugging another Steam overlay issue.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2013-02-27 23:02:12 -08:00
Roland Scheidegger c8eb2d0e82 llvmpipe: check buffers in llvmpipe_is_resource_referenced.
Now that buffers can be used as textures or render targets
make sure they aren't skipped.

Fix suggested by Jose Fonseca.

v2: added a couple of assertions so we can actually guarantee
we check the resources and don't skip them. Also added some comments
that this is actually a lie due to the way the opengl buffer api works.
2013-02-28 03:39:54 +01:00
Roland Scheidegger 686f6c69bd llvmpipe: support rendering to buffer render targets.
Unfortunately not usable from OpenGL, and no cap bit.
Pretty similar to a 1d texture, though allows specifying a start element.

v2: also fix up renderbuffer width (which will get promoted to fb width)
to be the number of elements

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-02-28 03:39:54 +01:00
Roland Scheidegger 2fcd3638be util: fix issues with util_clear_render_target.
For PIPE_BUFFER we need coord adjustments for the transfer.
And for pure integer formats util_pack_color just crashes,
need to handle that differently due to clear colors being ints/uints.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-02-28 03:39:53 +01:00
Roland Scheidegger 6b35c2b110 softpipe/draw/tgsi: simplify driver/tgsi sampler interface
Use a single sampler adapter instead of per-sampler-unit samplers,
and just pass along texture unit and sampler unit in the calls.
The reason is that for dx10-style sample opcodes pre-wired
samplers including all the texture state aren't really feasible (and for
sample_i/sviewinfo we don't even have samplers).
Of course right now softpipe doesn't actually do anything more than
just look up all its pre-wired per-texunit/per-samplerunit sampler as
it did before so this doesn't really achieve much except one more
function call, however this is now all softpipe's fault (fixing that in
a way which doesn't suck is still an unsolved problem).

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-02-28 03:39:53 +01:00
Maxence Le Doré 0845d16976 gallivm: fix mis-matching AOS instruction emission
Signed-off-by: José Fonseca <jfonseca@vmware.com>
2013-02-27 20:23:01 +00:00
Jon TURNEY f816a9f522 glx: Fix glXCreateWindow() when GLX_DIRECT_RENDERING is undefined
glXCreateWindow() and glXCreatePbuffer() always fail when built without
GLX_DIRECT_RENDERING defined since commit 48331047.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2013-02-27 13:36:19 -05:00
Francisco Jerez 4deefd9ba6 configure.ac: Clarify the description of the --with-opencl-libdir parameter a little.
https://bugs.freedesktop.org/show_bug.cgi?id=61415

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
2013-02-27 12:27:13 +01:00
Vinson Lee f987d23b28 radeonsi: Fix memory leak in si_set_constant_buffer.
Fixes resource leak defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2013-02-26 20:03:11 -08:00
Vinson Lee f88ed1658c st/vega: Fix memory leak in combine_shaders.
Fixes resource leak defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
2013-02-26 20:01:58 -08:00
Kristian Høgsberg 112ccfab44 egl/wayland: Don't block on EGL_DEFAULT_DISPAY under wayland
Normally the application will own the main event queue and be responsible
for moving events.  In case of EGL_DEFAULT_DISPLAY, EGL opens the display
and has to own the main queue so it can move the events itself.
Call wl_display_dispatch_pending() to take ownership.
2013-02-26 12:49:49 -05:00
Ian Romanick 68a147e9a9 egl: Allow 24-bit visuals for 32-bit RGBA8888 configs
Previously only the 32-bit X visual would match the 32-bit RGBA8888
configs.  This resulted in every config with alpha getting the "magic"
visual whose alpha is used by the compositor.  This also resulted in no
multisample visuals being advertised.  How many ways could we lose?

This patch inverts the problem... now you can't get the visual with
alpha used by the compositor even if you want it.  I think we need to
invent a new value for EGL_TRANSPARENT_TYPE that apps can use to get
this.  I'm surprised that there isn't already a choice for
EGL_TRANSPARENT_ALPHA.

NOTE: This is a candidate for the 9.1 branch.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Tian Ye <yex.tian@intel.com>
Acked-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59783
2013-02-26 09:42:31 -08:00
Brian Paul e2148ab043 st/mesa: remove some conditionals in update_raster_state()
Just use simple assignments.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
2013-02-26 09:16:52 -07:00
Alex Deucher e5e4c07e79 r600g: add missing emit_flush for R600_CONTEXT_FLUSH_AND_INV case
We set the cp_coher_cntl bits but never emit them.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
2013-02-26 10:30:26 -05:00
Alex Deucher d54bc5d227 r600g: synchronize streamout buffers on r6xx too (v3)
Streamout buffers need to be synchronized on r6xx as
well.

v2: Add DEST flush as well.
v3: drop DEST flush

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
2013-02-26 10:30:10 -05:00
Brian Paul 62329d77b8 winsys/null: fix var typo templet->templat 2013-02-26 08:20:16 -07:00
Brian Paul 02bf645111 svga: fix comment typos 2013-02-26 08:20:16 -07:00
Marek Olšák d8d58bdcb9 r300g: implement 3D transfers
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=61351
2013-02-26 01:14:20 +01:00
Marek Olšák 3857f450a6 gallium/util: add helper util_max_layer from r600g 2013-02-26 01:14:05 +01:00
Roland Scheidegger 52c44cee1e llvmpipe: (trivial) get rid of old function prototypes.
llvmpipe_init_screen/context_texture_funcs have long been replaced
with the respective "resource" funcs.
2013-02-25 20:38:23 +01:00
Roland Scheidegger c0ba1080df draw: make sure pipeline is revalidated when sampler views or samplers change.
Since with llvm execution parts of sampler view and sampler state is baked into
the shader, we need to revalidate otherwise the wrong shader might get used.
(Not completely sure but I think this would not be required for non-llvm case,
along with everything else in these functions.)
This caused bugs in piglit arb_texture_buffer_object-formats, because we never
noticed that the view format changed.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-02-25 20:38:23 +01:00
Roland Scheidegger 20183177a5 llvmpipe: support GL_ARB_texture_buffer_object/GL_ARB_texture_buffer_range
This also fixes not honoring first/last_layer view parameters for array
textures, plus not honoring last_level view parameter for all textures
(neither is really used by OpenGL).
This mostly passes piglit arb_texture_buffer_object tests (it needs, however,
glsl 140 version override, plus GL 3.1 override, the latter only because
mesa does not allow ARB_tbo in non-core contexts).
Most arb_texture_buffer_object tests pass, with the exception of
arb_texture_buffer_object-formats. With "arb" parameter it passes most weirdo
formats before it segfaults in the state tracker, this looks to be some issue
with using legacy formats in core context (fails the same in softpipe).
With "core" parameter it passes with "fs", however fails with "vs" (for most
formats). This will be fixed later (debugging shows we're completely missing
the shader recompile depending on format).

v2: based on Jose's feedback, fix comments, variable/function names.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-02-25 20:38:23 +01:00
Eric Anholt 50a5d5dea0 i965: Fix the W value of deprecated pointcoords on pre-gen6.
When you didn't have a texcoord array bound (or a non-1 current w
attrib), we were telling the fragment shader that it could just use "1"
instead of doing expensive pre-gen6 math to invert it.  If you drew the
point with a non-1 W value, then you'd get the right size (since all the
vertex computations worked), but we'd mis-interpolate the coordinate
across the face.

Fixes the mesa pointsprite demo on GM45.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=30232
Reviewed-and-tested-by: Ian Romanick <ian.d.romanick@intel.com>
Note: This is a candidate for the stable branches.
2013-02-25 11:21:44 -08:00
Tapani Pälli 3cdb548bfb mesa/es: NULL check in EGLImageTargetTexture2DOES
check that pointer passed is valid and return error if not.

Note: This is a candidate for the stable branches.
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2013-02-25 09:17:31 -08:00
Tapani Pälli 331967c773 mesa: add missing case in _mesa_GetTexParameterfv()
missing case GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES is required
by OES_EGL_image_external extension.

Note: This is a candidate for the stable branches.
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2013-02-25 09:17:20 -08:00
Andreas Boll 533dc3b690 docs: add news item for mesa-demos 8.1.0 release 2013-02-25 11:31:08 +01:00
Andreas Boll d209926666 docs: import release notes for 9.1, add news item 2013-02-25 10:47:02 +01:00
Jordan Justen 0486d50320 glsl: Remove VS output varyings which are optimized out of the FS
Previously when an input varying was optimized out of the
FS we would still retain it as an output of the VS.

We now build a hash of live FS input varyings rather
than looking in the FS symbol table. (The FS symbol table
will still contain the optimized out varyings.)

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2013-02-23 16:20:28 -08:00
Vinson Lee f6487e8911 vl: Fix off-by-one error in device_name_length allocation.
Fixes out-of-bounds write reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Michel Dänzer <michel@daenzer.net>
2013-02-23 14:57:05 -08:00
John Kåre Alsaker 65aa1a194d llvmpipe: Fix creation of shared and scanout textures.
NOTE: This is a candidate for the stable branches.

Signed-off-by: José Fonseca <jfonseca@vmware.com>
2013-02-23 18:36:58 +00:00
José Fonseca fdb88967e3 util/u_blitter: Set pipe_sampler_state::normalized_coords correctly.
We might want to revisit the normalized_coords semantics, but this is
the current expected behavior.

Fixes fdo bug 61091.

Reviewed-by: Brian Paul <brianp@vmware.com>
2013-02-23 18:36:57 +00:00
Brian Paul 2557d3f9c3 svga: remove some extraneous whitespace 2013-02-23 08:20:36 -07:00
Brian Paul 840d6faf68 st/mesa: fix debug_printf() format string warning
Use %td for ptrdiff_t (aka GLsizeiptrARB).
2013-02-23 08:20:36 -07:00
José Fonseca 0d760a8160 util/dump: Use static assertion to detect string table size mismatches.
Suggested by Brian Paul.

Could probably be extended to other enums.

Reviewed-by: Brian Paul <brianp@vmware.com>
2013-02-23 13:32:34 +00:00
Vinson Lee 2fa9e4c97c st/xvmc/tests: Ensure colorkey is initialized.
Fixes uninitialized scalar variable defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Christian König <christian.koenig@amd.com>
2013-02-22 19:32:00 -08:00
Vinson Lee 54afbce934 st/vdpau: Fix memory leak in vlVdpBitmapSurfaceCreate.
Fixes resource leak defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Christian König <christian.koenig@amd.com>
2013-02-22 19:30:03 -08:00
Vinson Lee 1bac4a1e6f st/vdpau: Fix memory leak in vlVdpOutputSurfaceCreate.
Fixes resource leak defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Christian König <christian.koenig@amd.com>
2013-02-22 19:29:56 -08:00
Tapani Pälli b4dba5bba2 glapi: mark static_dispatch false for DiscardFramebufferEXT
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61199
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Tested-by: Vinson Lee <vlee@freedesktop.org>
Tested-by: Brad King <brad.king@kitware.com>
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
2013-02-22 17:18:08 -08:00
Brian Paul b804fb8714 llvmpipe: rename polygon offset fields to something more specific
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-02-22 16:49:05 -07:00
Brian Paul f93c580063 llvmpipe: add missing checks for polygon offset point/line modes
The llvm pipeline handles regular filled triangle offsets, but it
doesn't handle offsets for triangles drawn in point or line mode.

Fixes failures found with new piglit polygon-mode-offset test.

Note: This is a candidate for the stable branches.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-02-22 16:49:05 -07:00
Brian Paul d6b8b116ee draw: fix broken polygon offset stage
There were several issues.  We weren't handling different front/back
polygon fill modes.  We weren't checking whether the offset applied to
fill mode vs. line mode vs. point mode.

Fixes problems found with the Visualization Toolkit (VTK) test suite.

Note: This is a candidate for the stable branches.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-02-22 16:49:05 -07:00
Brian Paul a2c105e31e st/mesa: fix polygon offset state translation logic
The old logic was kind of twisted, but seemed to work in practice.

Note: This is a candidate for the stable branches.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
2013-02-22 16:49:05 -07:00
Brian Paul 8bb291b0f5 st/mesa: check for dummy programs in destroy_program_variants()
When we destroy an ARB vp/fp whose ID was gen'd but not otherwise used we
get a pointer to the dummy/placeholder program.  We can't destroy that one
so just skip it.  This only failed during context tear-down because
glDeleteProgramsARB() was already aware of dummy programs.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=38086

Note: This is a candidate for the stable branches.

Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
2013-02-22 16:49:05 -07:00
Brian Paul 8589cc41b3 st/mesa: fix trimming of GL_QUAD_STRIP
We sometimes convert GL_QUAD_STRIP prims into GL_TRIANGLE_STRIP, but
that changes the results of the u_trim_pipe_prim() call.  We need to
pass the original primitive type to the trim function.

Note that OpenGL's GL_x prim type values match Gallium's PIPE_PRIM_x values.

Fixes a failure in the new piglit degenerate-prims test.

Note: This is a candidate for the stable branches.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
2013-02-22 16:49:05 -07:00
Alex Deucher 8b5acad0e9 r600g: fixup PS_PARTIAL_FLUSH flag handling for cayman
So we don't emit it twice if we ever use the flag on
cayman.

Note: this is a candidate for the 9.1 branch.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-02-22 18:43:27 -05:00
Alex Deucher 8442b67f5f r600g: r6xx deadlock workaround (v6)
Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=50655
https://bugs.freedesktop.org/show_bug.cgi?id=47116

v2: flush along with workaround.
v3: just need a flush
v4: try WAIT_UNTIL
v5: switch to PS partial flush
v6: rework patch

Note: this is a candidate for the 9.1 branch.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-02-22 18:23:46 -05:00
Alex Deucher 7ebf83f109 r600g: add PS_PARTIAL_FLUSH flag
PS_PARTIAL flushes seems to be required in certain
cases to prevent hangs, especially on r6xx.

Note: this is a candidate for the 9.1 branch.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-02-22 18:23:31 -05:00
Ian Romanick 7ae6864f0d i965: Enable OpenGL ES 3.0 on Sandy Bridge
Regardless of what we put in the screen structure, all of the extensions
that compute_version_es2 checks are present and 3.0 will be exposed
anyway.

NOTE: This is a candidate for the 9.1 branch.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2013-02-22 13:57:44 -08:00