mesa.git
9 years agost/nine: util_gen_mipmap doesn't need we reset states.
Axel Davy [Thu, 19 Feb 2015 21:28:37 +0000 (22:28 +0100)]
st/nine: util_gen_mipmap doesn't need we reset states.

util_gen_mipmap uses pipe->blit, and thus doesn't need
we restore all states after using it.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
9 years agost/nine: D3DUSAGE_AUTOGENMIPMAP is forbidden for volumes
Axel Davy [Thu, 19 Feb 2015 19:55:42 +0000 (20:55 +0100)]
st/nine: D3DUSAGE_AUTOGENMIPMAP is forbidden for volumes

Signed-off-by: Axel Davy <axel.davy@ens.fr>
9 years agost/nine: Fix NineBaseTexture9_PreLoad
Axel Davy [Thu, 19 Feb 2015 19:23:06 +0000 (20:23 +0100)]
st/nine: Fix NineBaseTexture9_PreLoad

It wasn't uploading the texture when the lod
had changed.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
9 years agost/nine: Rewrite Managed texture uploads
Axel Davy [Thu, 19 Feb 2015 18:34:02 +0000 (19:34 +0100)]
st/nine: Rewrite Managed texture uploads

That part of the code was quite obscure.
This new implementation tries to make it clearer
by separating the differents parts, and commenting more.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
9 years agost/nine: Bound the dirty regions to resource size
Axel Davy [Thu, 19 Feb 2015 16:44:43 +0000 (17:44 +0100)]
st/nine: Bound the dirty regions to resource size

Signed-off-by: Axel Davy <axel.davy@ens.fr>
9 years agost/nine: Simplify Surface9 Managed resources implementation
Axel Davy [Thu, 19 Feb 2015 16:34:45 +0000 (17:34 +0100)]
st/nine: Simplify Surface9 Managed resources implementation

Remove the Surface9 code for dirty rects, used only for Managed
resources. Instead convey the information to the parent texture.

According to documentation, this seems to be the expected behaviour,
and if documentation is wrong there, that's not a problem since it can
only leads to more texture updates in corner cases.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
9 years agost/nine: Remove impossible cases with Managed textures
Axel Davy [Thu, 19 Feb 2015 15:35:45 +0000 (16:35 +0100)]
st/nine: Remove impossible cases with Managed textures

Copying to/from a Managed texture is forbidden.
Rendering to a Managed texture is forbidden.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
9 years agost/nine: Encapsulate variables for MANAGED resource
Axel Davy [Thu, 19 Feb 2015 15:18:00 +0000 (16:18 +0100)]
st/nine: Encapsulate variables for MANAGED resource

Signed-off-by: Axel Davy <axel.davy@ens.fr>
9 years agost/nine: Rework texture data allocation
Axel Davy [Thu, 19 Feb 2015 10:21:12 +0000 (11:21 +0100)]
st/nine: Rework texture data allocation

Some applications assume the memory for multilevel
textures is allocated per continuous blocks.

This patch implements that behaviour.

v2: cache offsets

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
9 years agost/nine: Fix update_vertex_elements bad rebase
Axel Davy [Mon, 23 Mar 2015 22:31:18 +0000 (23:31 +0100)]
st/nine: Fix update_vertex_elements bad rebase

This code was supposed to be removed, but a rebase seems to have
made it stay.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
9 years agost/nine: Add debug warning when application uses sw processing
Axel Davy [Sun, 22 Mar 2015 10:49:03 +0000 (11:49 +0100)]
st/nine: Add debug warning when application uses sw processing

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
9 years agost/nine: Rework update_vertex_buffers
Axel Davy [Fri, 20 Feb 2015 17:25:44 +0000 (18:25 +0100)]
st/nine: Rework update_vertex_buffers

Previous code was trying to optimise to call set_vertex_buffers on
big packets, and thus avoids as many calls as possible.

However in practice doing so won't be faster (drivers implement
set_vertex_buffers by a loop over the buffers we want to bind)

When we want to unbind a buffer, we were calling set_vertex_buffers
on a buffer with vtxbuf->buffer = NULL. It works on some drivers,
but not on all of them, because it isn't in Gallium spec.
This patch fixes that.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
9 years agost/nine: Fix computation of const_used_size
Xavier Bouchoux [Mon, 16 Feb 2015 08:43:23 +0000 (09:43 +0100)]
st/nine: Fix computation of const_used_size

Was sometimes too large for PS.

