Commit graph

28527 commits

Author SHA1 Message Date
Eric Engestrom
b0acebd41f st/nine: fix unreachable() typo
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2016-08-30 13:47:46 -07:00
Samuel Pitoiset
6820f75c91 nvc0: fix indentation in nvc0_screen_init()
Trivial.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2016-08-30 18:42:02 +02:00
Samuel Pitoiset
0fc3b7c88e nvc0: check return value of nvc0_screen_resize_tls_area()
While we are at it, make it static and change the return values
policy to be consistent.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2016-08-30 18:41:59 +02:00
Samuel Pitoiset
b489ac88f6 nvc0: make use of FAIL_SCREEN_INIT in nvc0_screen_create()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2016-08-30 18:41:57 +02:00
Samuel Pitoiset
e0a067ed48 nv50/ir: always emit the NDV bit for OP_QUADOP
This silences a divergent error found with F1 2015.

Basically, the NDV bit has to be set when a FSWZ instruction is
inside divergent code, but it's not needed otherwise. The correct
fix should be to set it only in divergent code situations.

GM107 emitter already sets that bit.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: <mesa-stable@lists.freedesktop.org>
2016-08-30 18:41:46 +02:00
Tim Rowley
175052507c swr: [rasterizer] add archrast instrumentation
Statistics measurement system
2016-08-30 10:32:36 -05:00
Ilia Mirkin
ab0917311f nvc0: undo overzealous enum usage
Commit 7413625ad3 flipped a few functions too many to use
pipe_shader_type. These functions actually take an integer that does not
correspond 1:1 with the enum.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2016-08-30 00:17:54 -04:00
Brian Paul
ec16a5b091 svga: fix a texture readback bug
Backing views/surfaces are used to handle the case when a resource is
bound both as a render target and as a sampler source (such as when
doing auto mipmap generation).

This patch fixes a bug where mapping a resource (to do a glReadPixels)
was reading the stale data in the original surface rather than the
backing surface which was rendered to.

We need to propagate the backing resource (which we rendered to) back
to the original resource before we read from it.  The problem was the
svga_propagate_rendertargets() function was examining the wrong surface
views.

This fixes the "poc9" test described in VMware bug 1686661.
Also tested with Piglit, Cinebench, Lightsmark, etc.

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
2016-08-29 17:46:50 -06:00
Brian Paul
646afc6ff7 svga: move surface propagation code into new function
Put new svga_propagate_rendertargets() function where all the other
surface propagation code lives.

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
2016-08-29 17:46:50 -06:00
Dave Airlie
f235dc08ac radeonsi: add support for cull distances. (v1.1)
This should be all that is required for cull distances to work
on radeonsi.

v1.1: whitespace cleanup, add docs fix clipdist_mask usage.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-08-30 09:35:56 +10:00
Jan Vesely
083746bc48 clover: Use device cap to query pointer size instead of hardcoded 32bits
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97513
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2016-08-29 14:40:15 -04:00
Jan Vesely
c7af84968d gallium: add cap to export device pointer size
v2: document the new cap
v3: fix 80 char limit in screen.rst

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
2016-08-29 14:40:15 -04:00
Brian Paul
f5602c27ec svga: s/unsigned/enum pipe_shader_type/
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
2016-08-29 12:40:45 -06:00
Rhys Kidd
b1b7e921f8 r600g: Clean up defined magic numbers for TGSI opcodes
Small code clean up that removes magic numbers where a TGSI
opcode has been defined.

No functional change expected as each opcode is unsupported on
the respective hardware.

Signed-off-by: Rhys Kidd <rhyskidd@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: James Harvey <lothmordor@gmail.com>
2016-08-29 11:03:20 -07:00
Rhys Kidd
d4cb3ee95c r600g: Avoid duplicated initialization of TGSI_OPCODE_DFMA
As reported by Clang, TGSI_OPCODE_DFMA (defined magic number 118) is
currently initialized twice for Cayman and Evergreen.

When Jan Vesely added double precision FMA opcode it did make sense
to locate it immediately after TGSI_OPCODE_DMAD, although this is
out of order.

This change cleans up the prior magic number definition and ensures
any later reordering of this struct will not create problems.

Prior change was:

  commit 015e2e0fce
  Author: Jan Vesely <jan.vesely@rutgers.edu>
  Date:   Sat Jul 2 16:14:54 2016 -0400

      r600g: Add double precision FMA ops

      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96782
      Fixes: 54c4d525da ("r600g: Enable FMA on chips that support it")

      Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
      Tested-by: James Harvey <lothmordor@gmail.com>
      Signed-off-by: Marek Olšák <marek.olsak@amd.com>

