mesa.git
7 years agomesa: simplify _mesa_IsVertexArray()
Samuel Pitoiset [Tue, 20 Jun 2017 13:13:15 +0000 (15:13 +0200)]
mesa: simplify _mesa_IsVertexArray()

_mesa_lookup_vao() already returns NULL if id is zero.

v2: - change the conditional (Ian)

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> (v1)
7 years agomesa/format_info: use designated initialiser list
Eric Engestrom [Mon, 19 Jun 2017 10:33:51 +0000 (11:33 +0100)]
mesa/format_info: use designated initialiser list

Also, make that table const, since no-one is supposed to modify it anyway.

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
7 years agovc4: Clean up release build warnings using MAYBE_UNUSED.
Eric Anholt [Mon, 6 Feb 2017 22:48:45 +0000 (14:48 -0800)]
vc4: Clean up release build warnings using MAYBE_UNUSED.

These variables are all used in an assert(), so release builds see no
usages.

7 years agovc4: Allow VBOs to be mapped during execution.
Eric Anholt [Mon, 19 Jun 2017 18:53:44 +0000 (11:53 -0700)]
vc4: Allow VBOs to be mapped during execution.

There's no reason we can't -- the mappings we expose are basically
equivalent to persistent/coherent, already.

Improves mesa-demos drawoverhead (no state change) performance by
5.21362% +/- 1.25078% (n=11).

7 years agogallium/vbuf: avoid segfault when we get invalid glDrawRangeElements()
Brian Paul [Mon, 19 Jun 2017 18:22:09 +0000 (12:22 -0600)]
gallium/vbuf: avoid segfault when we get invalid glDrawRangeElements()

A common user error is to call glDrawRangeElements() with the 'end'
argument being one too large.  If we use the vbuf module to translate
some vertex attributes this error can cause us to read past the end of
the mapped hardware buffer, resulting in a crash.

This patch adjusts the vertex count to avoid that issue.  Typically,
the vertex_count gets decremented by one.

This fixes crashes with the Unigine Tropics and Sanctuary demos with older
VMware hardware versions.  The issue isn't hit with VGPU10 because we
don't hit this fallback.

No piglit changes.

CC: mesa-stable@lists.freedesktop.org
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agogallium/vbuf: add some const qualifiers
Brian Paul [Mon, 19 Jun 2017 18:21:17 +0000 (12:21 -0600)]
gallium/vbuf: add some const qualifiers

Helps understandability a bit.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agotranslate: whitespace fixes in translate_generic.c
Brian Paul [Mon, 19 Jun 2017 18:17:51 +0000 (12:17 -0600)]
translate: whitespace fixes in translate_generic.c

7 years agosoftpipe: remove unused softpipe_context::line_stipple_counter
Brian Paul [Mon, 19 Jun 2017 18:15:40 +0000 (12:15 -0600)]
softpipe: remove unused softpipe_context::line_stipple_counter

Trivial.

7 years agoradeonsi: set correct usage flag according to image access type
Samuel Pitoiset [Tue, 20 Jun 2017 08:24:18 +0000 (10:24 +0200)]
radeonsi: set correct usage flag according to image access type

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agowinsys/amdgpu: fix a deadlock when waiting for submission_in_progress
Marek Olšák [Mon, 19 Jun 2017 17:39:05 +0000 (19:39 +0200)]
winsys/amdgpu: fix a deadlock when waiting for submission_in_progress

First this happens:

1) amdgpu_cs_flush (lock bo_fence_lock)
   -> amdgpu_add_fence_dependency
   -> os_wait_until_zero (wait for submission_in_progress) - WAITING

2) amdgpu_bo_create
   -> pb_cache_reclaim_buffer (lock pb_cache::mutex)
   -> pb_cache_is_buffer_compat
   -> amdgpu_bo_wait (lock bo_fence_lock) - WAITING

So both bo_fence_lock and pb_cache::mutex are held. amdgpu_bo_create can't
continue. amdgpu_cs_flush is waiting for the CS ioctl to finish the job,
but the CS ioctl is trying to release a buffer:

3) amdgpu_cs_submit_ib (CS thread - job entrypoint)
   -> amdgpu_cs_context_cleanup
   -> pb_reference
   -> pb_destroy
   -> amdgpu_bo_destroy_or_cache
   -> pb_cache_add_buffer (lock pb_cache::mutex) - DEADLOCK

The simple solution is not to wait for submission_in_progress, which we
need in order to create the list of dependencies for the CS ioctl. Instead
of building the list of dependencies as a direct input to the CS ioctl,
build the list of dependencies as a list of fences, and make the final list
of dependencies in the CS thread itself.