Reviewed-by: Axel Davy <axel.davy@ens.fr>
Signed-off-by: Xavier Bouchoux <xavierb@gmail.com>
9 years agogallium/svga: Remove useless ARRAY_SIZE declaration
Axel Davy [Sun, 26 Apr 2015 21:19:03 +0000 (23:19 +0200)]
gallium/svga: Remove useless ARRAY_SIZE declaration

This is already declared in util/macros.h

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
9 years agoutil/macros: Move DIV_ROUND_UP to util/macros.h
Axel Davy [Sun, 26 Apr 2015 21:17:45 +0000 (23:17 +0200)]
util/macros: Move DIV_ROUND_UP to util/macros.h

Move DIV_ROUND_UP to a shared location accessible everywhere

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
9 years agost/nine: Fix behaviour of D3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING
Xavier Bouchoux [Sat, 21 Feb 2015 18:58:38 +0000 (19:58 +0100)]
st/nine: Fix behaviour of D3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING

Ignore D3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING when
D3DUSAGE_RENDERTARGET is not specified.

This behaviour matches windows drivers.

Reviewed-by: Axel Davy <axel.davy@ens.fr>
Signed-off-by: Xavier Bouchoux <xavierb@gmail.com>
9 years agost/nine: Improve D3DQUERYTYPE_TIMESTAMP
Xavier Bouchoux [Sat, 21 Feb 2015 18:56:40 +0000 (19:56 +0100)]
st/nine: Improve D3DQUERYTYPE_TIMESTAMP

Avoid blocking when retrieving D3DQUERYTYPE_TIMESTAMP result with
NineQuery9_GetData(), when D3DGETDATA_FLUSH is not specified.
This mimics Win behaviour and gives slightly better performance
for some games.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
Signed-off-by: Xavier Bouchoux <xavierb@gmail.com>
9 years agost/nine: Fix D3DQUERYTYPE_TIMESTAMPFREQ query
Xavier Bouchoux [Sun, 8 Feb 2015 14:56:15 +0000 (15:56 +0100)]
st/nine: Fix D3DQUERYTYPE_TIMESTAMPFREQ query

D3DQUERYTYPE_TIMESTAMPFREQ is supposed to give the frequency
at which the clock of D3DQUERYTYPE_TIMESTAMP runs.

PIPE_QUERY_TIMESTAMP returns a value in ns, thus the corresponding
frequency is 1000000000.
PIPE_QUERY_TIMESTAMP_DISJOINT returns the frequency at which
PIPE_QUERY_TIMESTAMP value is updated. It isn't always
1000000000.

Reviewed-by: Axel Davy <axel.davy@ens.fr>
Signed-off-by: Xavier Bouchoux <xavierb@gmail.com>
9 years agost/nine: Change x86 FPU Control word on device creation
Tiziano Bacocco [Sun, 25 Jan 2015 11:15:39 +0000 (12:15 +0100)]
st/nine: Change x86 FPU Control word on device creation

As on wined3d and windows, when D3DCREATE_FPU_PRESERVE is not
specified, change the fpu control word to all exceptions masked,
single precision, round to nearest.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Signed-off-by: Tiziano Bacocco <tizbac2@gmail.com>
9 years agost/nine: Do not advertise D3DDEVCAPS_TEXTURESYSTEMMEMORY
Axel Davy [Fri, 20 Feb 2015 11:51:55 +0000 (12:51 +0100)]
st/nine: Do not advertise D3DDEVCAPS_TEXTURESYSTEMMEMORY

No major vendor advertises it, and we weren't supporting it.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
9 years agost/nine: Fix comment in update_viewport
Axel Davy [Thu, 23 Apr 2015 19:46:24 +0000 (21:46 +0200)]
st/nine: Fix comment in update_viewport

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
9 years agost/nine: Workaround barycentrics issue on some cards
Axel Davy [Thu, 23 Apr 2015 19:46:09 +0000 (21:46 +0200)]
st/nine: Workaround barycentrics issue on some cards

Signed-off-by: Axel Davy <axel.davy@ens.fr>
9 years agost/nine: Clear struct pipe_blit_info before use.
Xavier Bouchoux [Mon, 16 Feb 2015 09:02:42 +0000 (10:02 +0100)]
st/nine: Clear struct pipe_blit_info before use.

