mesa.git
8 years agodocs: Fix typo in extension name
Anuj Phogat [Mon, 18 Jul 2016 22:53:24 +0000 (15:53 -0700)]
docs: Fix typo in extension name

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
8 years agodocs: Add support for GL_KHR_texture_compression_astc_sliced_3d
Anuj Phogat [Mon, 18 Jul 2016 22:42:18 +0000 (15:42 -0700)]
docs: Add support for GL_KHR_texture_compression_astc_sliced_3d

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reported-by: Ilia Mirkin <imirkin@alum.mit.edu>
8 years agoRevert "docs: Mark KHR_texture_compression_astc_sliced_3d done on i965"
Anuj Phogat [Mon, 18 Jul 2016 22:17:53 +0000 (15:17 -0700)]
Revert "docs: Mark KHR_texture_compression_astc_sliced_3d done on i965"

This reverts commit 82f8c239506ef126dcad266156f8945c62dc6bc9.

KHR_texture_compression_astc_sliced_3d is not a requirement for
GLES 3.2.

Reported-by: Ilia Mirkin <imirkin@alum.mit.edu>\
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
8 years agodocs: Mark KHR_texture_compression_astc_sliced_3d done on i965
Anuj Phogat [Fri, 8 Jul 2016 00:05:02 +0000 (17:05 -0700)]
docs: Mark KHR_texture_compression_astc_sliced_3d done on i965

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
8 years agoi965/gen9: Enable KHR_texture_compression_astc_sliced_3d
Anuj Phogat [Fri, 8 Jul 2016 00:04:17 +0000 (17:04 -0700)]
i965/gen9: Enable KHR_texture_compression_astc_sliced_3d

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
8 years agomesa: Add the infrastructure for KHR_texture_compression_astc_sliced_3d
Anuj Phogat [Fri, 8 Jul 2016 00:03:19 +0000 (17:03 -0700)]
mesa: Add the infrastructure for KHR_texture_compression_astc_sliced_3d

V2: Drop the changes to gl.xml.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
8 years agoradeon/uvd: add session context buffer for polaris 10/11 v2
Christian König [Thu, 7 Jul 2016 12:28:06 +0000 (14:28 +0200)]
radeon/uvd: add session context buffer for polaris 10/11 v2

This way we have unlimited UVD sessions.

v2: only enable it when kernel supports it as well.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
8 years agovl/dri3: fix a memory leak from front buffer
Leo Liu [Thu, 14 Jul 2016 13:19:59 +0000 (09:19 -0400)]
vl/dri3: fix a memory leak from front buffer

Inspired by fix for mem leak of vdpau interop, resource_from_handle
set texture reference count, that need to be decreased and released,
recall there is a similar case for DRI3, that is with VA-API glx
extension, there is temporary TFP(texture from pixmap), we target it
through dma-buf. leak happens when without count down the reference.

Checked and found with mpv vo=opengl case, there only one static TFP,
the leak happens once, but for totem player using gstreamer VA-API glx,
the dynamic TFP for each frame, so leak quite a bit.

This fixes mem leak for mpv and totem.

Signed-off-by: Leo Liu <leo.liu@amd.com>
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
8 years agoi965/tes/scalar: fix 64-bit indirect input loads
Iago Toral Quiroga [Fri, 15 Jul 2016 08:55:05 +0000 (10:55 +0200)]
i965/tes/scalar: fix 64-bit indirect input loads

We totally ignored this before because there were no piglit tests for
indirect loads in tessellation stages with doubles.

Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
8 years agoi965/tcs/scalar: only update imm_offset for second message in 64bit input loads
Iago Toral Quiroga [Fri, 15 Jul 2016 08:48:03 +0000 (10:48 +0200)]
i965/tcs/scalar: only update imm_offset for second message in 64bit input loads

Our indirect URB read messages take both a direct and an indirect offset
so when we emit the second message for a 64-bit input load we can just
always incremement the immediate offset, even for the indirect case.

Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
8 years agoi965: Move pulls_bary setting to emit_pixel_interpolator_send().
Kenneth Graunke [Thu, 14 Jul 2016 03:16:11 +0000 (20:16 -0700)]
i965: Move pulls_bary setting to emit_pixel_interpolator_send().

pulls_bary should be set when the shader uses a pixel interpolator
message.  So, setting it from the function that emits pixel interpolator
messages makes a lot of sense.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
8 years agoi965: Write gl_FragCoord directly to the destination.
Kenneth Graunke [Thu, 14 Jul 2016 23:52:10 +0000 (16:52 -0700)]
i965: Write gl_FragCoord directly to the destination.