Therefore, amdgpu_cs_flush doesn't have to wait and can continue.
Then, amdgpu_bo_create can continue and return. And then amdgpu_cs_submit_ib
can continue.

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

Cc: 17.1 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoradeonsi: update all resident texture descriptors when needed
Samuel Pitoiset [Mon, 19 Jun 2017 15:40:19 +0000 (17:40 +0200)]
radeonsi: update all resident texture descriptors when needed

To avoid useless DCC fetches when DCC is disabled, descriptors
have to be updated in order to reflect this change. This is
quite similar to how we update descriptors of bound textures.

As a side effect, this should also prevent VM faults when
bindless textures are invalidated, because the VA in the
descriptor has to be updated accordingly as well.

I don't see any performance improvements with DOW3.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoradeonsi: keep track of the sampler state for texture handles
Samuel Pitoiset [Mon, 19 Jun 2017 15:34:45 +0000 (17:34 +0200)]
radeonsi: keep track of the sampler state for texture handles

Needed for updating all resident texture descriptors when
dirty_tex_counter changes.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoi965: perf: use gen_device_info rather then brw_context
Lionel Landwerlin [Mon, 24 Apr 2017 02:12:00 +0000 (19:12 -0700)]
i965: perf: use gen_device_info rather then brw_context

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
7 years agointel: common: add number of thread per eu
Lionel Landwerlin [Thu, 15 Jun 2017 22:48:49 +0000 (23:48 +0100)]
intel: common: add number of thread per eu

This will be used by to normalize OA counters.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
7 years agointel: common: express timestamps units in frequency
Lionel Landwerlin [Thu, 15 Jun 2017 14:22:19 +0000 (15:22 +0100)]
intel: common: express timestamps units in frequency

Rather than storing the period as a double that looses some precision.

Also fixes the Gen9LP timestamp frequency which is no 19200123 but
19200000 as pointed by Ville :

https://lists.freedesktop.org/archives/intel-gfx/2017-April/125126.html

Finally add the Cannonlake timestamp frequency.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
7 years agoi965: convert MI_REPORT_PERF_COUNT to genxml
Lionel Landwerlin [Thu, 15 Jun 2017 13:47:12 +0000 (14:47 +0100)]
i965: convert MI_REPORT_PERF_COUNT to genxml

Also make it available from gen7 only to gen7+.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
7 years agoi965: perf: fix codegen with single operand equation
Lionel Landwerlin [Fri, 14 Apr 2017 07:07:47 +0000 (00:07 -0700)]
i965: perf: fix codegen with single operand equation

We did support single value operand equations, but not single variable
operand ones. In particular we were failing on "$Sampler0Bottleneck".

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
7 years agointel: common: add flag to identify platforms by name
Lionel Landwerlin [Mon, 5 Jun 2017 10:06:28 +0000 (11:06 +0100)]
intel: common: add flag to identify platforms by name

The perf infrastructure needs to identify specific platforms, not just
generations.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
7 years agoi965/wm: Use stored hiz surface instead of creating copy
Topi Pohjolainen [Wed, 11 Jan 2017 14:15:21 +0000 (16:15 +0200)]
i965/wm: Use stored hiz surface instead of creating copy

Now the last user of intel_miptree_get_aux_isl_surf() is gone.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
7 years agoi965/blorp: Use hiz surface instead of creating copy
Topi Pohjolainen [Thu, 12 Jan 2017 08:02:58 +0000 (10:02 +0200)]
i965/blorp: Use hiz surface instead of creating copy

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
7 years agoi965/miptree/gen7+: Use isl for hiz layouts
Topi Pohjolainen [Thu, 22 Dec 2016 15:22:39 +0000 (17:22 +0200)]
i965/miptree/gen7+: Use isl for hiz layouts

v2: Use better assert by checking isl_surf_get_hiz_surf()

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
7 years agoi965/miptree: Drop BO_ALLOC_FOR_RENDER in intel_miptree_alloc_mcs()
Topi Pohjolainen [Sun, 15 Jan 2017 09:35:55 +0000 (11:35 +0200)]
i965/miptree: Drop BO_ALLOC_FOR_RENDER in intel_miptree_alloc_mcs()

because buffers get unconditionally initialised by cpu writing.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
7 years agoi965/miptree: Use isl for mcs layouts
Topi Pohjolainen [Sat, 14 Jan 2017 11:04:44 +0000 (13:04 +0200)]
i965/miptree: Use isl for mcs layouts

and pass the ccs isl surface to blorp instead of creating a
copy.

v2 (Jason): Explain ccs change and use better assert checking
            isl_surf_get_mcs_surf()

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
7 years agoi965/miptree: Refactor aux surface allocation
Topi Pohjolainen [Thu, 22 Dec 2016 09:43:54 +0000 (11:43 +0200)]
i965/miptree: Refactor aux surface allocation