render_condition_enable was uninitialized.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
Signed-off-by: Xavier Bouchoux <xavierb@gmail.com>
9 years agost/nine: NineDevice9_Clear skip fastpath for bigger depth-buffers
Patrick Rudolph [Fri, 20 Feb 2015 14:48:57 +0000 (15:48 +0100)]
st/nine: NineDevice9_Clear skip fastpath for bigger depth-buffers

This adds an additional check to make sure the bound depth-buffer doesn't
exceed the rendertarget size when clearing depth and color buffer at once.
D3D9 clears only a rectangle with the same dimensions as the viewport, leaving
other parts of the depth-buffer intact.

This fixes failing WINE test visual.c:depth_buffer_test()

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
9 years agost/nine: Fix wrong assert in nine_shader
Axel Davy [Sat, 21 Mar 2015 12:36:25 +0000 (13:36 +0100)]
st/nine: Fix wrong assert in nine_shader

The sampler src index was wrong for texldl and texldd

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
9 years agost/nine: Handle special LIT case
Axel Davy [Tue, 23 Dec 2014 14:15:10 +0000 (15:15 +0100)]
st/nine: Handle special LIT case

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
9 years agomesa: Fix glGetProgramiv(GL_ACTIVE_ATTRIBUTES).
Jose Fonseca [Tue, 28 Apr 2015 20:49:36 +0000 (21:49 +0100)]
mesa: Fix glGetProgramiv(GL_ACTIVE_ATTRIBUTES).

It's returning random values, because RESOURCE_VAR() is casting
different objects into ir_variable pointers.

This updates _mesa_count_active_attribs to filter the resources with the
same logic used in _mesa_longest_attribute_name_length.

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

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
9 years agoegl: misc fixes for EGL_MESA_image_dma_buf_export
Marc-André Lureau [Tue, 28 Apr 2015 10:23:42 +0000 (12:23 +0200)]
egl: misc fixes for EGL_MESA_image_dma_buf_export

Fix define and a function argument name introduced in commit
8f7338f284cdb1fef64c85e3293d2200d0cc6387

Signed-off-by: Dave Airlie <airlied@redhat.com>
9 years agonvc0/ir: flush denorms to zero in non-compute shaders
Ilia Mirkin [Tue, 28 Apr 2015 07:30:08 +0000 (03:30 -0400)]
nvc0/ir: flush denorms to zero in non-compute shaders

This will set the FTZ flag (flush denorms to zero) on all opcodes that
can take it.

This resolves issues in Unigine Heaven 4.0 where there were solid-filled
boxes popping up.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89455
Cc: "10.4 10.5" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
9 years agometa: remove unneeded #include colortab.h
Brian Paul [Sat, 25 Apr 2015 02:12:50 +0000 (20:12 -0600)]
meta: remove unneeded #include colortab.h

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
9 years agomesa: remove unneeded #include colortab.h
Brian Paul [Sat, 25 Apr 2015 02:12:42 +0000 (20:12 -0600)]
mesa: remove unneeded #include colortab.h

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
9 years agomesa: remove unused options var in compile_shader()
Brian Paul [Sat, 25 Apr 2015 02:04:29 +0000 (20:04 -0600)]
mesa: remove unused options var in compile_shader()

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
9 years agodocs: more details about Viewperf 12 medical-01 test issues
Brian Paul [Thu, 23 Apr 2015 16:00:34 +0000 (10:00 -0600)]
docs: more details about Viewperf 12 medical-01 test issues

9 years agonvc0: expose GLSL version 410
Ilia Mirkin [Sun, 26 Apr 2015 20:15:02 +0000 (16:15 -0400)]
nvc0: expose GLSL version 410

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
9 years agost/mesa: allow glsl version up to 410, enable ARB_shader_precision
Ilia Mirkin [Sun, 26 Apr 2015 20:14:36 +0000 (16:14 -0400)]
st/mesa: allow glsl version up to 410, enable ARB_shader_precision

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
9 years agost/va: add h264 decoder level support
Leo Liu [Thu, 12 Mar 2015 18:29:21 +0000 (14:29 -0400)]
st/va: add h264 decoder level support

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
9 years agost/omx/dec: add h264 decoder level support
Leo Liu [Fri, 13 Mar 2015 16:39:26 +0000 (12:39 -0400)]
st/omx/dec: add h264 decoder level support