Signed-off-by: Rhys Kidd <rhyskidd@gmail.com>
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: James Harvey <lothmordor@gmail.com>
2016-08-29 11:03:20 -07:00
Rhys Kidd
8ba1fd339c i915g: Fix typo in i915_translate_instruction()
Noticed this error in a debug message whilst reviewing
https://bugs.freedesktop.org/show_bug.cgi?id=97477

This patch doesn't go towards fixing that bug, but at
least may clarify future debug output.

Signed-off-by: Rhys Kidd <rhyskidd@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2016-08-29 11:03:20 -07:00
Eric Anholt
60bed14d0f vc4: Handle discards while in control flow.
I missed this while adding loop support because the discard test inside a
loop was crashing before, anyway.  Fixes piglit glsl-fs-discard-04.
2016-08-29 11:03:11 -07:00
Eric Anholt
b9a74fbec7 vc4: Mark when we add discards while lowering blend state. 2016-08-29 10:57:04 -07:00
Tim Rowley
fa8f87132a swr: [rasterier core] fix GetRasterizerFunc selection
Only rasterize scissor edges if one or more scissor/viewport
rects are not hottile aligned.

Signed-off-by: Tim Rowley <timothy.o.rowley@intel.com>
2016-08-29 12:42:36 -05:00
Tim Rowley
8e41a65fc5 swr: [rasterizer core] whitespace cleanup
Signed-off-by: Tim Rowley <timothy.o.rowley@intel.com>
2016-08-29 12:42:30 -05:00
Tim Rowley
cc7f655177 swr: [rasterizer jitter] reimplement SCATTERPS
Implement SCATTERPS as a dynamic loop based on mask set bits
instead of a static compile time loop.

Signed-off-by: Tim Rowley <timothy.o.rowley@intel.com>
2016-08-29 12:42:23 -05:00
Tim Rowley
c7e21183a1 swr: [rasterizer core] upper left rule for scissors
Fixes upper left rule for scissors and viewport/scissor macrotile alignment.

Signed-off-by: Tim Rowley <timothy.o.rowley@intel.com>
2016-08-29 12:42:15 -05:00
Tim Rowley
e54df2c7e4 swr: [rasterizer scripts] undef DEFINE_KNOB after usage
Signed-off-by: Tim Rowley <timothy.o.rowley@intel.com>
2016-08-29 12:42:10 -05:00
Tim Rowley
a4efbd14d3 swr: [rasterizer core] minor cleanup to thread initialization
Signed-off-by: Tim Rowley <timothy.o.rowley@intel.com>
2016-08-29 12:42:04 -05:00
Tim Rowley
7472a8ee75 swr: [rasterizer core] remove KNOB_MAX_THREADS
Use dynamic memory allocation for per-thread data

Signed-off-by: Tim Rowley <timothy.o.rowley@intel.com>
2016-08-29 12:41:58 -05:00
Tim Rowley
9e4a482d46 swr: [rasterizer core] track guardbands per viewport rect
Signed-off-by: Tim Rowley <timothy.o.rowley@intel.com>
2016-08-29 12:41:51 -05:00
Tim Rowley
b473bec878 swr: [rasterizer core] per-primitive viewports/scissors
- use per-primitive viewports throughout the pipeline.
- track whether all available scissor rects are tile aligned.
  Causes failures, so not taken into account when choosing rasterizer yet.

Signed-off-by: Tim Rowley <timothy.o.rowley@intel.com>
2016-08-29 12:41:16 -05:00
Tom Stellard
63ed11cde9 radeonsi: Don't use global variables for tess lds
We were allocating global variables for the maximum LDS size
which made the compiler think we were using all of LDS, which
isn't the case.

Reviewed-By: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-08-29 16:36:46 +00:00
Roland Scheidegger
f48ccb8c07 softpipe: (trivial) honor render_condition_enabled for clear_rt/clear_ds 2016-08-29 18:15:08 +02:00
Roland Scheidegger
c5d7624e1d llvmpipe: (trivial) honor render_condition_enabled for clear_rt/clear_ds 2016-08-29 18:14:49 +02:00
Kai Wasserbäch
4c53267b8f gallium: Use enum pipe_shader_type in set_shader_images()
Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
2016-08-29 09:07:37 -06:00
Kai Wasserbäch
15fe288dea gallium: Use enum pipe_shader_type in set_shader_buffers()
Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
2016-08-29 09:07:33 -06:00
Kai Wasserbäch
532db3b788 gallium: Use enum pipe_shader_type in set_sampler_views()
Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
2016-08-29 09:07:25 -06:00
Kai Wasserbäch
7413625ad3 gallium: Use enum pipe_shader_type in bind_sampler_states() (v2)
v1 → v2:
 - Fixed indentation (noted by Brian Paul)
 - Removed second assert from nouveau's switch statements (suggested by
   Brian Paul)

Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2016-08-29 08:45:48 -06:00
Marek Olšák
ed24d79ed7 gallium/radeon: clear dirty_level_mask when discarding CMASK
This fixes: GL45-CTS.texture_barrier.*