v2 (Jason): Drop unused argument in intel_alloc_aux_buffer() and
            move assignment of "buf->surf" in intel_alloc_aux_buffer()
            into this patch.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
7 years agoi965/gen6: Use isl for hiz
Topi Pohjolainen [Mon, 2 Jan 2017 13:41:36 +0000 (15:41 +0200)]
i965/gen6: Use isl for hiz

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
7 years agoi965/miptree: Refactor isl aux usage resolver
Topi Pohjolainen [Wed, 11 Jan 2017 13:35:29 +0000 (15:35 +0200)]
i965/miptree: Refactor isl aux usage resolver

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
7 years agoi965/gen6: Use isl for stencil surfaces
Topi Pohjolainen [Sat, 13 May 2017 06:32:02 +0000 (09:32 +0300)]
i965/gen6: Use isl for stencil surfaces

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
7 years agoi965/miptree: Prepare range getter for isl based
Topi Pohjolainen [Tue, 13 Jun 2017 09:30:26 +0000 (12:30 +0300)]
i965/miptree: Prepare range getter for isl based

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
7 years agoi965/miptree: Prepare stencil mapping for isl based
Topi Pohjolainen [Sun, 14 May 2017 16:14:19 +0000 (19:14 +0300)]
i965/miptree: Prepare stencil mapping for isl based

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
7 years agoi965/blorp: Prepare for isl based miptrees
Topi Pohjolainen [Sat, 22 Apr 2017 06:37:10 +0000 (09:37 +0300)]
i965/blorp: Prepare for isl based miptrees

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
7 years agoi965: Add isl based miptree creator
Topi Pohjolainen [Tue, 25 Apr 2017 14:31:51 +0000 (17:31 +0300)]
i965: Add isl based miptree creator

v2: Use new brw_bo_alloc_tiled() interface

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
7 years agoi965/miptree: Add option to resolve offsets using isl_surf
Topi Pohjolainen [Fri, 12 May 2017 06:38:10 +0000 (09:38 +0300)]
i965/miptree: Add option to resolve offsets using isl_surf

v2 (Nanley): Add comment telling why "level -= mt->first_level"

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
7 years agoi965: Prepare slice copy for isl based miptrees
Topi Pohjolainen [Mon, 1 May 2017 05:43:19 +0000 (08:43 +0300)]
i965: Prepare slice copy for isl based miptrees

v2 (Jason): Fix a helper variable only used for assert -
            open code instead.

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
7 years agoi965/tex: Prepare image update for isl based miptrees
Topi Pohjolainen [Sun, 30 Apr 2017 09:55:46 +0000 (12:55 +0300)]
i965/tex: Prepare image update for isl based miptrees

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
7 years agoi965: Prepare framebuffer validator for isl based miptrees
Topi Pohjolainen [Tue, 25 Apr 2017 10:11:07 +0000 (13:11 +0300)]
i965: Prepare framebuffer validator for isl based miptrees

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
7 years agoi965: Prepare slice validator for isl based miptrees
Topi Pohjolainen [Tue, 25 Apr 2017 10:10:34 +0000 (13:10 +0300)]
i965: Prepare slice validator for isl based miptrees

v2 (Nanley): Minify depth in case of 3D surface. Also moved to
             .c file to get minify() without additional
             header inclusions

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
7 years agoi965: Prepare image validation for isl based miptrees
Topi Pohjolainen [Tue, 25 Apr 2017 06:56:33 +0000 (09:56 +0300)]
i965: Prepare image validation for isl based miptrees

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
7 years agoi965: Prepare up/downsampling for isl based miptrees
Topi Pohjolainen [Mon, 24 Apr 2017 15:10:26 +0000 (18:10 +0300)]
i965: Prepare up/downsampling for isl based miptrees

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
7 years agoi965/miptree: Add isl surface
Topi Pohjolainen [Thu, 11 May 2017 15:27:45 +0000 (18:27 +0300)]
i965/miptree: Add isl surface

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
7 years agoi965: Add helper for converting isl tiling to bufmgr tiling
Topi Pohjolainen [Fri, 12 May 2017 11:36:46 +0000 (14:36 +0300)]
i965: Add helper for converting isl tiling to bufmgr tiling

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
7 years agoi965/miptree: Refactor mapping table alloc
Topi Pohjolainen [Fri, 12 May 2017 07:26:29 +0000 (10:26 +0300)]
i965/miptree: Refactor mapping table alloc