v2: use sps level idc as level to driver

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
9 years agovl: add level idc in sps
Leo Liu [Mon, 16 Mar 2015 19:06:30 +0000 (15:06 -0400)]
vl: add level idc in sps

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
9 years agost/omx/dec: separate create_video_codec to different codecs
Leo Liu [Fri, 13 Mar 2015 16:25:42 +0000 (12:25 -0400)]
st/omx/dec: separate create_video_codec to different codecs

v2: get frame size from port info

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
9 years agost/vdpau: add h264 decoder level support
Leo Liu [Thu, 12 Mar 2015 18:09:49 +0000 (14:09 -0400)]
st/vdpau: add h264 decoder level support

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
9 years agogallium/util: get h264 level based on number of max references and resolution
Leo Liu [Thu, 12 Mar 2015 18:01:52 +0000 (14:01 -0400)]
gallium/util: get h264 level based on number of max references and resolution

v2: add commments for limitation of max references numbers,
and what the caculation is based

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
9 years agor600g,radeonsi: add a driver query returning GPU load
Marek Olšák [Tue, 24 Feb 2015 00:26:13 +0000 (01:26 +0100)]
r600g,radeonsi: add a driver query returning GPU load

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
9 years agor600g,radeonsi: add driver queries for GPU temperature and shader+memory clocks
Marek Olšák [Mon, 23 Feb 2015 23:50:20 +0000 (00:50 +0100)]
r600g,radeonsi: add driver queries for GPU temperature and shader+memory clocks

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
9 years agogm107/ir: add lane/vertex count sysvals
Ilia Mirkin [Wed, 23 Jul 2014 03:45:13 +0000 (23:45 -0400)]
gm107/ir: add lane/vertex count sysvals

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
9 years agogk110/ir: add support for writing per-patch and shader outputs
Ilia Mirkin [Mon, 27 Apr 2015 16:54:43 +0000 (12:54 -0400)]
gk110/ir: add support for writing per-patch and shader outputs

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
9 years agofreedreno/a3xx: color masking works like a blend for some formats
Ilia Mirkin [Sat, 25 Apr 2015 19:37:24 +0000 (15:37 -0400)]
freedreno/a3xx: color masking works like a blend for some formats

When there is a colormask active that does not cover all the channels,
enable reading in the destination like with a combining blend
operation. This fixes fbo-blending-formats on a3xx.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
9 years agofreedreno/a3xx: add support for S8 and Z32F_S8
Ilia Mirkin [Wed, 22 Apr 2015 18:35:00 +0000 (14:35 -0400)]
freedreno/a3xx: add support for S8 and Z32F_S8

Enables ARB_depth_buffer_float. There is no sampling support for
interleaved Z32F_S8, so we store the two textures separately, one as
Z32F, the other as S8. As a result, we need a lot of additional logic
for restores and transfers.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
9 years agofreedreno/a3xx: add Z32F support
Ilia Mirkin [Sat, 25 Apr 2015 05:21:26 +0000 (01:21 -0400)]
freedreno/a3xx: add Z32F support

32-bit depth buffers are stored as unorm, and thus need special handling
when moving to and from gmem. They are copied into gmem by writing
depth, and resolved from gmem using a special resolve bit which
apparently float-ifies the data.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
9 years agofreedreno: add fd_transfer to wrap around pipe_transfer
Ilia Mirkin [Mon, 6 Apr 2015 05:39:14 +0000 (01:39 -0400)]
freedreno: add fd_transfer to wrap around pipe_transfer

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
9 years agofreedreno/a3xx: add support for disabling depth clipping
Ilia Mirkin [Sat, 25 Apr 2015 01:44:05 +0000 (21:44 -0400)]
freedreno/a3xx: add support for disabling depth clipping

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
9 years agoi965/vs: Remove unnecessary NULL check on generate_code() result.
Kenneth Graunke [Sat, 25 Apr 2015 16:47:59 +0000 (09:47 -0700)]
i965/vs: Remove unnecessary NULL check on generate_code() result.

Code generation is not allowed to fail for any reason - in fact,
fs_generator has no mechanism for failing.  The visitor is responsible
for that.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
9 years agoglsl: fix packing support for arrays of doubles
Timothy Arceri [Mon, 27 Apr 2015 21:26:36 +0000 (07:26 +1000)]
glsl: fix packing support for arrays of doubles