This patch makes emit_general_interpolation take a destination register
as an argument, and write directly to that.  This is simpler than the
old approach of ralloc'ing a register, writing to that temporary, and
then making the caller emit per-component MOVs to copy it to the actual
destination.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
8 years agoi965: Drop has_pln checks in unlit centroid workaround.
Kenneth Graunke [Fri, 15 Jul 2016 00:17:14 +0000 (17:17 -0700)]
i965: Drop has_pln checks in unlit centroid workaround.

The unlit centroid workaround starts being necessary on Gen6, which
is the first platform with multisampling.  PLN exists on G45+, so all
platforms which need this workaround have PLN.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
8 years agoi965: Drop VARYING_SLOT_FACE special case in barycentric setup.
Kenneth Graunke [Thu, 14 Jul 2016 18:48:01 +0000 (11:48 -0700)]
i965: Drop VARYING_SLOT_FACE special case in barycentric setup.

glsl_to_nir always produces a system value for gl_FrontFacing, rather
than an input.  So there should never be an input with this slot,
making this code dead.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
8 years agocompiler: Rename INTERP_QUALIFIER_* to INTERP_MODE_*.
Kenneth Graunke [Thu, 7 Jul 2016 09:02:38 +0000 (02:02 -0700)]
compiler: Rename INTERP_QUALIFIER_* to INTERP_MODE_*.

Likewise, rename the enum type to glsl_interp_mode.

Beyond the GLSL front-end, talking about "interpolation modes" seems
more natural than "interpolation qualifiers" - in the IR, we're removed
from how exactly the source language specifies how to interpolate an
input.  Also, SPIR-V calls these "decorations" rather than "qualifiers".

Generated by:
$ find . -regextype egrep -regex '.*\.(c|cpp|h)' -type f -exec sed -i \
  -e 's/INTERP_QUALIFIER_/INTERP_MODE_/g' \
  -e 's/glsl_interp_qualifier/glsl_interp_mode/g' {} \;

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Dave Airlie <airlied@redhat.com>
8 years agovirgl: drop pointless leftover init of virgl_transfer_inline_write.
Dave Airlie [Sat, 16 Jul 2016 20:19:43 +0000 (06:19 +1000)]
virgl: drop pointless leftover init of virgl_transfer_inline_write.

Pointed out by Marek.

Signed-off-by: Dave Airlie <airlied@redhat.com>
8 years agonv50: fix alphatest for non-blendable formats
Ilia Mirkin [Sun, 19 Jun 2016 20:57:50 +0000 (16:57 -0400)]
nv50: fix alphatest for non-blendable formats

The hardware can only do alphatest when using a blendable format. This
means that the various *16 norm formats didn't work with alphatest. It
appears that Talos Principle uses such formats, as well as alpha tests,
for some internal renders, which made them be incorrect. However this
does not appear to affect the final renders, but in a different game it
easily could.

The approach we take is that when alphatests are enabled and a suitable
format is used (which we anticipate is the vast minority of the time),
we insert code into the shader to perform the comparison and discard.
Once inserted, that code lives in the shader forever, and we re-upload
it each time the function changes with a fixed-up compare. To avoid
re-uploading too often, if we switch back to a blendable format, the
test is (effectively) disabled and the hw alphatest functionality is
used.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
8 years agomesa/st: reduce size of state->st bitmask
Rob Clark [Thu, 14 Jul 2016 20:08:31 +0000 (16:08 -0400)]
mesa/st: reduce size of state->st bitmask

In d035d50 this changed to 64b.. which I'm pretty sure was
unintentional.  Revert it back to 32b so the entire state struct
is a nice round 64b.

(Note sure that it would actually be measurable, but I did notice
that check_state() was hot in some benchmarks.)

Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
8 years agogallium/u_queue: add optional cleanup callback
Rob Clark [Wed, 13 Jul 2016 16:17:05 +0000 (12:17 -0400)]
gallium/u_queue: add optional cleanup callback

Adds a second optional cleanup callback, called after the fence is
signaled.  This is needed if, for example, the queue has the last
reference to the object that embeds the util_queue_fence.  In this
case we cannot drop the ref in the main callback, since that would
result in the fence being destroyed before it is signaled.

Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
8 years agoradeonsi: remove the DRAW_PREAMBLE packet
Nicolai Hähnle [Thu, 14 Jul 2016 14:21:52 +0000 (16:21 +0200)]
radeonsi: remove the DRAW_PREAMBLE packet

According to firmware guys, the new sequence that we added for Polaris should
work on all CIK parts, and should actually be faster on some parts.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
8 years agomesa: handle numSamples=0 in _mesa_test_proxy_teximage()
Brian Paul [Sat, 16 Jul 2016 03:22:53 +0000 (21:22 -0600)]
mesa: handle numSamples=0 in _mesa_test_proxy_teximage()

Should fix the regressions reported in bug 96949.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96949
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agonir: Use dest.ssa.num_components rather than intrin->num_components.
Kenneth Graunke [Sat, 16 Jul 2016 00:53:13 +0000 (17:53 -0700)]
nir: Use dest.ssa.num_components rather than intrin->num_components.