v2 (Nanley): Use minify() instead of direct shift

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
7 years agoi965/gen6: Declare minify(depth, level) layers for 3D stencil
Topi Pohjolainen [Thu, 15 Jun 2017 14:37:34 +0000 (17:37 +0300)]
i965/gen6: Declare minify(depth, level) layers for 3D stencil

Keeps following patch refactoring the table allocation
non-functional.

Suggested-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
7 years agoi965/gen4: Add support for single layer in alignment workaround
Topi Pohjolainen [Thu, 8 Jun 2017 08:24:51 +0000 (11:24 +0300)]
i965/gen4: Add support for single layer in alignment workaround

On gen < 6 one doesn't have level or layer specifiers available
for render and depth targets. In order to support rendering to
specific level/layer, driver needs to manually offset the surface
to the desired slice.
There are, however, alignment restrictions to respect as well and
in come cases the only option is to use temporary single slice
surface which driver copies after rendering to the full miptree.

Current alignment workaround introduces new texture images which
are added to the parent texture object. Texture validation later
on copies the additional levels back to the surface that contains
the full mipmap.
This only works for non-arrayed surfaces and driver currently
creates new arrayed images in vain - individual layers within the
newly created are still unaligned the same as before.

This patch drops this mechanism and instead attaches single
temporary slice into the render buffer. This gets immediately
copied back to the mipmapped and/or arrayed surface just after
the render is done.

Sitting on top of earlier series cleaning up the depth buffer
state, this patch additionally fixes the following piglit tests:

    arb_framebuffer_object.fbo-generatemipmap-cubemap.g965m64
    arb_texture_cube_map.copyteximage cube.g965m64
    arb_texture_cube_map.copyteximage cube.ilkm64
    arb_pixel_buffer_object.texsubimage array pbo.g965m64
    ext_framebuffer_object.fbo-cubemap.g965m64
    ext_texture_array.copyteximage 1d_array.g45m64
    ext_texture_array.copyteximage 1d_array.g965m64
    ext_texture_array.copyteximage 1d_array.ilkm64
    ext_texture_array.copyteximage 2d_array.g45m64
    ext_texture_array.copyteximage 2d_array.g965m64
    ext_texture_array.copyteximage 2d_array.ilkm64
    ext_texture_array.fbo-array.g965m64
    ext_texture_array.fbo-generatemipmap-array.g965m64
    ext_texture_array.gen-mipmap.g965m64

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
7 years agoi965/miptree: Separate src and dst slice specifiers in slice copy
Topi Pohjolainen [Thu, 8 Jun 2017 08:41:14 +0000 (11:41 +0300)]
i965/miptree: Separate src and dst slice specifiers in slice copy

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
7 years agoi965/miptree: Clarify face/level/layer in slice copy
Topi Pohjolainen [Thu, 8 Jun 2017 09:31:18 +0000 (12:31 +0300)]
i965/miptree: Clarify face/level/layer in slice copy

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
7 years agoanv: Fix L3 cache programming on Bay Trail
Jonas Kulla [Mon, 19 Jun 2017 17:46:23 +0000 (19:46 +0200)]
anv: Fix L3 cache programming on Bay Trail

Valid values for URBAllocation start at 32, so substract that
before programming the register.

This was missed when porting from the GL driver.

Cc: "17.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agoradeonsi: fix dumping shader descriptors into ddebug logs
Marek Olšák [Fri, 16 Jun 2017 16:13:14 +0000 (18:13 +0200)]
radeonsi: fix dumping shader descriptors into ddebug logs

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoradeonsi: add a workaround for inexact SNORM8 blitting again
Marek Olšák [Fri, 16 Jun 2017 22:44:05 +0000 (00:44 +0200)]
radeonsi: add a workaround for inexact SNORM8 blitting again

GFX9 is affected.

We only have tests for GL_x_SNORM where x is R8, RG8, RGB8, and RGBA8.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoradeonsi/gfx9: fix TC-compatible stencil compression
Marek Olšák [Fri, 16 Jun 2017 20:54:26 +0000 (22:54 +0200)]
radeonsi/gfx9: fix TC-compatible stencil compression

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoradeonsi/gfx9: fix TXF_LZ with 1D textures
Marek Olšák [Fri, 16 Jun 2017 20:33:22 +0000 (22:33 +0200)]
radeonsi/gfx9: fix TXF_LZ with 1D textures

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoradeonsi/gfx9: disable sparse buffers
Marek Olšák [Fri, 16 Jun 2017 19:07:49 +0000 (21:07 +0200)]
radeonsi/gfx9: disable sparse buffers

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoac/sid.h: don't use parentheses in PKT3_RELEASE_MEM definition
Marek Olšák [Thu, 15 Jun 2017 22:11:50 +0000 (00:11 +0200)]
ac/sid.h: don't use parentheses in PKT3_RELEASE_MEM definition