Broke in commit f00c5f85b82efe9535b18dbf97c4591fb28aeae6 when
adding support for multidimensional arrays

Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>
9 years agoi965: Enable ARB_gpu_shader5 on Gen8+.
Matt Turner [Fri, 24 Apr 2015 18:28:06 +0000 (11:28 -0700)]
i965: Enable ARB_gpu_shader5 on Gen8+.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
9 years agoi965/fs: Fix code emission for imul_high in NIR.
Matt Turner [Fri, 24 Apr 2015 18:28:05 +0000 (11:28 -0700)]
i965/fs: Fix code emission for imul_high in NIR.

Copy over from brw_fs_visitor.cpp.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
9 years agoi965/fs: Fix stride for multiply in macro.
Matt Turner [Fri, 24 Apr 2015 18:28:04 +0000 (11:28 -0700)]
i965/fs: Fix stride for multiply in macro.

We have to use W/UW type for src1 of the multiply in the MUL/MACH macro,
but in order to read the low 16-bits of each 32-bit integer, we need to
set the appropriate stride.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
9 years agoRevert "i965/fs: Allow SIMD16 borrow/carry/64-bit multiply on Gen > 7."
Matt Turner [Fri, 24 Apr 2015 18:28:03 +0000 (11:28 -0700)]
Revert "i965/fs: Allow SIMD16 borrow/carry/64-bit multiply on Gen > 7."

This reverts commit 9f5e5bd34d8ba48c851b442fb88f742b1ba6a571.

I have no idea what made me believe these didn't apply to Gen > 7. They
do, and without them we generate bad code that causes failures on Gen 8.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
9 years agoscons: Support LLVM 3.5 and 3.6 on windows.
Olivier Pena [Mon, 27 Apr 2015 10:23:58 +0000 (10:23 +0000)]
scons: Support LLVM 3.5 and 3.6 on windows.

llvm/Config/llvm-config.h is parsed instead of llvm/Config/config.h for
detecting LLVM version
(http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-June/073707.html).

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
9 years agomesa: fix up GLSL version when computing GL version
Ilia Mirkin [Mon, 27 Apr 2015 18:00:44 +0000 (14:00 -0400)]
mesa: fix up GLSL version when computing GL version

In some situations it is convenient for a driver to expose a higher GLSL
version while some extensions are still incomplete. However in that
situation, it would report a GLSL version that was higher than the GL
version. Avoid that situation by limiting the GLSL version to the GL
version.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Brian Paul <brianp@vmware.com>
9 years agosoftpipe: fix another stencil-as-float issue
Roland Scheidegger [Sat, 25 Apr 2015 20:10:42 +0000 (22:10 +0200)]
softpipe: fix another stencil-as-float issue

Hopefully this is the last one now (for texture X32_S8X24_UINT views).
+4 piglits.

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

Reviewed-by: Brian Paul <brianp@vmware.com>
9 years agomesa: the function name appears to have a gl prefix already
Ilia Mirkin [Fri, 24 Apr 2015 23:33:05 +0000 (19:33 -0400)]
mesa: the function name appears to have a gl prefix already

Currently we're producing errors like

User error: GL_INVALID_OPERATION in glglDeleteProgramsARB(invalid call)

And noop_warn appears to be called with the full function name. Don't
prepend a gl prefix.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Brian Paul <brianp@vmware.com>
9 years agoFix a few typos
Zoë Blade [Wed, 22 Apr 2015 10:33:17 +0000 (11:33 +0100)]
Fix a few typos

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
9 years agoi965/gen8: Factor out texture surface state set-up from gen8_update_texture_surface().
Francisco Jerez [Mon, 13 Apr 2015 18:38:06 +0000 (21:38 +0300)]
i965/gen8: Factor out texture surface state set-up from gen8_update_texture_surface().

This moves most of the surface state set-up logic that can be shared
between textures and shader images to a separate function.

9 years agoi965/gen7: Factor out texture surface state set-up from gen7_update_texture_surface().
Francisco Jerez [Mon, 13 Apr 2015 18:37:02 +0000 (21:37 +0300)]
i965/gen7: Factor out texture surface state set-up from gen7_update_texture_surface().

This moves most of the surface state set-up logic that can be shared
between textures and shader images to a separate function.

9 years agoi965: Add helper functions to calculate the slice pitch of an array or 3D miptree.
Francisco Jerez [Wed, 22 Apr 2015 18:32:49 +0000 (21:32 +0300)]
i965: Add helper functions to calculate the slice pitch of an array or 3D miptree.