I recently refactored this to share code between load and atomic
lowering.  loads used intrin->num_components, while atomics used
intrin->dest.ssa.num_components.  They should be equivalent, but
Jason wanted me to use the latter.  I missed applying his review.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agonir: Update outdated intrinsic const_index comments.
Kenneth Graunke [Thu, 7 Jul 2016 08:02:55 +0000 (01:02 -0700)]
nir: Update outdated intrinsic const_index comments.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agonir: Use nir_intrinsic_set_base in atomic lowering.
Kenneth Graunke [Thu, 14 Jul 2016 21:18:33 +0000 (14:18 -0700)]
nir: Use nir_intrinsic_set_base in atomic lowering.

This is more readable and also offers assertions that protect against
setting const_index fields on the wrong kind of intrinsic.

Suggested by Jason.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agonir: Split nir_lower_io's input/output/atomic handling into helpers.
Kenneth Graunke [Tue, 12 Jul 2016 09:07:29 +0000 (02:07 -0700)]
nir: Split nir_lower_io's input/output/atomic handling into helpers.

The original function was becoming a bit hard to read, with the details
of creating and filling out load/store/atomic atomics all in one
function.

This patch makes helpers for creating each type of intrinsic, and also
combines them with the *_op() helpers, as they're closely coupled and
not too large.

v2: Minor style nits from Jason.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agonir: Drop bogus nir_var_shader_in case in nir_lower_io's store_op().
Kenneth Graunke [Tue, 12 Jul 2016 09:38:27 +0000 (02:38 -0700)]
nir: Drop bogus nir_var_shader_in case in nir_lower_io's store_op().

This can't happen, the caller asserts that mode is shader_out or shared.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agonir: Share destination rewriting and replacement code in IO lowering.
Kenneth Graunke [Tue, 12 Jul 2016 09:30:02 +0000 (02:30 -0700)]
nir: Share destination rewriting and replacement code in IO lowering.

Both loads and atomics had identical code to rewrite destinations,
and all cases had the same two lines to replace instructions.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agonir: Share get_io_offset handling in nir_lower_io.
Kenneth Graunke [Tue, 12 Jul 2016 09:16:30 +0000 (02:16 -0700)]
nir: Share get_io_offset handling in nir_lower_io.

The load/store/atomic cases all duplicated the get_io_offset code, with
a few tiny differences: stores didn't bother checking for per-vertex
inputs, because they can't be stored to, and atomics didn't check at
all, since shared variables aren't per-vertex.

However, it's harmless to check, and allows us to share more code.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agonir: Make a 'var' temporary in nir_lower_io.
Kenneth Graunke [Tue, 12 Jul 2016 08:51:04 +0000 (01:51 -0700)]
nir: Make a 'var' temporary in nir_lower_io.

Less typing and word wrapping issues than intrin->variables[0]->var.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoi965: Remove the emit_linterp() helper.
Kenneth Graunke [Tue, 12 Jul 2016 00:19:06 +0000 (17:19 -0700)]
i965: Remove the emit_linterp() helper.

Rather than computing the barycentric mode each time we emit a LINTERP,
we can simply compute it once, as soon as we know we're doing non-flat
interpolation.

At that point, emit_linterp() doesn't do much, so fold it into the
call sites and drop it.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoi965: Reduce the number of fs_reg(brw_reg) calls in LINTERP handling.
Kenneth Graunke [Tue, 12 Jul 2016 00:14:50 +0000 (17:14 -0700)]
i965: Reduce the number of fs_reg(brw_reg) calls in LINTERP handling.

A bit tidier.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoi965: Make a barycentric_mode() helper function.
Kenneth Graunke [Mon, 11 Jul 2016 22:00:37 +0000 (15:00 -0700)]
i965: Make a barycentric_mode() helper function.

This combines two copies of basically the same code.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
8 years agoi965: Rename brw_wm_barycentric_interp_mode to brw_barycentric_mode.
Kenneth Graunke [Mon, 11 Jul 2016 23:24:12 +0000 (16:24 -0700)]
i965: Rename brw_wm_barycentric_interp_mode to brw_barycentric_mode.

brw_wm_barycentric_interp_mode is wordy, brw_barycentric_mode is less
typing and suffers from fewer line wrapping problems.

The enum values themselves don't really benefit from "WM" in the name,
either.  Put "BARYCENTRIC" first instead of at the end and drop "WM".

Generated by:

for file in *.c *.cpp *.h; do sed -i \
   -e 's/brw_wm_barycentric_interp_mode/brw_barycentric_mode/g' \
   -e 's/BRW_WM_\([A-Z_]*\)_BARYCENTRIC/BRW_BARYCENTRIC_\1/g' \
   -e 's/BRW_WM_BARYCENTRIC_INTERP_MODE_COUNT/BRW_BARYCENTRIC_MODE_COUNT/g' \
   $file;