Tested-by: Michel Dänzer <michel.daenzer@amd.com>
2016-08-29 14:23:58 +02:00
Marek Olšák
d301efb400 tgsi/scan: remember sampler view types
Reviewed-by: Brian Paul <brianp@vmware.com>
2016-08-29 14:16:57 +02:00
Nayan Deshmukh
5f0ea3db16 st/vdpau: use temporary buffers while applying filters
Use temporary buffers so that we don't read and write to the
same surface at the same time. We don't need to use linear
layout now.

v2: rebase the patch against reverted change

Signed-off-by: Nayan Deshmukh <nayan26deshmukh@gmail.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
2016-08-29 11:23:56 +02:00
Christian König
77e4424106 st/vdpau: Revert "change the order in which filters are applied(v3)"
This reverts commit 09dff7ae2e.

Turned out this can cause some artifacts in the output. Let's revert
it for now until we have sorted out all issues.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Nayan Deshmukh <nayan26deshmukh@gmail.com>
2016-08-29 11:23:51 +02:00
Brian Paul
ea33df7b58 svga: minor whitespace, etc clean-ups in svga_pipe_misc.c
Reviewed-by: Neha Bhende <bhenden@vmware.com>
2016-08-26 14:20:19 -06:00
Brian Paul
8433b43337 svga: move some code in svga_propagate_surface()
Move computation of zslice, layer inside the conditional where they're
used.

Reviewed-by: Neha Bhende <bhenden@vmware.com>
2016-08-26 14:20:19 -06:00
Brian Paul
1a10b37ac3 svga: simplify surface propagation code in svga_set_framebuffer_state()
Rewrite the comment too.

Reviewed-by: Neha Bhende <bhenden@vmware.com>
2016-08-26 14:20:19 -06:00
Brian Paul
bb7f094b37 svga: add some comments in the svga_surface struct
Give more info about backing resources/surfaces.

Reviewed-by: Neha Bhende <bhenden@vmware.com>
2016-08-26 14:20:19 -06:00
Brian Paul
dcf63339e7 svga: use new svga_check_sampler_framebuffer_resource_collision()
Reviewed-by: Neha Bhende <bhenden@vmware.com>
2016-08-26 14:20:19 -06:00
Brian Paul
ff500ed5a1 svga: add new svga_check_sampler_framebuffer_resource_collision()
Reviewed-by: Neha Bhende <bhenden@vmware.com>
2016-08-26 14:20:19 -06:00
Brian Paul
d3d20d650d svga: remove assertions in svga_surface cast wrappers
We don't do this for other cast wrappers.  And this will simplify some
code at call sites.

Reviewed-by: Neha Bhende <bhenden@vmware.com>
2016-08-26 14:20:19 -06:00
Brian Paul
c6e89fa215 svga: minor code simplification in svga_texture_transfer_unmap()
Use the tex variable instead of using svga_texture() again.

Reviewed-by: Neha Bhende <bhenden@vmware.com>
2016-08-26 14:20:19 -06:00
Brian Paul
fe5a2704ec svga: reformat some expressions in svga_texture_transfer_map()
Reviewed-by: Neha Bhende <bhenden@vmware.com>
2016-08-26 14:20:19 -06:00
Brian Paul
10ef6ddcf9 svga: remove duplicated variable in svga_texture_transfer_map()
tex was already declared at the function body scope.

Reviewed-by: Neha Bhende <bhenden@vmware.com>
2016-08-26 14:20:19 -06:00
Brian Paul
09d2780b39 svga: move some assignments in svga_texture_transfer_map()
Put near other assignments to the svga_transfer variable.

Reviewed-by: Neha Bhende <bhenden@vmware.com>
2016-08-26 14:20:18 -06:00
Brian Paul
4a52512666 svga: minor simplifications in svga_texture_transfer_map()
Use local vars instead of jumping through a pointer.

Reviewed-by: Neha Bhende <bhenden@vmware.com>
2016-08-26 14:20:18 -06:00