9 years agoscons: add target osmesa using gallium state tracker.
Olivier Pena [Wed, 22 Apr 2015 15:36:28 +0000 (15:36 +0000)]
scons: add target osmesa using gallium state tracker.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
9 years agoradeonsi: set an optimal value for DB_Z_INFO.ZRANGE_PRECISION
Marek Olšák [Thu, 16 Apr 2015 18:40:31 +0000 (20:40 +0200)]
radeonsi: set an optimal value for DB_Z_INFO.ZRANGE_PRECISION

Required because of a VI hw bug.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
9 years agoradeonsi: remove deprecated and useless registers
Marek Olšák [Thu, 16 Apr 2015 18:37:45 +0000 (20:37 +0200)]
radeonsi: remove deprecated and useless registers

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
9 years agoradeonsi: remove useless includes
Marek Olšák [Thu, 16 Apr 2015 18:16:35 +0000 (20:16 +0200)]
radeonsi: remove useless includes

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
9 years agogallium/radeon: print winsys info with R600_DEBUG=info
Marek Olšák [Thu, 16 Apr 2015 18:15:16 +0000 (20:15 +0200)]
gallium/radeon: print winsys info with R600_DEBUG=info

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
9 years agowinsys/radeon: make radeon_bo_vtbl static
Marek Olšák [Thu, 16 Apr 2015 17:09:57 +0000 (19:09 +0200)]
winsys/radeon: make radeon_bo_vtbl static

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
9 years agoglsl: replace while loop with without_array function
Timothy Arceri [Tue, 19 Aug 2014 07:46:44 +0000 (21:46 -1000)]
glsl: replace while loop with without_array function

Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
9 years agoglsl: support packing of arrays of arrays
Timothy Arceri [Fri, 27 Feb 2015 11:43:39 +0000 (22:43 +1100)]
glsl: support packing of arrays of arrays

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
9 years agoglsl: add arrays of arrays support to without_array function
Timothy Arceri [Tue, 19 Aug 2014 07:40:50 +0000 (21:40 -1000)]
glsl: add arrays of arrays support to without_array function

Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
9 years agodocs/GL3: started adding support for shader_image_size
Martin Peres [Mon, 27 Apr 2015 07:13:49 +0000 (10:13 +0300)]
docs/GL3: started adding support for shader_image_size

Signed-off-by: Martin Peres <martin.peres@linux.intel.com>
9 years agogallium/hud: add more options to customize HUD panes
Gediminas Jakutis [Sat, 11 Apr 2015 23:58:33 +0000 (02:58 +0300)]
gallium/hud: add more options to customize HUD panes

Extends the syntax of GALLIUM_HUD environment variable to:
- Add options to set the size and exact location of each pane.
- Add an option to limit the maximum allowed value of the X axis on a
  pane, clamping the graph down to not go above this value.
- Add an option to auto-adjust the value of the Y axis down to the
  highest value still visible on the graph.

v2:
- Make the patch simpler and smaller.
- With dynamic auto-adjusting on, adjust the Y axis once per pane
  update instead of updating once every several seconds.
- No longer mishandle pane height when having more than one graph per
  pane.

9 years agoi965: Fill out the rest of brw_debug_recompile_sampler_key().
Kenneth Graunke [Fri, 24 Apr 2015 06:17:10 +0000 (23:17 -0700)]
i965: Fill out the rest of brw_debug_recompile_sampler_key().

This makes INTEL_DEBUG=perf report shader recompiles due to CMS vs.
UMS/IMS differences and Sandybridge textureGather workarounds.

Previously, we just flagged them as "Something else".

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
9 years agoi965: Disassemble sampler message names on Gen5+.
Kenneth Graunke [Fri, 24 Apr 2015 05:56:25 +0000 (22:56 -0700)]
i965: Disassemble sampler message names on Gen5+.

Previously, sampler messages were decoded as

sampler (1, 0, 2, 2) mlen 6 rlen 8              { align1 1H };

I don't know how much time we've collectly wasted trying to read this
format.  I can never recall which number is the surface index, sampler
index, message type, or...whatever that other number is.  Figuring out
the message name from the numerical code is also painful.

Now they decode as:

sampler sample_l SIMD16 Surface = 1 Sampler = 0 mlen 6 rlen 8 { align1 1H };

This is easy to read at a glance, and matches the format I used for
render target formats.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
9 years agoi965/fs: Disallow constant propagation into POW on Gen 6.
Matt Turner [Sat, 25 Apr 2015 08:50:04 +0000 (01:50 -0700)]
i965/fs: Disallow constant propagation into POW on Gen 6.