done

with a few whitespace changes.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoi965: Handle default interpolation modes and locations in NIR.
Kenneth Graunke [Thu, 7 Jul 2016 07:47:18 +0000 (00:47 -0700)]
i965: Handle default interpolation modes and locations in NIR.

This consolidates a bunch of hacks in a single place - by setting
the interpolation modes and locations on variables appropriately,
we can simply trust them in the rest of the code.  This avoids
having to handle INTERP_QUALIFIER_NONE, gl_Color overrides,
sample-shading overrides, and Gen4-5 centroid-overrides in a bunch
of places.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoi965/context: Remove some unnecessary vfuncs
Jason Ekstrand [Sat, 11 Jun 2016 03:59:21 +0000 (20:59 -0700)]
i965/context: Remove some unnecessary vfuncs

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
8 years agoi965: Get rid of gen6_surface_state.c
Jason Ekstrand [Fri, 10 Jun 2016 01:29:15 +0000 (18:29 -0700)]
i965: Get rid of gen6_surface_state.c

The only useful thing left was gen6_init_vtable_surface_functions which we
can easily put in brw_wm_surface_state.c.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
8 years agoi965: Use ISL for emitting buffer surface states
Jason Ekstrand [Fri, 10 Jun 2016 00:06:57 +0000 (17:06 -0700)]
i965: Use ISL for emitting buffer surface states

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
8 years agoi965/state: Account for the element size in emit_buffer_surface_state
Jason Ekstrand [Fri, 10 Jun 2016 04:12:22 +0000 (21:12 -0700)]
i965/state: Account for the element size in emit_buffer_surface_state

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agoi965/gen4-6: Use the generic ISL-based path for texture surfaces
Jason Ekstrand [Wed, 8 Jun 2016 23:08:24 +0000 (16:08 -0700)]
i965/gen4-6: Use the generic ISL-based path for texture surfaces

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
8 years agoi965/gen6: Use the generic ISL-based path for renderbuffer surfaces
Jason Ekstrand [Tue, 7 Jun 2016 18:45:13 +0000 (11:45 -0700)]
i965/gen6: Use the generic ISL-based path for renderbuffer surfaces

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
8 years agoi965/gen7: Use the generic ISL-based path for renderbuffer surfaces
Jason Ekstrand [Tue, 7 Jun 2016 03:36:11 +0000 (20:36 -0700)]
i965/gen7: Use the generic ISL-based path for renderbuffer surfaces

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
8 years agoi965/gen7: Use the generic ISL-based path for texture surfaces
Jason Ekstrand [Tue, 7 Jun 2016 03:35:04 +0000 (20:35 -0700)]
i965/gen7: Use the generic ISL-based path for texture surfaces

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
8 years agoi965/gen8: Use the generic ISL-based path for renderbuffer surfaces
Jason Ekstrand [Tue, 7 Jun 2016 03:32:35 +0000 (20:32 -0700)]
i965/gen8: Use the generic ISL-based path for renderbuffer surfaces

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
8 years agoi965/gen8: Use the generic ISL-based path for texture surfaces
Jason Ekstrand [Tue, 7 Jun 2016 03:31:38 +0000 (20:31 -0700)]
i965/gen8: Use the generic ISL-based path for texture surfaces

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
8 years agoi965/state: Add generic surface update functions based on ISL
Jason Ekstrand [Thu, 9 Jun 2016 23:15:05 +0000 (16:15 -0700)]
i965/state: Add generic surface update functions based on ISL

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
8 years agoi965/surface_state: Rename brw_update to gen4_update
Jason Ekstrand [Tue, 7 Jun 2016 02:55:06 +0000 (19:55 -0700)]
i965/surface_state: Rename brw_update to gen4_update