The parses skips the line if it contains parentheses.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoac: parse EVENT_WRITE_EOP, RELEASE_MEM, WAIT_REG_MEM, NOWHERE
Marek Olšák [Thu, 15 Jun 2017 17:01:56 +0000 (19:01 +0200)]
ac: parse EVENT_WRITE_EOP, RELEASE_MEM, WAIT_REG_MEM, NOWHERE

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agost/mesa: simplify returning GL_VENDOR
Marek Olšák [Wed, 7 Jun 2017 20:04:34 +0000 (22:04 +0200)]
st/mesa: simplify returning GL_VENDOR

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agost/mesa: remove the "Gallium 0.4 on" prefix from GL_RENDERER
Marek Olšák [Wed, 7 Jun 2017 20:00:48 +0000 (22:00 +0200)]
st/mesa: remove the "Gallium 0.4 on" prefix from GL_RENDERER

If you want to keep it for your driver, please raise your hand.
The prefix will probably have to be added into the driver instead of here.

I cringe when I look at my long renderer string:
  Gallium 0.4 on AMD Radeon R9 Fury Series (DRM 3.17.0 / 4.11.0-staging-01277-gab25a9e, LLVM 5.0.0)

I'm sincerely sorry for all apps that detect Mesa by expecting "Gallium"
in the string.

Reviewed-by: Eric Anholt <eric@anholt.net>
7 years agost/mesa: don't update MSAA states for GL_FRAMEBUFFER_SRGB
Marek Olšák [Fri, 9 Jun 2017 18:55:01 +0000 (20:55 +0200)]
st/mesa: don't update MSAA states for GL_FRAMEBUFFER_SRGB

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoi965: Ignore anisotropic filtering in nearest mode.
Kenneth Graunke [Mon, 2 May 2016 02:09:14 +0000 (19:09 -0700)]
i965: Ignore anisotropic filtering in nearest mode.

This fixes both Europa Universalis IV and Stellaris rendering on i965.
This was tested on SKL.