Fixes assertion failures in three piglit tests on Gen 6 since commit
0087cf23e.

9 years agomesa: add support for exposing up to GL4.2
Ilia Mirkin [Thu, 23 Apr 2015 14:48:47 +0000 (10:48 -0400)]
mesa: add support for exposing up to GL4.2

Add the 4.0/4.1/4.2 extensions lists to compute_version. A couple of
extensions aren't in mesa yet, so those are marked with 0 until they
become supported.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Matt Turner <mattst88@gmail.com>
9 years agoi965/fs: Add missing pixel_x/y to brw_instruction_name().
Matt Turner [Fri, 24 Apr 2015 23:23:46 +0000 (16:23 -0700)]
i965/fs: Add missing pixel_x/y to brw_instruction_name().

Forgotten in commit 529064f6.

9 years agoi965/fs: Don't constant propagate into integer math instructions.
Matt Turner [Fri, 24 Apr 2015 20:14:56 +0000 (13:14 -0700)]
i965/fs: Don't constant propagate into integer math instructions.

Constant combining won't promote non-floats, so this isn't safe.

Fixes regressions since commit 0087cf23e.

9 years agodocs: add news item and link release notes for mesa 10.5.4
Emil Velikov [Fri, 24 Apr 2015 21:58:23 +0000 (22:58 +0100)]
docs: add news item and link release notes for mesa 10.5.4

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
9 years agodocs: Add sha256 sums for the 10.5.4 release
Emil Velikov [Fri, 24 Apr 2015 21:51:25 +0000 (22:51 +0100)]
docs: Add sha256 sums for the 10.5.4 release

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
(cherry picked from commit adb47b5b279b6fd920151aa7926af6ffd2069339)

9 years agoAdd release notes for the 10.5.4 release
Emil Velikov [Fri, 24 Apr 2015 21:27:09 +0000 (22:27 +0100)]
Add release notes for the 10.5.4 release

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
(cherry picked from commit ea0d1f575c214c09ba3df12644a960e86e031766)

9 years agomesa: put more info in glTexImage GL_OUT_OF_MEMORY error message
Brian Paul [Fri, 24 Apr 2015 18:56:04 +0000 (12:56 -0600)]
mesa: put more info in glTexImage GL_OUT_OF_MEMORY error message

Give the user some idea about the size of the texture which caused
the GL_OUT_OF_MEMORY error.

Reviewed-by: Matt Turner <mattst88@gmail.com>
9 years agoi965/fs: Allow 2-src math instructions to have immediate src1.
Matt Turner [Tue, 17 Mar 2015 00:53:34 +0000 (17:53 -0700)]
i965/fs: Allow 2-src math instructions to have immediate src1.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
9 years agonir: Transform pow(x, 4) into (x*x)*(x*x).
Matt Turner [Fri, 24 Apr 2015 18:37:30 +0000 (11:37 -0700)]
nir: Transform pow(x, 4) into (x*x)*(x*x).

9 years agoglsl: Transform pow(x, 4) into (x*x)*(x*x).
Matt Turner [Tue, 17 Mar 2015 04:33:31 +0000 (21:33 -0700)]
glsl: Transform pow(x, 4) into (x*x)*(x*x).

Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
9 years agomesa: fix glGetActiveUniformsiv regression
Tapani Pälli [Thu, 23 Apr 2015 11:19:33 +0000 (14:19 +0300)]
mesa: fix glGetActiveUniformsiv regression

Commit 7519ddb caused regression to glGetActiveUniformsiv.
Patch adds back validation loop of all given uniforms before
writing any values, not touching params in case of errors
is tested by the conformance suite.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90149
Reviewed-by: Martin Peres <martin.peres@linux.intel.com>
9 years agomesa: refactor active attrib queries for glGetProgramiv
Tapani Pälli [Thu, 23 Apr 2015 08:13:17 +0000 (11:13 +0300)]
mesa: refactor active attrib queries for glGetProgramiv

Main motivation here is to get rid of iterating IR and
encapsulate queries within program resources.
No functional changes.

Piglit tests calling the modified functionality:

   - gl-get-active-attrib-returns-all-inputs
   - glsl-1.50-get-active-attrib-array
   - getactiveattrib

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Martin Peres <martin.peres@linux.intel.com>
9 years agoi965: Add an INTEL_DEBUG=spill option to test spilling
Jason Ekstrand [Thu, 23 Apr 2015 18:49:27 +0000 (11:49 -0700)]
i965: Add an INTEL_DEBUG=spill option to test spilling

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
9 years agoi965/debug: Use the ull specifier for DEBUG enum defines
Jason Ekstrand [Thu, 23 Apr 2015 20:59:32 +0000 (13:59 -0700)]
i965/debug: Use the ull specifier for DEBUG enum defines