We're about to add generic versions which work across gens and those should
have the brw name.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
8 years agoi965/state: Use ISL for emitting image surfaces
Jason Ekstrand [Thu, 9 Jun 2016 18:45:44 +0000 (11:45 -0700)]
i965/state: Use ISL for emitting image surfaces

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Chad Versace <chad.versace@intel.com>
8 years agoi965/blorp: Use a generic ISL path for texture surfaces on gen8
Jason Ekstrand [Sat, 11 Jun 2016 02:10:51 +0000 (19:10 -0700)]
i965/blorp: Use a generic ISL path for texture surfaces on gen8

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agoi965/state: Add a helper for emitting a surface state using isl
Jason Ekstrand [Tue, 7 Jun 2016 03:25:21 +0000 (20:25 -0700)]
i965/state: Add a helper for emitting a surface state using isl

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
8 years agoi965/blorp: Use the generic ISL path for texture surfaces on gen6
Jason Ekstrand [Fri, 10 Jun 2016 22:27:37 +0000 (15:27 -0700)]
i965/blorp: Use the generic ISL path for texture surfaces on gen6

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
8 years agoi965/blorp: Use the generic ISL path for renderbuffer surfaces on gen6
Jason Ekstrand [Fri, 10 Jun 2016 21:00:50 +0000 (14:00 -0700)]
i965/blorp: Use the generic ISL path for renderbuffer surfaces on gen6

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
8 years agoi965/blorp: Use the generic ISL path for texture surfaces on gen7
Jason Ekstrand [Fri, 10 Jun 2016 20:46:36 +0000 (13:46 -0700)]
i965/blorp: Use the generic ISL path for texture surfaces on gen7

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
8 years agoi965/blorp: Use the generic ISL path for renderbuffer surfaces on gen7
Jason Ekstrand [Fri, 10 Jun 2016 19:12:31 +0000 (12:12 -0700)]
i965/blorp: Use the generic ISL path for renderbuffer surfaces on gen7

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
8 years agoi965/blorp: Use the generic ISL path for renderbuffer surfaces on gen8-9
Jason Ekstrand [Thu, 9 Jun 2016 19:45:54 +0000 (12:45 -0700)]
i965/blorp: Use the generic ISL path for renderbuffer surfaces on gen8-9

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
8 years agoi965/blorp: Add a generic ISL-based surface state emit path
Jason Ekstrand [Fri, 10 Jun 2016 19:03:18 +0000 (12:03 -0700)]
i965/blorp: Add a generic ISL-based surface state emit path

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
8 years agoi965/miptree: Add a helper for getting the aux isl_surf from a miptree
Jason Ekstrand [Fri, 3 Jun 2016 23:10:20 +0000 (16:10 -0700)]
i965/miptree: Add a helper for getting the aux isl_surf from a miptree

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
8 years agoi965/miptree: Add a helper for getting the ISL clear color from a miptree
Jason Ekstrand [Fri, 10 Jun 2016 18:36:00 +0000 (11:36 -0700)]
i965/miptree: Add a helper for getting the ISL clear color from a miptree

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
8 years agoi965/miptree: Add a helper for getting an isl_surf from a miptree
Jason Ekstrand [Fri, 3 Jun 2016 21:32:12 +0000 (14:32 -0700)]
i965/miptree: Add a helper for getting an isl_surf from a miptree

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
8 years agoi965: Add an isl_device to the brw_context
Jason Ekstrand [Wed, 22 Jun 2016 23:32:18 +0000 (16:32 -0700)]
i965: Add an isl_device to the brw_context

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Chad Versace <chad.versace@intel.com>
8 years agoisl/state: Add support for OffsetX/Y in surface state
Jason Ekstrand [Wed, 8 Jun 2016 23:43:35 +0000 (16:43 -0700)]
isl/state: Add support for OffsetX/Y in surface state

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Chad Versace <chad.versace@intel.com>
8 years agoisl: Add support for filling out surface states all the way back to gen4
Jason Ekstrand [Fri, 3 Jun 2016 01:32:11 +0000 (18:32 -0700)]
isl: Add support for filling out surface states all the way back to gen4

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Chad Versace <chad.versace@intel.com>
8 years agoisl: Add an ISL_DEV_IS_G4X macro
Jason Ekstrand [Wed, 8 Jun 2016 19:19:41 +0000 (12:19 -0700)]
isl: Add an ISL_DEV_IS_G4X macro

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Chad Versace <chad.versace@intel.com>
8 years agogenxml: Add macros and #includes for gens 4-6
Jason Ekstrand [Fri, 3 Jun 2016 01:31:47 +0000 (18:31 -0700)]
genxml: Add macros and #includes for gens 4-6

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Chad Versace <chad.versace@intel.com>
8 years agogenxml: Make X/Y Offset field of SURFACE_STATE a uint
Jason Ekstrand [Thu, 9 Jun 2016 01:59:29 +0000 (18:59 -0700)]
genxml: Make X/Y Offset field of SURFACE_STATE a uint

THe offset type has special implications that it's intended to be some form
of aligned memory address.  These assumptions allow it to handle the case
where there is some alignment requirement on the offset and the bottom bits
are used for other things.  However, the offsets in the surface state field
are really just unsigned integers.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Chad Versace <chad.versace@intel.com>
8 years agogenxml: Add enough XML for gens 4, 4.5, and 5 to get SURFACE_STATE
Jason Ekstrand [Wed, 8 Jun 2016 18:29:15 +0000 (11:29 -0700)]
genxml: Add enough XML for gens 4, 4.5, and 5 to get SURFACE_STATE

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Acked-by: Chad Versace <chad.versace@intel.com>
8 years agoisl/state: Divide the aux qpitch by 4
Jason Ekstrand [Wed, 13 Jul 2016 23:42:43 +0000 (16:42 -0700)]
isl/state: Divide the aux qpitch by 4