This fix was discovered by Jakub Szuppe at Stream HPC
(https://streamhpc.com/).

bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96958
bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95530
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Tested-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Cc: 17.1 <mesa-stable@lists.freedesktop.org>
7 years agoglsl: gl_Max{Vertex,Fragment}UniformComponents exist in all desktop GL versions
Iago Toral Quiroga [Fri, 16 Jun 2017 10:05:20 +0000 (12:05 +0200)]
glsl: gl_Max{Vertex,Fragment}UniformComponents exist in all desktop GL versions

The current implementation assumed that these were replaced in GLSL >= 4.10
by gl_Max{Vertex,Fragment}UniformVectors, however this is not true: both
built-ins should be produced from GLSL 4.10 onwards.

This was raised by new CTS tests that are in development.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agodocs: update calendar, add news item and link release notes for 17.1.3
Emil Velikov [Mon, 19 Jun 2017 11:23:07 +0000 (12:23 +0100)]
docs: update calendar, add news item and link release notes for 17.1.3

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
7 years agodocs: add sha256 checksums for 17.1.3
Emil Velikov [Mon, 19 Jun 2017 11:20:12 +0000 (12:20 +0100)]
docs: add sha256 checksums for 17.1.3

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
7 years agodocs: add release notes for 17.1.3
Emil Velikov [Mon, 19 Jun 2017 11:13:25 +0000 (12:13 +0100)]
docs: add release notes for 17.1.3

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
7 years agost/glsl_to_tgsi: use correct writemask when converting generic intrinsics
Nicolai Hähnle [Mon, 12 Jun 2017 08:53:07 +0000 (10:53 +0200)]
st/glsl_to_tgsi: use correct writemask when converting generic intrinsics

This fixes a bug when lowering ballotARB: previously, using writemask 0xf,
emit_asm would create TGSI_OPCODE_BALLOT instructions that span two registers
to cover 4 64-bit channels. This could trample over other a neighbouring
temporary.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101360
Cc: 17.1 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agogallium/radeon/gfx9: fix PBO texture uploads to compressed textures
Nicolai Hähnle [Tue, 6 Jun 2017 17:21:26 +0000 (19:21 +0200)]
gallium/radeon/gfx9: fix PBO texture uploads to compressed textures

st/mesa creates a surface that reinterprets the compressed blocks as
RGBA16UI or RGBA32UI. We have to adjust width0 & height0 accordingly to
avoid out-of-bounds memory accesses by CB.

Cc: 17.1 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agor600: fix off-by-one in egd_tables.py
Nicolai Hähnle [Mon, 12 Jun 2017 19:31:43 +0000 (21:31 +0200)]
r600: fix off-by-one in egd_tables.py

Port of the corresponding fix in sid_tables.py.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoamd/common: fix off-by-one in sid_tables.py
Nicolai Hähnle [Tue, 6 Jun 2017 17:17:49 +0000 (19:17 +0200)]
amd/common: fix off-by-one in sid_tables.py

The very last entry in the sid_strings_offsets table ended up missing,
leading to out-of-bounds reads and potential crashes.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoi965: update MaxTextureRectSize to match PRMs and comply with OpenGL 4.1+
Iago Toral Quiroga [Fri, 16 Jun 2017 07:27:43 +0000 (09:27 +0200)]
i965: update MaxTextureRectSize to match PRMs and comply with OpenGL 4.1+

We were exposing 4096, but we can do up to 8192 in Gen4-6 and up to
16384 in gen7+. OpenGL 4.1+ requires at least 16384.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
7 years agomesa: add KHR_no_error support for gl*UniformHandleui64*ARB
Samuel Pitoiset [Wed, 14 Jun 2017 09:27:44 +0000 (11:27 +0200)]
mesa: add KHR_no_error support for gl*UniformHandleui64*ARB

Similar to _mesa_uniform() except that we have to call
validate_uniform_parameters() instead of validate_uniform().

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
7 years agomesa: add KHR_no_error support for glGetImageHandleARB()
Samuel Pitoiset [Wed, 14 Jun 2017 09:27:43 +0000 (11:27 +0200)]
mesa: add KHR_no_error support for glGetImageHandleARB()

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
7 years agomesa: add KHR_no_error support for glGetTexture*HandleARB()
Samuel Pitoiset [Wed, 14 Jun 2017 09:27:42 +0000 (11:27 +0200)]
mesa: add KHR_no_error support for glGetTexture*HandleARB()

It would be nice to have a no_error path for
_mesa_test_texobj_completeness() because this function doesn't
only test if the texture is complete.

Anyway, that seems enough for now and a bunch of checks are
skipped with this patch.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
7 years agomesa: add KHR_no_error support for glMake{Image,Texture}Handle*ResidentARB()
Samuel Pitoiset [Wed, 14 Jun 2017 09:27:41 +0000 (11:27 +0200)]
mesa: add KHR_no_error support for glMake{Image,Texture}Handle*ResidentARB()

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
7 years agomesa: add KHR_no_error support for glIs{Image,Texture}HandleResidentARB()
Samuel Pitoiset [Wed, 14 Jun 2017 09:27:40 +0000 (11:27 +0200)]
mesa: add KHR_no_error support for glIs{Image,Texture}HandleResidentARB()

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
7 years agoradeonsi: reduce overhead for resident textures which need color decompression
Samuel Pitoiset [Wed, 14 Jun 2017 11:55:12 +0000 (13:55 +0200)]
radeonsi: reduce overhead for resident textures which need color decompression

This is done by introducing a separate list.

si_decompress_textures() is now 5x faster.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoradeonsi: reduce overhead for resident textures which need depth decompression
Samuel Pitoiset [Wed, 14 Jun 2017 11:55:11 +0000 (13:55 +0200)]
radeonsi: reduce overhead for resident textures which need depth decompression

This is done by introducing a separate list.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoradeonsi: use util_dynarray_foreach for bindless resources
Samuel Pitoiset [Wed, 14 Jun 2017 11:55:10 +0000 (13:55 +0200)]
radeonsi: use util_dynarray_foreach for bindless resources

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agomesa/util: add util_dynarray_clear() helper
Samuel Pitoiset [Wed, 14 Jun 2017 11:55:09 +0000 (13:55 +0200)]
mesa/util: add util_dynarray_clear() helper

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agogallium/radeon: add a new HUD query for the number of resident handles
Samuel Pitoiset [Wed, 14 Jun 2017 09:40:59 +0000 (11:40 +0200)]
gallium/radeon: add a new HUD query for the number of resident handles

Useful for debugging performance issues when ARB_bindless_texture
is enabled. This query doesn't make a distinction between texture
and image handles.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoi965/gen4: Refactor depth/stencil rebase
Topi Pohjolainen [Fri, 19 May 2017 12:53:40 +0000 (15:53 +0300)]
i965/gen4: Refactor depth/stencil rebase

Effectively there is the same code twice, once for depth and
again for stencil.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
7 years agoi965: Drop depth/stencil miptree pointers in alignment workaround
Topi Pohjolainen [Fri, 19 May 2017 09:26:16 +0000 (12:26 +0300)]
i965: Drop depth/stencil miptree pointers in alignment workaround

In brw_workaround_depthstencil_alignment() corresponding
renderbuffers are always set to refer to the same temp miptrees.
There is no need to carry them in context.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
7 years agoi965/gen4: Simplify depth/stencil invalidate check
Topi Pohjolainen [Fri, 19 May 2017 08:04:54 +0000 (11:04 +0300)]
i965/gen4: Simplify depth/stencil invalidate check

There is no separate stencil on gen < 6.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
7 years agoi965/gen4: Remove redundant check for depth when rebasing stencil
Topi Pohjolainen [Fri, 19 May 2017 07:39:21 +0000 (10:39 +0300)]
i965/gen4: Remove redundant check for depth when rebasing stencil

In case of gen < 6 stencil (if present) is always combined with
depth. Both stencil and depth attachments point to the same
physical surface.
Alignment workaround starts by considering depth and updates
stencil accordingly. Current logic continues with stencil and
in vain considers the case where depth would refer to different
surface than stencil.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
7 years agoi965/gen4: Remove non-existing stencil and hiz buffer setup
Topi Pohjolainen [Fri, 5 May 2017 11:43:20 +0000 (14:43 +0300)]
i965/gen4: Remove non-existing stencil and hiz buffer setup

Separate stencil and hiz are only enabled for gen6+.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
7 years agoandroid: ac: add missing libdrm_amdgpu shared dependency
Mauro Rossi [Sat, 20 May 2017 15:31:36 +0000 (17:31 +0200)]
android: ac: add missing libdrm_amdgpu shared dependency

Fixes building errors in amd/common:

target  C: libmesa_amd_common <= external/mesa/src/amd/common/ac_gpu_info.c
...
target  C: libmesa_amd_common <= external/mesa/src/amd/common/ac_surface.c
...

external/mesa/src/amd/common/ac_gpu_info.h:31:10: fatal error: 'amdgpu.h' file not found
         ^
2 errors

Fixes: 98a2492 ("ac_surface: use radeon_info from ac_gpu_info")
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
7 years agor600: include libelf headers only as needed
Emil Velikov [Sat, 17 Jun 2017 10:40:21 +0000 (11:40 +0100)]
r600: include libelf headers only as needed

Headers are required only when building with OpenCL. As we're building
w/o it libelf may be missing, hence we'll error out as below:

src/gallium/drivers/r600/evergreen_compute.c:27:10:
fatal error: 'gelf.h' file not found
         ^
1 error generated.

Fixes: d96a210842 ("r600g,compute: provide local copy of functions from
ac_binary.c")
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
Reported-by: Mauro Rossi <issor.oruam@gmail.com>
Tested-by: Mauro Rossi <issor.oruam@gmail.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoradeonsi: include ac_binary.h for struct ac_shader_binary
Emil Velikov [Fri, 16 Jun 2017 18:53:50 +0000 (19:53 +0100)]
radeonsi: include ac_binary.h for struct ac_shader_binary

The header embeds the struct so it needs the header inclusion instead of
the dummy forward declaration.

Cc: Nicolai Hähnle <nicolai.haehnle@amd.com>
Cc: Marek Olšák <marek.olsak@amd.com>
Cc: Tom Stellard <tstellar@redhat.com>
Fixes: 32206c5e560 ("radeonsi: Add radeon_shader_binary member to struct
si_shader")
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tested-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
7 years agor600, radeon: move radeon_shader_binary_{init,clean} back to radeon
Emil Velikov [Fri, 16 Jun 2017 19:03:41 +0000 (20:03 +0100)]
r600, radeon: move radeon_shader_binary_{init,clean} back to radeon

Those are used by r600 and radeonsi, so moving them within the former
was a bad idea.

Fixes: d96a210842b ("r600g,compute: provide local copy of functions
from ac_binary.c")
Cc: Jan Vesely <jan.vesely@rutgers.edu>
Cc: Aaron Watry <awatry@gmail.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tested-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
7 years agoac: resolve conflicts introduced with "ac: remove amdgpu.h dependency"
Emil Velikov [Fri, 16 Jun 2017 18:10:25 +0000 (19:10 +0100)]
ac: resolve conflicts introduced with "ac: remove amdgpu.h dependency"

The commit did not add the relevant includes - in particular
stdint.h and stdbool.h for the respective standard types.

At the same time, the amdgpu_device_handle typedef redeclaration was
off.

Fixes: 81945ded0dc ("ac: remove amdgpu.h dependency")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101471
Cc: Mark Janes <mark.a.janes@intel.com>
Cc: Gregor Münch <gr.muench@gmail.com>
Reported-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reported-by: Mark Janes <mark.a.janes@intel.com>
Reported-by: Gregor Münch <gr.muench@gmail.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tested-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
7 years agoi965/gen4: Set depth offset when there is stencil attachment only
Topi Pohjolainen [Sun, 21 May 2017 04:39:07 +0000 (07:39 +0300)]
i965/gen4: Set depth offset when there is stencil attachment only

Current version fails to set depthstencil.depth_offset when there
is only stencil attachment (it does set the intra tile offsets
though). Fixes piglits:

g45,g965,ilk:   depthstencil-render-miplevels 1024 s=z24_s8
g45,ilk:        depthstencil-render-miplevels 273 s=z24_s8

CC: mesa-stable@lists.freedesktop.org
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
7 years agoi965/gen6: Remove dead code in hiz surface setup
Topi Pohjolainen [Tue, 10 Jan 2017 08:52:32 +0000 (10:52 +0200)]
i965/gen6: Remove dead code in hiz surface setup

In intel_hiz_miptree_buf_create() the miptree is unconditionally
created with MIPTREE_LAYOUT_FORCE_ALL_SLICE_AT_LOD.

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
7 years agointel/isl/gen6: Allow arrayed stencil
Topi Pohjolainen [Sun, 14 May 2017 16:02:20 +0000 (19:02 +0300)]
intel/isl/gen6: Allow arrayed stencil

Nothing prevents arrayed stencil surfaces even though hardware
doesn't support mipmapping.

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
7 years agosvga: add new num-failed-allocations HUD query
Brian Paul [Fri, 16 Jun 2017 22:36:43 +0000 (16:36 -0600)]
svga: add new num-failed-allocations HUD query

This counter is incremented if we fail to allocate memory for
vertex/index/const buffers, textures, etc.

Reviewed-by: Neha Bhende <bhenden@vmware.com>
7 years agogallium/hud: support GALLIUM_HUD_DUMP_DIR feature on Windows
Brian Paul [Fri, 16 Jun 2017 22:35:27 +0000 (16:35 -0600)]
gallium/hud: support GALLIUM_HUD_DUMP_DIR feature on Windows

Use a dummy implementation of the access() function.  Use \ path separator.
Add a few comments.

Reviewed-by: Neha Bhende <bhenden@vmware.com>
7 years agosvga: add a few minor comments
Brian Paul [Fri, 16 Jun 2017 22:34:43 +0000 (16:34 -0600)]
svga: add a few minor comments

Trivial.

7 years agomesa: whitespace fixes in enable.c
Brian Paul [Fri, 16 Jun 2017 20:45:02 +0000 (14:45 -0600)]
mesa: whitespace fixes in enable.c

Remove trailing whitespace, replace tabs w/ spaces, etc.  Trivial.

7 years agoi965: Convert SF_STATE to genxml.
Rafael Antognolli [Tue, 6 Jun 2017 16:23:31 +0000 (09:23 -0700)]
i965: Convert SF_STATE to genxml.

This patch finishes the work done by Ken of converting SF_STATE to genxml, and
merges it with gen6+ code for emitting that state.

Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
7 years agogenxml: The viewport state offset is actually an address.
Rafael Antognolli [Tue, 6 Jun 2017 16:23:30 +0000 (09:23 -0700)]
genxml: The viewport state offset is actually an address.

This fixes code generation on gen45.

Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
7 years agogenxml: Rename fields to match gen6+.
Rafael Antognolli [Tue, 6 Jun 2017 16:23:29 +0000 (09:23 -0700)]
genxml: Rename fields to match gen6+.

"Anti-aliasing Enable" to "Anti-Aliasing Enable".

Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
7 years agogenxml: Rename SF_STATE field to match gen6+.
Rafael Antognolli [Tue, 6 Jun 2017 16:23:28 +0000 (09:23 -0700)]
genxml: Rename SF_STATE field to match gen6+.

Rename "Use Point Width State" to "Point Width Source". It accepts the same
values and has the same meaning as gen6+, so lets keep them with the same name
to simplify the code.

Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
7 years agoi965: aa_line_distance_mode should be before the padding.
Rafael Antognolli [Tue, 6 Jun 2017 16:23:27 +0000 (09:23 -0700)]
i965: aa_line_distance_mode should be before the padding.

It seems that it was never set correctly.

Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
7 years agoswr/rast: Fix read-back of viewport array index
Tim Rowley [Fri, 9 Jun 2017 23:37:27 +0000 (18:37 -0500)]
swr/rast: Fix read-back of viewport array index

Binner/clipper read viewport array index from the vertex header as needed.
Move viewport state to BACKEND_STATE.

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
7 years agoswr/rast: Refactor includes to limit simdintrin.h usage
Tim Rowley [Fri, 9 Jun 2017 21:58:59 +0000 (16:58 -0500)]
swr/rast: Refactor includes to limit simdintrin.h usage

Reduces the files rebuilt after modifying simdintrin.h from
84 to 64.

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>