Matt Turner [Tue, 12 May 2015 22:51:05 +0000 (15:51 -0700)]
i965/fs: Add set_sechalf() method.
Used in the next commit.
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Matt Turner [Fri, 15 May 2015 05:23:22 +0000 (22:23 -0700)]
i965/fs: Unrestrict constant propagation into integer multiply.
Gen8+'s MUL instruction doesn't ignore the high 16-bits of one source
like on earlier platforms, so we can constant propagate into it without
worry. Integer multiplies (not into the accumulator, which is done for
imul_high) are lowered in lower_integer_multiplication(), so it's safe
there as well.
On Broadwell, fragment shaders only:
total instructions in shared programs: 4377769 -> 4377451 (-0.01%)
instructions in affected programs: 48064 -> 47746 (-0.66%)
helped: 156
On Broadwell, vertex shaders only:
total instructions in shared programs: 2858885 -> 2856313 (-0.09%)
instructions in affected programs: 26380 -> 23808 (-9.75%)
helped: 134
On Broadwell, vertex shaders only (with INTEL_USE_NIR=1):
total instructions in shared programs: 2911688 -> 2865984 (-1.57%)
instructions in affected programs: 1421715 -> 1376011 (-3.21%)
helped: 6186
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Matt Turner [Mon, 11 May 2015 16:29:56 +0000 (09:29 -0700)]
i965/fs: Lower integer multiplication after optimizations.
32-bit x 32-bit integer multiplication requires multiple instructions
until Broadwell. This patch just lets us treat the MUL instruction in
the FS backend like it operates on Broadwell, and after optimizations
we lower it into a sequence of instructions on older platforms.
Doing this will allow us to some extra optimization on integer
multiplies.
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Ilia Mirkin [Mon, 18 May 2015 16:57:31 +0000 (12:57 -0400)]
gk110/ir: switch to gk104-style sched codes rather than all-in-one
Matches change to envydis/envyas tools.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Tapani Pälli [Mon, 11 May 2015 10:24:20 +0000 (13:24 +0300)]
glsl: add stage references for UBO uniforms
Patch marks uniforms inside UBO properly referenced by stages.
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90397
Iago Toral Quiroga [Tue, 10 Feb 2015 15:40:48 +0000 (16:40 +0100)]
i965: Fix textureSize for Lod > 0 with non-mipmap filters
Currently, when the MinFilter is GL_LINEAR or GL_NEAREST we hide the
actual miplevel count from the hardware (and we avoid re-creating
the miptree structure with all the levels), since we don't expect
levels other than the base level to be needed. Unfortunately,
GLSL's textureSize() function is an exception to this rule. This
function takes a lod parameter that we need to use to return the
size of the appropriate miplevel (if it exists). The spec only
requires that the miplevel exists, so even if the sampler is
configured with a linear or nearest MinFilter, as far as the user
has uploaded miplevels for the texture, textureSize() should return
the appropriate sizes.
This patch fixes this by exposing the actual miplevel count for all
sampling engine textures while keeping the original implementation
for render targets (for render targets textures we do not provide
the miplevel count but the actual LOD we are wrting to, so we
want to make sure that we make this the base level).
Fixes 28 dEQP tests in the following category:
dEQP-GLES3.functional.shaders.texture_functions.texturesize.*
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Fredrik Höglund [Sat, 16 May 2015 17:43:39 +0000 (19:43 +0200)]
mesa: Check the lookup_framebuffer return value in NamedFramebufferRenderbuffer
Found by Coverity.
Reported-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Ilia Mirkin [Sun, 13 Jul 2014 18:26:05 +0000 (14:26 -0400)]
tgsi/dump: fix declaration printing of tessellation inputs/outputs
mareko: only output second dimension for non-patch semantics
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Ilia Mirkin [Tue, 22 Jul 2014 01:18:14 +0000 (21:18 -0400)]
tgsi/ureg: allow ureg_dst to have dimension indices
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Marek Olšák [Thu, 19 Mar 2015 22:31:41 +0000 (23:31 +0100)]
tgsi/ureg: use correct limit for max input count
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Ilia Mirkin [Sun, 13 Jul 2014 00:06:03 +0000 (20:06 -0400)]
tgsi/sanity: set implicit in/out array sizes based on patch sizes
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Ilia Mirkin [Sun, 13 Jul 2014 01:37:45 +0000 (21:37 -0400)]
tgsi/scan: allow scanning tessellation shaders
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Marek Olšák [Tue, 14 Oct 2014 09:06:48 +0000 (11:06 +0200)]
gallium: disable tessellation shaders for meta ops
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Marek Olšák [Tue, 23 Sep 2014 13:54:02 +0000 (15:54 +0200)]
gallium/cso: set NULL shaders at context destruction
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Marek Olšák [Mon, 2 Mar 2015 15:32:25 +0000 (16:32 +0100)]
gallium/cso: add support for tessellation shaders
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Marek Olšák [Tue, 23 Sep 2014 16:40:27 +0000 (18:40 +0200)]
gallium/u_blitter: disable tessellation for all operations
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Marek Olšák [Thu, 19 Mar 2015 22:26:54 +0000 (23:26 +0100)]
gallium/util: print vertices_per_patch in util_dump_draw_info
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Marek Olšák [Sun, 11 Jan 2015 19:37:37 +0000 (20:37 +0100)]
trace: implement new tessellation functions
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Ilia Mirkin [Sun, 20 Jul 2014 15:36:49 +0000 (11:36 -0400)]
gallium: add set_tess_state to configure default tessellation parameters
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Ilia Mirkin [Mon, 21 Jul 2014 22:43:53 +0000 (18:43 -0400)]
gallium: add vertices_per_patch to draw info
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Ilia Mirkin [Sat, 19 Jul 2014 14:09:28 +0000 (10:09 -0400)]
gallium: add tessellation shader properties
v2: Marek: rename tess spacing definitions
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Ilia Mirkin [Sat, 12 Jul 2014 02:09:38 +0000 (22:09 -0400)]
gallium: add interfaces for controlling tess program state
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Marek Olšák [Thu, 19 Mar 2015 22:27:10 +0000 (23:27 +0100)]
gallium: bump shader input and output limits
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Ilia Mirkin [Sat, 19 Jul 2014 13:39:18 +0000 (09:39 -0400)]
gallium: add new semantics for tessellation
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Ilia Mirkin [Sat, 19 Jul 2014 13:27:46 +0000 (09:27 -0400)]
gallium: add new PATCHES primitive type
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Ilia Mirkin [Sat, 19 Jul 2014 13:26:09 +0000 (09:26 -0400)]
gallium: add tessellation shader types
v2: Marek: rename shader types
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Ian Romanick [Wed, 13 May 2015 02:46:44 +0000 (19:46 -0700)]
glapi: Remove offset from the DTD
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Ian Romanick [Wed, 13 May 2015 02:43:33 +0000 (19:43 -0700)]
glapi: Whitespace clean up after the previous commit
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Ian Romanick [Wed, 13 May 2015 02:15:09 +0000 (19:15 -0700)]
glapi: Remove all offset tags from the XML
Changes generated by:
cd src/mapi/glapi/gen
for i in *.xml; do
cat $i |\
sed 's/[[:space:]]*offset="[^"]*">/>/' |\
sed 's/[[:space:]]*offset="[^"]*"[[:space:]]*$//' |\
sed 's/[[:space:]]*offset="[^"]*"[[:space:]]*/ /' > x
mv x $i
done
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Ian Romanick [Sat, 9 May 2015 02:33:13 +0000 (19:33 -0700)]
glapi: Use the offsets from static_data.py instead of from the XML
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
Ian Romanick [Wed, 13 May 2015 01:09:13 +0000 (18:09 -0700)]
glapi: Add a list of functions that are not used but still need dispatch slots
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Ian Romanick [Wed, 13 May 2015 00:27:26 +0000 (17:27 -0700)]
glapi: Remove static dispatch for functions that didn't exist in NVIDIA
Comparing the output of
nm -D libGL.so.349.16 | grep ' T gl[^X]' | sed 's/.* T //'
between Catalyst NVIDIA 349.16 and this commit, the only change is a bunch
of functions that NVIDIA exports that Mesa does not.
If a function is not statically exported by either of the major binary
drivers on Linux, there is almost zero chance that any application
statically links with it.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Ian Romanick [Tue, 12 May 2015 23:56:37 +0000 (16:56 -0700)]
glapi: Remove static dispatch for functions that didn't exist in fglrx
Comparing the output of
nm -D arch/x86_64/usr/X11R6/lib64/fglrx/fglrx-libGL.so.1.2 |\
grep ' T gl[^X]' | sed 's/.* T //'
between Catalyst 14.6 Beta and this commit, the only change is a bunch
of functions that AMD exports that Mesa does not and some OpenGL ES
1.1 functions that Mesa exported but AMD does not.
The OpenGL ES 1.1 functions (e.g., glAlphaFuncx) are added by extensions
in desktop. Our infrastructure doesn't allow us to statically export a
function in one lib and not in another. The GLES1 conformance tests
expect to be able to link with these functions, so we have to export
them.
If a function is not statically exported by either of the major binary
drivers on Linux, there is almost zero chance that any application
statically links with it.
As a side note... I find it odd that AMD exports glTextureBarrierNV but
not glTextureBarrier.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Ian Romanick [Tue, 12 May 2015 23:01:17 +0000 (16:01 -0700)]
glapi: Remove static dispatch for functions that didn't exist in 10.3
Comparing the output of
nm libGL.so | grep ' T gl[^X]' | sed 's/.* T //'
between 10.3.7 and this commit, the only change is the removal of
glFramebufferTextureFaceARB. This function was removed a couple commits
previously.
glClipControl was, at the time 10.3 shipped, a very new function. It
was added by GL_ARB_clip_control. That extension was ratified by the
Khronos Board of Promoters on August 7, 2014. It's less than a year
old, and I don't think it's is likely that there are many applications
using that extension... much less statically linking with the function.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Ian Romanick [Tue, 12 May 2015 22:47:41 +0000 (15:47 -0700)]
glapi: Remove static dispatch for functions that didn't exist in 10.4
Comparing the output of
nm libGL.so | grep ' T gl[^X]' | sed 's/.* T //'
between 10.4.7 and this commit, the only change is the removal of
glFramebufferTextureFaceARB. This function was removed a couple commits
previously.
None of these functions are particuarly new. If applications were not
statically linking them with 10.4.7, there's approximately zero chance
they will for 10.6.
Almost all of these functions are for GL_ARB_direct_state_access.
Since the whole DSA API wasn't statically exported (and the extension
wasn't enabled!), I think there's exactly zero chance anyone linked
against these symbols.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Ian Romanick [Tue, 12 May 2015 22:24:03 +0000 (15:24 -0700)]
glapi: Remove static dispatch for functions that didn't exist in 10.5
Comparing the output of
nm libGL.so | grep ' T gl[^X]' | sed 's/.* T //'
between 10.5.5 and this commit, the only change is the removal of
glFramebufferTextureFaceARB. This function was removed a couple commits
previously.
None of these functions are particuarly new. If applications were not
statically linking them with 10.5.5, there's approximately zero chance
they will for 10.6.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Ian Romanick [Wed, 13 May 2015 00:17:11 +0000 (17:17 -0700)]
glapi: Remove static_dispatch from the DTD
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Ian Romanick [Tue, 12 May 2015 23:43:15 +0000 (16:43 -0700)]
glapi: Whitespace clean up after the previous commit
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
Ian Romanick [Tue, 12 May 2015 23:27:12 +0000 (16:27 -0700)]
glapi: Remove all static_dispatch tags from the XML
Changes generated by:
cd src/mapi/glapi/gen
for i in *.xml; do
cat $i |\
sed 's/[[:space:]]*static_dispatch="[^"]*">/>/' |\
sed 's/[[:space:]]*static_dispatch="[^"]*"[[:space:]]*$//' |\
sed 's/[[:space:]]*static_dispatch="[^"]*"[[:space:]]*/ /' > x
mv x $i
done
Comparing the output of
nm libGL.so | grep ' T gl[^X]' | sed 's/.* T //'
before and after this commit showed no differences.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
Ian Romanick [Tue, 12 May 2015 22:11:09 +0000 (15:11 -0700)]
glapi: Store list of functions with static dispatch in a separate table
The set of functions with static dispatch is (supposed to be) defined by
the Linux OpenGL ABI. We export quite a few more functions than that
for historical reasons. However, this list should never grow.
This table is used instead of the static_dispatch tag in the XML to
generate the static dispatch functions. I used
nm libGL.so | grep ' T gl[^X]' | sed 's/.* T //'
before and after the change. diff showed no differences.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
Ian Romanick [Sat, 9 May 2015 01:50:11 +0000 (18:50 -0700)]
glapi: Store static dispatch offsets in a separate table
Since the set of functions with static will never change, there is no
reason to store it in the XML. It's just one of those fields that
confuses people adding new functions.
This is split out from the rest of the series so that in-code assertions
can be used to verify that the data in the Python code matches the XML.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
Ian Romanick [Tue, 12 May 2015 19:24:04 +0000 (12:24 -0700)]
mesa: Remove all vestiges of glFramebufferTextureFaceARB
Mesa does not (and probably never will) support GL_ARB_geometry_shader4,
so this function will never exist. Having a function that is
exec="skip" and offset="assign" is just weird.
There are still a couple 'exec="skip" offset="assign"' functions
remaining. These remain because we either support GLX protocol for them
(glSampleMaskSGIS and glSamplePatternSGIS) or older DRI drivers still
need them in the dispatch table (glResizeBuffersMESA). The SGIS
functions can be removed later.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Ian Romanick [Tue, 12 May 2015 18:37:42 +0000 (11:37 -0700)]
glapi: Mark a couple functions "ignore" for GLX
Without this the next patch will try to put these functions in the
dispatch table in indirect_init.c.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Fredrik Höglund [Fri, 15 May 2015 17:30:38 +0000 (19:30 +0200)]
st/mesa: Flush the bitmap cache in st_BlitFramebuffer
With DSA we can no longer rely on this being done in st_validate_state
in response to the framebuffer bindings having changed.
This fixes the ext_framebuffer_multisample-bitmap piglit test.
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Ian Romanick [Fri, 15 May 2015 18:55:46 +0000 (11:55 -0700)]
i965: Fix FS unit tests
Commit 3687d75 changed the fs_visitor constructors, but it didn't update
all the users. As a result, 'make check' fails.
I added the explicit cast to the gl_program* parameter to make it more
clear which NULL was which.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@Whitecape.org>
Alexander von Gluck IV [Thu, 14 May 2015 22:30:35 +0000 (17:30 -0500)]
target/haiku-softpipe: Move api init into st code
We also reduce the amount of need-to-know information about st_api
to require one less extern "C" in st_manager.h
Reviewed-by: Brian Paul <brianp@vmware.com>
Alexander von Gluck IV [Thu, 14 May 2015 22:29:00 +0000 (17:29 -0500)]
st/hgl: Move st_api creation to st and extern "C" it
Reviewed-by: Brian Paul <brianp@vmware.com>
Alexander von Gluck IV [Thu, 14 May 2015 22:27:14 +0000 (17:27 -0500)]
winsys/hgl: Add needed extern "C" to hgl winsys
Reviewed-by: Brian Paul <brianp@vmware.com>
Alexander von Gluck IV [Thu, 14 May 2015 22:20:17 +0000 (17:20 -0500)]
gallium/drivers: Add extern "C" wrappers to public entry
Reviewed-by: Brian Paul <brianp@vmware.com>
Alexander von Gluck IV [Thu, 14 May 2015 22:19:44 +0000 (17:19 -0500)]
gallium/aux: Add needed extern "C" wrappers
Reviewed-by: Brian Paul <brianp@vmware.com>
Kenneth Graunke [Thu, 12 Mar 2015 05:41:49 +0000 (22:41 -0700)]
i965/fs: Combine the fs_visitor constructors.
For scalar GS support, we either need to add a fourth constructor which
takes the GS structures, or combine the existing two and pass the shader
stage.
Given that they're not significantly different, I opted for the latter.
v2: Remove more stuff from the .h file (Jason and Jordan).
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Emil Velikov [Thu, 14 May 2015 18:50:22 +0000 (18:50 +0000)]
egl: remove remaining EGL_MESA_copy_context skeleton
With earlier commit (
7a58262e58d egl: Remove skeleton implementation of
EGL_MESA_screen_surface) we've removed the skeleton implementation of
eglCopyContextMESA(). Just like EGL_MESA_screen_surface this extension
was never implemented in mesa.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Emil Velikov [Mon, 11 May 2015 23:30:16 +0000 (00:30 +0100)]
egl/main: fix EGL_KHR_get_all_proc_addresses
The extension requires that the address of the core functions should be
available via eglGetProcAddress. Currently the list is guarded by
_EGL_GET_CORE_ADDRESSES, which was only set for the scons (windows)
build.
Unconditionally enable it for all the builds (automake, android and
haiku) considering that the extension is not platform specific and is
always enabled.
v2: Drop the _EGL_GET_CORE_ADDRESSES macro altogether.
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Marc-André Lureau [Mon, 11 May 2015 22:43:49 +0000 (23:43 +0100)]
egl: more define fixes for EGL_MESA_image_dma_buf_export
s/EGL_MESA_dma_buf_image_export/EGL_MESA_image_dma_buf_export as defined by the spec
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
Emil Velikov [Mon, 11 May 2015 22:43:48 +0000 (23:43 +0100)]
egl/main: expose only core EGL functions statically
The EGL 1.3, 1.4 and 1.5 spec (as quoted below) explicitly mentions that
providing static symbols for functions provided by EGL extensions is not
portable. Considering that relatively recently we've seen a non-mesa
desktop EGL implementation, the fact that we opt for such behaviour has
gone unnoticed.
From the EGL 1.5 specification:
For functions that are queryable with eglGetProcAddress,
implementations may choose to also export those functions
statically from the object libraries implementing those
functions. However, portable clients cannot rely on this
behavior.
To encourage devs against writing such non-portable code, let's hide the
symbols similar to the official binary driver from NVIDIA.
v2: Quote the EGL 1.5 spec, as suggested by Chad.
Cc: Brian Paul <brianp@vmware.com>
Cc: Chad Versace <chad.versace@intel.com>
Cc: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
Emil Velikov [Mon, 11 May 2015 22:43:47 +0000 (23:43 +0100)]
egl: fix the EGL_MESA_image_dma_buf_export header declarations
Similar to other EGL extensions - guard the function prototypes by
EGL_EGLEXT_PROTOTYPES as the libEGL library does (should) not provide
the symbols statically.
Instead users should call eglGetProcAddress, which returns the function
pointer. The latter of which was missing the type declaration (typedef).
Cc: Dave Airlie <airlied@redhat.com>
Cc: Marc-André Lureau <marcandre.lureau@gmail.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
Emil Velikov [Mon, 11 May 2015 22:43:46 +0000 (23:43 +0100)]
egl/main: Update README.txt
The driver search/load is not done at eglGetDisplay (or eglOpenDisplay
as the readme called it) time, but during eglInitialize().
Drop _eglMain (available only for external drivers) reference. Mention
we use function(s), specific to the built-in driver(s).
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
Emil Velikov [Mon, 11 May 2015 22:43:45 +0000 (23:43 +0100)]
egl/main: cleanup function prototypes
Cleanup the function propotypes which were part of the previous EGL
drivers.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
Emil Velikov [Mon, 11 May 2015 22:43:44 +0000 (23:43 +0100)]
egl/main: drop support for external egl drivers
The only user (egl_gallium) is not longer around.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
Rob Clark [Wed, 13 May 2015 18:36:03 +0000 (14:36 -0400)]
freedreno: fix bug in tile/slot calculation
This was causing corruption with hw binning on a306. Unlikely that it
is a306 specific, but rather the smaller gmem size resulted in different
tile configuration which was triggering the bug at certain resolutions.
Signed-off-by: Rob Clark <robclark@freedesktop.org>
Cc: "10.4" and "10.5" and "10.6" <mesa-stable@lists.freedesktop.org>
Rob Clark [Tue, 12 May 2015 18:46:50 +0000 (14:46 -0400)]
freedreno: enable a306
Whitelist adreno 306 (as found in msm8916/apq8016). Works pretty much
out of the box, although the smaller GMEM size requires more tiles to
fit 1920x1080, so bump up the max # of tiles as well.
Since it is just whitelist + trivial change, it makes sense to land on
all the active release branches.
Note that a305c ends up with gpu-id "306", hence a306 ends up with
gpu-id of "307". Apparently that is what happens when you let the
marketing dept name things.
Cc: "10.4" and "10.5" and "10.6" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Rob Clark <robclark@freedesktop.org>
Alexander von Gluck IV [Wed, 13 May 2015 22:14:10 +0000 (17:14 -0500)]
egl/haiku: Drop extern "C". No longer needed
Reviewed-by: Brian Paul <brianp@vmware.com>
Alexander von Gluck IV [Wed, 13 May 2015 22:13:37 +0000 (17:13 -0500)]
egl: Add needed extern "C" for C++ access
* Haiku's egl driver is C++ due to the interface natively being C++
Reviewed-by: Brian Paul <brianp@vmware.com>
Samuel Pitoiset [Tue, 12 May 2015 15:13:15 +0000 (17:13 +0200)]
nvc0: remove unused nv50_tsc_wrap_mode() function
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Samuel Pitoiset [Tue, 12 May 2015 15:13:14 +0000 (17:13 +0200)]
nv50/ir: silence compiler warnings about mismatched tags
These warnings have been detected by Clang 3.6.
codegen/nv50_ir_from_tgsi.cpp:1319:10: warning: struct 'Source' was
previously declared as a class [-Wmismatched-tags] const struct tgsi::Source *code;
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Samuel Pitoiset [Tue, 12 May 2015 15:13:13 +0000 (17:13 +0200)]
nv50/ir: remove unused private field cycle to SchedDataCalculator
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Samuel Pitoiset [Tue, 12 May 2015 15:35:17 +0000 (17:35 +0200)]
nv30: remove unused nvfx_fp_memcpy() function and comment nv40_fp_bra()
The nv40_fp_bra() function in the same file is also unused but this is
the only place where the nv30/nv40 isa is documented.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Samuel Pitoiset [Mon, 11 May 2015 19:36:16 +0000 (21:36 +0200)]
nvc0: do not expose MP counters for nvf0 (GK110+)
This fixes a crash when trying to monitor MP counters because compute
support is not implemented for nvf0.
Reported-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Fredrik Höglund [Thu, 7 May 2015 18:29:46 +0000 (20:29 +0200)]
docs/relnotes: Mark off ARB_direct_state_access for 10.6
v2: Make it clear that ARB_direct_state_access is only available on
drivers that support GL 2.0+
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Fredrik Höglund [Thu, 7 May 2015 18:29:21 +0000 (20:29 +0200)]
docs: Update the ARB_direct_state_access status
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Fredrik Höglund [Sun, 10 May 2015 19:06:52 +0000 (21:06 +0200)]
st/mesa: Enable ARB_direct_state_access
Assume that all drivers that advertise support for NPOT textures
are able to support GL 2.0.
v2: Add a comment.
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Fredrik Höglund [Sun, 10 May 2015 19:05:11 +0000 (21:05 +0200)]
i965: Enable ARB_direct_state_access
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Fredrik Höglund [Sun, 10 May 2015 19:04:22 +0000 (21:04 +0200)]
i915: Enable ARB_direct_state_access
This extension requires OpenGL 2.0, so enable it on gen3 and later.
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Fredrik Höglund [Sun, 10 May 2015 18:57:29 +0000 (20:57 +0200)]
mesa: Add ARB_direct_state_access checks in query object functions
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Fredrik Höglund [Sun, 10 May 2015 18:56:18 +0000 (20:56 +0200)]
mesa: Add ARB_direct_state_access checks in program pipeline functions
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Fredrik Höglund [Sun, 10 May 2015 18:55:31 +0000 (20:55 +0200)]
mesa: Add ARB_direct_state_access checks in sampler object functions
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Fredrik Höglund [Sun, 10 May 2015 18:54:18 +0000 (20:54 +0200)]
mesa: Add ARB_direct_state_access checks in VAO functions
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Fredrik Höglund [Sun, 10 May 2015 18:52:49 +0000 (20:52 +0200)]
mesa: Add ARB_direct_state_access checks in texture functions
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Fredrik Höglund [Sun, 10 May 2015 18:49:15 +0000 (20:49 +0200)]
mesa: Add ARB_direct_state_access checks in renderbuffer functions
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Fredrik Höglund [Sun, 10 May 2015 18:48:11 +0000 (20:48 +0200)]
mesa: Add ARB_direct_state_access checks in FBO functions
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Fredrik Höglund [Sun, 10 May 2015 18:46:36 +0000 (20:46 +0200)]
mesa: Add ARB_direct_state_access checks in buffer object functions
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Fredrik Höglund [Sun, 10 May 2015 18:44:07 +0000 (20:44 +0200)]
mesa: Add ARB_direct_state_access checks in XFB functions
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Fredrik Höglund [Wed, 29 Apr 2015 17:44:06 +0000 (19:44 +0200)]
mesa: Make GL_TEXTURE_CUBE_MAP valid in FramebufferTextureLayer
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Fredrik Höglund [Sun, 10 May 2015 18:34:03 +0000 (20:34 +0200)]
mesa: Add an extension flag for ARB_direct_state_access
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Laura Ekstrand [Mon, 9 Feb 2015 22:08:00 +0000 (14:08 -0800)]
main: Add entry point for NamedFramebufferDrawBuffers.
Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Laura Ekstrand [Mon, 9 Feb 2015 21:33:13 +0000 (13:33 -0800)]
main: Refactor DrawBuffers.
This could have added a new DD table entry for DrawBuffers that takes an
arbitrary draw buffer, but, after looking at the existing DD functions,
Kenneth Graunke recommended that we just skip calling the DD functions in the
case of ARB_direct_state_access. The DD implementations for DrawBuffer(s)
have limited functionality, especially with respect to
ARB_direct_state_access.
[Fredrik: Call the driver function when fb is the bound draw buffer]
Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Laura Ekstrand [Fri, 6 Feb 2015 23:36:52 +0000 (15:36 -0800)]
main: Add entry point for NamedFramebufferReadBuffer.
[Fredrik: Fix the name of the buf parameter in the XML file]
Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Laura Ekstrand [Fri, 6 Feb 2015 23:23:05 +0000 (15:23 -0800)]
main: Refactor _mesa_ReadBuffer.
This could have added a new DD table entry for ReadBuffer that takes an
arbitrary read buffer, but, after looking at the existing DD functions,
Kenneth Graunke recommended that we just skip calling the DD functions in the
case of ARB_direct_state_access. The DD implementations for ReadBuffer
have limited functionality, especially with respect to
ARB_direct_state_access.
[Fredrik: Call the driver function when fb is the bound read buffer]
Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Laura Ekstrand [Fri, 6 Feb 2015 22:44:43 +0000 (14:44 -0800)]
main: Add entry point for NamedFramebufferDrawBuffer.
[Fredrik: Fix the name of the buf parameter in the XML file]
Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Laura Ekstrand [Fri, 6 Feb 2015 18:57:57 +0000 (10:57 -0800)]
main: Refactor _mesa_DrawBuffer.
This could have added a new DD table entry for DrawBuffer that takes an
arbitrary draw buffer, but, after looking at the existing DD functions,
Kenneth Graunke recommended that we just skip calling the DD functions in the
case of ARB_direct_state_access. The DD implementations for DrawBuffer(s)
have limited functionality, especially with respect to
ARB_direct_state_access.
[Fredrik: Call the driver function when fb is the bound draw buffer]
Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Laura Ekstrand [Fri, 6 Feb 2015 18:34:24 +0000 (10:34 -0800)]
main: Refactor _mesa_drawbuffers.
[Fredrik: Whitespace fix]
Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Laura Ekstrand [Fri, 6 Feb 2015 00:38:11 +0000 (16:38 -0800)]
main: Add stubs for [Get]NamedFramebufferParameteri[v].
The ARB_direct_state_access specification says (as of 2015.02.05):
"Interactions with OpenGL 4.3 or ARB_framebuffer_no_attachments
If neither OpenGL 4.3 nor ARB_framebuffer_no_attachments are supported,
ignore the support for NamedFramebufferParameteri and
GetNamedFramebufferParameteriv."
This commit adds stubs for these entry points.
Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Laura Ekstrand [Thu, 5 Feb 2015 21:43:12 +0000 (13:43 -0800)]
main: Fake entry point for glClearNamedFramebufferfi.
Mesa's ClearBuffer framework is very complicated and thoroughly married to the
object binding model. Moreover, the OpenGL spec for ClearBuffer is also very
complicated. At some point, we should implement buffer clearing for arbitrary
framebuffer objects, but for now, we will just wrap ClearBuffer.
Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Laura Ekstrand [Thu, 5 Feb 2015 21:38:39 +0000 (13:38 -0800)]
main: Fake entry point for glClearNamedFramebufferfv.
Mesa's ClearBuffer framework is very complicated and thoroughly married to the
object binding model. Moreover, the OpenGL spec for ClearBuffer is also very
complicated. At some point, we should implement buffer clearing for arbitrary
framebuffer objects, but for now, we will just wrap ClearBuffer.
Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Laura Ekstrand [Thu, 5 Feb 2015 21:30:50 +0000 (13:30 -0800)]
main: Fake entry point for glClearNamedFramebufferuiv.
Mesa's ClearBuffer framework is very complicated and thoroughly married to the
object binding model. Moreover, the OpenGL spec for ClearBuffer is also very
complicated. At some point, we should implement buffer clearing for arbitrary
framebuffer objects, but for now, we will just wrap ClearBuffer.
Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Laura Ekstrand [Thu, 5 Feb 2015 21:24:43 +0000 (13:24 -0800)]
main: Fake entry point for glClearNamedFramebufferiv.
Mesa's ClearBuffer framework is very complicated and thoroughly married to the
object binding model. Moreover, the OpenGL spec for ClearBuffer is also very
complicated. At some point, we should implement buffer clearing for arbitrary
framebuffer objects, but for now, we will just wrap ClearBuffer.
Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Laura Ekstrand [Wed, 4 Feb 2015 22:21:48 +0000 (14:21 -0800)]
main: Add entry points for InvalidateNamedFramebuffer[Sub]Data.
Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Laura Ekstrand [Wed, 4 Feb 2015 17:49:58 +0000 (09:49 -0800)]
main: Refactor invalidate_framebuffer_storage.
Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Laura Ekstrand [Wed, 4 Feb 2015 22:21:17 +0000 (14:21 -0800)]
main: Complete error conditions for glInvalidate*Framebuffer.
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Cc: "10.4 10.5" <mesa-stable@lists.freedesktop.org>
Laura Ekstrand [Tue, 3 Feb 2015 22:47:00 +0000 (14:47 -0800)]
main: _mesa_blit_framebuffer updates its arbitrary framebuffers.
Previously, we used _mesa_update_state to update the currently bound
framebuffers prior to performing a blit. Now that _mesa_blit_framebuffer
uses arbitrary framebuffers, _mesa_update_state is not specific enough.
Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>