The field is in multiples of 4 like regular QPitch.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
8 years agoisl: Fix the bs assertion in isl_tiling_get_info
Jason Ekstrand [Wed, 13 Jul 2016 22:59:33 +0000 (15:59 -0700)]
isl: Fix the bs assertion in isl_tiling_get_info

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Chad Versace <chad.versace@intel.com>
8 years agoanv: Handle VK_WHOLE_SIZE properly for buffer views
Jason Ekstrand [Fri, 15 Jul 2016 04:11:14 +0000 (21:11 -0700)]
anv: Handle VK_WHOLE_SIZE properly for buffer views

The old calculation, which used view->offset, encorporated buffer->offset
into the size calculation where it doesn't belong.  This meant that, if
buffer->offset > buffer->size, you would always get a negative size.  This
fixes 170 dEQP-VK.renderpass.attachment.* Vulkan CTS tests on Haswell.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
8 years agoanv: Add an align_down_npot_u32 helper
Jason Ekstrand [Fri, 15 Jul 2016 18:50:20 +0000 (11:50 -0700)]
anv: Add an align_down_npot_u32 helper

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
8 years agoanv: Enable independentBlend on gen7
Jason Ekstrand [Fri, 15 Jul 2016 01:01:29 +0000 (18:01 -0700)]
anv: Enable independentBlend on gen7

We can totally do it, we were just only setting up one BLEND_STATE and, now
that the code is unified with gen8, we should be handling it correctly.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
8 years agoanv/pipeline: Unify blend state setup between gen7 and gen8
Jason Ekstrand [Fri, 15 Jul 2016 01:00:50 +0000 (18:00 -0700)]
anv/pipeline: Unify blend state setup between gen7 and gen8

This fixes all 674 broken dEQP-VK.pipeline.blend Vulkan CTS tests on
Haswell.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
8 years agogenxml: Make gen6-7 blending look more like gen8
Jason Ekstrand [Fri, 15 Jul 2016 00:52:07 +0000 (17:52 -0700)]
genxml: Make gen6-7 blending look more like gen8

This renames BLEND_STATE to BLEND_STATE_ENTRY and adds an new struct
BLEND_STATE which is just an array of 8 BLEND_STATE_ENTRYs.  This will make
it much easier to write gen-agnostic blend handling code.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
8 years agovc4: Speed up glGenerateMipmaps by avoiding shadow baselevel.
Eric Anholt [Fri, 15 Jul 2016 00:26:43 +0000 (17:26 -0700)]
vc4: Speed up glGenerateMipmaps by avoiding shadow baselevel.

To support general GL_TEXTURE_BASE_LEVEL we have to copy to a temporary
miptree.  However, if a single level is being selected, we can use the
existing miptree and force all the sampling to be from that particular
level.

This avoids a ton of software fallbacks in glGenerateMipmaps(), which uses
base levels in the blit implementation in gallium.  Improves "glmark2 -b
terrain" from 2 fps to 3 (perhaps some more precision would be useful?),
and cuts its CPU usage during the benchmarking from ~30% to ~10% (total
CPU time from 8.8s to 7.6s).

8 years agovc4: Drop VC4_DIRTY_TEXSTATE in favor of the per-stage flags.
Eric Anholt [Fri, 15 Jul 2016 00:38:43 +0000 (17:38 -0700)]
vc4: Drop VC4_DIRTY_TEXSTATE in favor of the per-stage flags.

The compiler uses the per-stage flags already, so it didn't need this.
vc4_uniforms was using it, so just replace it with both of the stage flags
for now.

8 years agovc4: Remove dead dirty_samplers field.
Eric Anholt [Fri, 15 Jul 2016 00:31:33 +0000 (17:31 -0700)]
vc4: Remove dead dirty_samplers field.

We use a big VC4_DIRTY_FRAGTEX/VC4_DIRTY_VERTEX on the stage, instead.

8 years agovc4: Turn on control flow support in the simulator environment.
Eric Anholt [Mon, 11 Jul 2016 18:29:28 +0000 (11:29 -0700)]
vc4: Turn on control flow support in the simulator environment.

We can't merge the non-simulator support until we merge the kernel side and
get a new libdrm release.

8 years agomesa: handle numLevels, numSamples in _mesa_test_proxy_teximage()
Brian Paul [Thu, 14 Jul 2016 21:50:18 +0000 (15:50 -0600)]
mesa: handle numLevels, numSamples in _mesa_test_proxy_teximage()

If numSamples > 0, we can compute the size of the whole mipmapped texture.
That's the case for glTexStorage(GL_PROXY_TEXTURE_x).

Also, multiply the texture size by numSamples for MSAA textures.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
8 years agomesa: add proxy texture targets in _mesa_next_mipmap_level_size()
Brian Paul [Thu, 14 Jul 2016 21:49:40 +0000 (15:49 -0600)]
mesa: add proxy texture targets in _mesa_next_mipmap_level_size()