The INTEL_DEBUG variable is a uint64_t and if we want a enum value higer
than 32 bits, you need to use ull.  We might as well use it for all of them.

Reviewed-by: Matt Turner <mattst88@gmail.com>
9 years agoi965: Disallow linear blits that are not cacheline aligned.
Kenneth Graunke [Tue, 21 Apr 2015 19:32:38 +0000 (12:32 -0700)]
i965: Disallow linear blits that are not cacheline aligned.

The BLT engine on Gen8+ requires linear surfaces to be cacheline
aligned.  This restriction was added as part of converting the BLT to
use 48-bit addressing.

The main user, intel_emit_linear_blit, now handles this properly.
But we might also have linear miptrees; just refuse to blit those.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88521
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Cc: mesa-stable@lists.freedesktop.org
9 years agoi965: Make intel_emit_linear_blit handle Gen8+ alignment restrictions.
Kenneth Graunke [Wed, 15 Apr 2015 10:04:33 +0000 (03:04 -0700)]
i965: Make intel_emit_linear_blit handle Gen8+ alignment restrictions.

The BLT engine on Gen8+ requires linear surfaces to be cacheline
aligned.  This restriction was added as part of converting the BLT to
use 48-bit addressing.

intel_emit_linear_blit needs to handle blits that are not cacheline
aligned, as we use it for arbitrary glBufferSubData calls and subrange
mappings.

Since intel_emit_linear_blit uses 1 byte per pixel, we can use the src/dst
pixel X offset field to represent the unaligned portion, and subtract
that from the address so it's cacheline aligned.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88521
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Cc: mesa-stable@lists.freedesktop.org
9 years agomapi: Adding missing string.h include.
Pali Rohár [Thu, 23 Apr 2015 21:02:07 +0000 (22:02 +0100)]
mapi: Adding missing string.h include.

File glapi_entrypoint.c calls memcpy() function, but does not include
string.h header. So compilation can fail at error: implicit declaration
of function 'memcpy'.

Signed-off-by: Jose Fonseca <jfonseca@vmware.com>
9 years agoos/os_memory_aligned.h: Handle integer overflow.
Jose Fonseca [Wed, 22 Apr 2015 19:23:59 +0000 (20:23 +0100)]
os/os_memory_aligned.h: Handle integer overflow.

This code is only used when our memory debugging wrappers are enabled,
as we use the C runtime functions directly elsewhere.

Tested llvmpipe on Windows w/ memory debugging enabled.

VMware PR894263.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
9 years agodraw: fix prim ids when there's no gs
Roland Scheidegger [Thu, 23 Apr 2015 16:13:32 +0000 (18:13 +0200)]
draw: fix prim ids when there's no gs

We were resetting the prim id count for each run of the prim assembler,
hence this only worked when the draw calls were very small (the exact limit
depending on the vertex size), since larger draw calls get split up.
So, do the same as we do already if there's a gs, reset it to zero explicitly
for every new instance (this possibly could use the same variable but that
isn't doable without some heavy refactoring and I'm not sure it makes sense).

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

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
CC: <mesa-stable@lists.freedesktop.org>
9 years agogallium/radeon: don't crash when getting out-of-bounds TEMP references
Marek Olšák [Thu, 19 Mar 2015 11:14:08 +0000 (12:14 +0100)]
gallium/radeon: don't crash when getting out-of-bounds TEMP references

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
9 years agonir/lower_source_mods: Don't propagate register sources
Jason Ekstrand [Mon, 13 Apr 2015 21:13:16 +0000 (14:13 -0700)]
nir/lower_source_mods: Don't propagate register sources

The nir_lower_source_mods pass does a weak form of copy propagation to
clean up all of the mov-with-negate's that get generated.  However, we
weren't properly checking that the sources were SSA and so we could end up
moving a register read which is not, in general, valid.

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
9 years agonir: Rewrite instr_rewrite_src
Jason Ekstrand [Mon, 13 Apr 2015 21:02:21 +0000 (14:02 -0700)]
nir: Rewrite instr_rewrite_src

The old code wasn't correctly handling the case where the new value of the
source contains an indirect.

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>