So we can use it for computing size of proxy textures.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
8 years agomesa: add numLevels, numSamples to Driver.TestProxyTexImage()
Brian Paul [Thu, 14 Jul 2016 20:25:19 +0000 (14:25 -0600)]
mesa: add numLevels, numSamples to Driver.TestProxyTexImage()

So that the function can work properly with glTexStorage(), where we know
how many mipmap levels there are.  And so we can compute storage for MSAA
textures.

Also, remove the obsolete texture border parameter.

A subsequent patch will update _mesa_test_proxy_teximage() to use these
new parameters.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
8 years agomesa: use _mesa_clear_texture_image() in clear_texture_fields()
Brian Paul [Wed, 13 Jul 2016 19:52:31 +0000 (13:52 -0600)]
mesa: use _mesa_clear_texture_image() in clear_texture_fields()

This avoids a failed assert(img->_BaseFormat != -1) in
init_teximage_fields_ms() because the internalFormat argument is GL_NONE.
This was hit when using glTexStorage() to do a proxy texture test.

Fixes a failure with the updated Piglit tex3d-maxsize test.

Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
8 years agosvga: avoid ubinding render targets that have already been unbound
Charmaine Lee [Tue, 12 Jul 2016 00:11:41 +0000 (17:11 -0700)]
svga: avoid ubinding render targets that have already been unbound

Fixed the remaining redundant SetRenderTargets command emission.

Tested with lightsMark2008, Heaven, mtt piglit, glretrace, conform.

Reviewed-by: Brian Paul <brianp@vmware.com>
8 years agosvga: dump code for GenMips.
Neha Bhende [Tue, 12 Jul 2016 06:39:06 +0000 (23:39 -0700)]
svga: dump code for GenMips.

Reviewed-by: Brian Paul <brianp@vmware.com>
8 years agoDisable use of weak in threads_posix.h on Cygwin
Jon Turney [Thu, 9 Jun 2016 18:21:35 +0000 (18:21 +0000)]
Disable use of weak in threads_posix.h on Cygwin

Weak doesn't work the same on PE/COFF as on ELF, they are only weak
references.  Specifically, since nothing else pulls in the object which
contains pthread_mutexattr_init() (and coming from the C library, that is
the only thing that object contains), means that it ends up as 0

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
8 years agoconfigure: Don't require pthread-stubs on Cygwin
Jon Turney [Tue, 7 Jun 2016 14:22:31 +0000 (14:22 +0000)]
configure: Don't require pthread-stubs on Cygwin

Commit 1f4869a2 unconditionally requires pthread-stubs.  Unfortunately, the
cleverness that pthread-stubs is doesn't work with PE/COFF, and historically
Cygwin doesn't have a pthread-stubs.pc.

Don't require pthread-stubs on Cygwin.

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
8 years agoUse correct names for dlopen()ed files on Cygwin
Yaakov Selkowitz [Sat, 11 Jun 2016 14:53:50 +0000 (14:53 +0000)]
Use correct names for dlopen()ed files on Cygwin

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk>
8 years agoconfigure: Define _GNU_SOURCE for Cygwin as well
Yaakov Selkowitz [Tue, 7 Jun 2016 18:09:07 +0000 (18:09 +0000)]
configure: Define _GNU_SOURCE for Cygwin as well

Cygwin headers are now a bit more correct in handling feature test macros,
so use _GNU_SOURCE when building for Cygwin, as well.

(Notwithstanding f381c27c, we should probably have always been using
_GNU_SOURCE, since asprintf() is used by mesa in places)

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk>
8 years agoRevert "isl: Don't filter tiling flags if a specific tiling bit is set"
Nanley Chery [Fri, 24 Jun 2016 23:06:31 +0000 (16:06 -0700)]
Revert "isl: Don't filter tiling flags if a specific tiling bit is set"

This reverts commit 091f1da902c71ac8d3d27b325a118e2f683f1ae5 .

Although a user may specify a specfic tiling bit, ISL should still
prevent incompatible tiling/surface combinations.

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
8 years agoanv/blit2d: Copy with stencil sources when needed
Nanley Chery [Mon, 27 Jun 2016 22:24:36 +0000 (15:24 -0700)]
anv/blit2d: Copy with stencil sources when needed

In the next patch, ISL will unconditionally perform verification of a
surface's tiling and usage. Since it will require that w-tiled images
be stencil buffers, create a stencil surface to copy from a
w-tiled/stencil surface.

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoanv/image: Fix initialization of the ISL tiling
Nanley Chery [Fri, 24 Jun 2016 22:39:14 +0000 (15:39 -0700)]
anv/image: Fix initialization of the ISL tiling

If an internal user creates an image with Vulkan tiling VK_IMAGE_TILING_OPTIMAL
and an ISL tiling that isn't set, ISL will fail to create the image as
anv_image_create_info::isl_tiling_flags will be an invalid value.

Correct this by making anv_image_create_info::isl_tiling_flags an opt-in,
filtering bitmask, that allows the caller to specify which ISL tilings are
acceptable, but not contradictory to the Vulkan tiling.

Opt-out of filtering for vkCreateImage.

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoisl: Fix isl_tiling_is_any_y()
Nanley Chery [Fri, 24 Jun 2016 22:37:34 +0000 (15:37 -0700)]
isl: Fix isl_tiling_is_any_y()

Cc: 12.0 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoanv/device: Fix max buffer range limits
Nanley Chery [Wed, 6 Jul 2016 18:13:48 +0000 (11:13 -0700)]
anv/device: Fix max buffer range limits

Set limits that are consistent with ISL's assertions in
isl_genX(buffer_fill_state_s)() and Anvil's format-DescriptorType
mapping in anv_isl_format_for_descriptor_type().

Fixes the following new crucible tests:
* stress.limits.buffer-update.range.uniform
* stress.limits.buffer-update.range.storage

These tests are in this patch: https://patchwork.freedesktop.org/patch/98726/

Cc: 12.0 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoisl: Fix assert on raw buffer surface state size
Nanley Chery [Wed, 6 Jul 2016 18:13:15 +0000 (11:13 -0700)]
isl: Fix assert on raw buffer surface state size

See inline PRM reference.

Cc: 12.0 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoanv/cmd_buffer: Simplify range member assignment
Nanley Chery [Tue, 12 Jul 2016 15:10:18 +0000 (08:10 -0700)]
anv/cmd_buffer: Simplify range member assignment

A ternary is clearer because the range member is assigned one of two values
dependant on one condition.

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoanv/cmd_buffer: Remove unused variable
Nanley Chery [Mon, 11 Jul 2016 17:48:02 +0000 (10:48 -0700)]
anv/cmd_buffer: Remove unused variable

This became unused due to commit 612e35b2c65c99773b73e53d0e6fd112b1a7431f .

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoanv/descriptor_set: Fix binding partly undefined descriptor sets
Nanley Chery [Tue, 12 Jul 2016 00:33:24 +0000 (17:33 -0700)]
anv/descriptor_set: Fix binding partly undefined descriptor sets

Section 13.2.3. of the Vulkan spec requires that implementations be able to
bind sparsely-defined Descriptor Sets without any errors or exceptions.

When binding a descriptor set that contains a dynamic buffer binding/descriptor,
the driver attempts to dereference the descriptor's buffer_view field if it is
non-NULL. It currently segfaults on undefined descriptors as this field is never
zero-initialized. Zero undefined descriptors to avoid segfaulting. This
solution was suggested by Jason Ekstrand.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96850
Cc: 12.0 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agosvga: handle mismatched number of samplers, sampler views
Brian Paul [Fri, 15 Jul 2016 13:08:13 +0000 (07:08 -0600)]
svga: handle mismatched number of samplers, sampler views

in svga_init_shader_key_common().  Since the CSO module only tracks
sampler views for fragment shaders, the number of samplers and sampler
views can be mismatched for other types of shaders.  This situation
triggered an assertion in Chrome with maps.google.com

This patch adds defensive code to handle that situation.

Fixes VMware bug 1694027
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
8 years agost/omx/enc: check uninitialized list from task release
Leo Liu [Mon, 11 Jul 2016 19:27:16 +0000 (15:27 -0400)]
st/omx/enc: check uninitialized list from task release

The uninitialized list should be checked and returned.

Thank Julien for the notification and suggested fix.

Signed-off-by: Leo Liu <leo.liu@amd.com>
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
8 years agonv50/ir: add missing string for SV_WORK_DIM
Samuel Pitoiset [Tue, 12 Jul 2016 12:17:44 +0000 (14:17 +0200)]
nv50/ir: add missing string for SV_WORK_DIM

Fixes: 2aa1197 ("nouveau: Add support for SV_WORK_DIM")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
8 years agoRevert "radeon/llvm: Use alloca instructions for larger arrays"
Marek Olšák [Thu, 14 Jul 2016 20:07:46 +0000 (22:07 +0200)]
Revert "radeon/llvm: Use alloca instructions for larger arrays"

This reverts commit 513fccdfb68e6a71180e21827f071617c93fd09b.

Bioshock Infinite hangs with that.

8 years agor600,compute: Reserve vtx 3 for kernel arguments
Jan Vesely [Sun, 26 Jun 2016 02:06:09 +0000 (22:06 -0400)]
r600,compute: Reserve vtx 3 for kernel arguments

Using vtx 0 does not work for dynamic offsets.

v2: add explanatory comment

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>