Commit Graph

85558 Commits

Author SHA1 Message Date
Axel Davy 1604efa6fd st/nine: Add support for swvp constants in shaders
swvp has relaxed limits (more nested loops, etc).
In particular it enables more constants.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2016-10-10 23:43:49 +02:00
Axel Davy 56ea3df7d4 st/nine: Initial mixed vertex processing support
In mixed vertex processing, the user can enable or disable
software vertex processing. It is on hardware by default.

This feature is not a state, and thus the setting doesn't
need to be recorded by stateblocks.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2016-10-10 23:43:49 +02:00
Axel Davy 747f1ef8b6 st/nine: Implement SetNPatchMode
Signed-off-by: Axel Davy <axel.davy@ens.fr>
2016-10-10 23:43:49 +02:00
Axel Davy ded7a73eb3 st/nine: Implement D3DUSAGE_SOFTWAREPROCESSING
Buffers with this flag must be usable with both software
and hardware vertex processing. Use Staging for fast cpu access.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2016-10-10 23:43:49 +02:00
Patrick Rudolph 19703f2a36 st/nine: Allocate more space for ATI1
ATIx are "unknown" formats that do not follow block format conventions.
Tests showed that pitch*height bytes are allocated.
apitrace used to depend on this behaviour.
It used to copy more bytes than it has to for the ATI1 block format,
but it didn't crash on Windows.

Increase buffersize for ATI1 to fix this crash.
The same issue was present in WINE but a patch has been sent by me.

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
2016-10-10 23:43:49 +02:00
Patrick Rudolph ec6c636722 st/nine: Add missing break
Add missing break instruction.

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
2016-10-10 23:43:49 +02:00
Axel Davy 03f60a3357 st/nine: Implement relative addressing for ps inputs
To implement the feature we copy the ps inputs to a temp array.
This is not optimal for performance, but it is the simplest solution.

This is a feature that is very very rarely used.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2016-10-10 23:43:49 +02:00
Axel Davy a5d308e51a st/nine: Wait for pending tasks to execute in swapchain
Fixes crash after Reset() when using thread_submit=true

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2016-10-10 23:43:49 +02:00
Axel Davy f090705075 st/nine: Use fixed size arrays for swapchain buffers
Signed-off-by: Axel Davy <axel.davy@ens.fr>
2016-10-10 23:43:49 +02:00
Patrick Rudolph a719800cb8 st/nine: Fix buffer count check for Ex devices
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
2016-10-10 23:43:49 +02:00
Axel Davy 9ff0dc3129 st/nine: Disable seamless cubemap for d3d
d3d9 doesn't have seamless cubemap.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2016-10-10 23:43:49 +02:00
Axel Davy f0ec54ee32 st/nine: Fix some check flags
Uses the new defines introduced in previous commit.
See comment in the commit for more explanation.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2016-10-10 23:43:49 +02:00
Axel Davy 39e98d351f st/nine: Unify some check flags
The new defines will be reused in a later patch.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2016-10-10 23:43:48 +02:00
Axel Davy 2290eac84e gallium/util: Really allow aliasing of dst for u_box_union_*
Gallium nine relies on aliasing to work with this function.
Without this patch, dirty region tracking was incorrect, which
could lead to incorrect textures or vertex buffers.
Fixes several game bugs with nine.
Fixes https://github.com/iXit/Mesa-3D/issues/234

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>

Cc: "12.0" <mesa-stable@lists.freedesktop.org>
2016-10-10 23:43:48 +02:00
Axel Davy 5e7f0ebe29 softpipe: Cap to 2 GB on 32 bits
On 32 bits system, application memory is quite limited.
softpipe uses application memory. To help prevent memory
exhaustion, limit reported memory availability to 2GB.

Some gallium nine apps do check reported memory by allocating
resources until memory is full. Gallium nine refuses allocations
when 80% of the reported memory limit is used. This change
helps some apps to start.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2016-10-10 23:43:48 +02:00
Axel Davy 814ca96d0d llvmpipe: Cap to 2 GB on 32 bits
On 32 bits system, application memory is quite limited.
llvmpipe uses application memory. To help prevent memory
exhaustion, limit reported memory availability to 2GB.

Some gallium nine apps do check reported memory by allocating
resources until memory is full. Gallium nine refuses allocations
when 80% of the reported memory limit is used. This change
helps some apps to start.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2016-10-10 23:43:48 +02:00
Axel Davy 218459771a gallium/os: Fix overflow on 32 bits
On systems with more than 4GB of ram,
os_get_total_physical_memory was triggering an integer
overflow for the linux and haiku path, when on
32 bits.

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

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-10-10 23:43:48 +02:00
Axel Davy 9904581dc6 st/nine: Memset pipe_resource templates
Fixes regression introduced by
ecd6fce261
and is more future proof than just clearing the next
field.

Other nine usages did already zero out the templates.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Acked-by: Edward O'Callaghan <funfunctor@folklore1984.net>
2016-10-10 23:43:48 +02:00
Samuel Pitoiset d43151318a nvc0: fix valid range for shader buffers
When offset != 0, the valid range was wrong because the second
argument of util_range_add() is end, not size.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2016-10-10 21:32:16 +02:00
Ilia Mirkin 5239bd5920 nvc0/ir: fix overwriting of value backing non-constant gather offset
Normally the value is an immediate, which is moved to some temporary, so
there's no problem. In the case of a non-constant offset (as allowed by
ARB_gpu_shader5), we have to take care to copy it first before using it
to build up the bits.

This fixes a compilation error observed in F1 2015.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Cc: mesa-stable@lists.freedesktop.org
2016-10-10 14:28:32 -04:00
Vinson Lee 0a898ec28b glsl: Add missing cache_destroy stub function.
CC       glsl/tests/cache_test.o
glsl/tests/cache_test.c: In function ‘test_cache_create’:
glsl/tests/cache_test.c:160:4: error: implicit declaration of function ‘cache_destroy’ [-Werror=implicit-function-declaration]
    cache_destroy(cache);
    ^

Fixes: 87ab26b2ab ("glsl: Add initial functions to implement an on-disk cache")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
2016-10-10 11:17:31 -07:00
Anuj Phogat f8f6f60a36 docs: Mark GL_OES_viewport_array done on i965
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2016-10-10 10:48:38 -07:00
Chad Versace 8044885182 egl: Unify the EGLint/EGLAttrib paths in eglCreateSync* (v3)
Pre-patch, there were two code paths for parsing EGLSync attribute
lists: one path for old-style EGLint lists, used by eglCreateSyncKHR,
and another for new-style EGLAttrib lists, used by eglCreateSync (1.5)
and eglCreateSync64 (EGL_KHR_cl_event2).

There were two attrib_list parsing functions,
  _eglParseSyncAttribList(_EGLSync *sync, const EGLint *attrib_list)
  _eglParseSyncAttribList64(_EGLSync *sync, const EGLattrib *attrib_list)
This patch unifies the two attrib_list parsing functions into one,
  _eglParseSyncAttribList(_EGLSync *sync, const EGLattrib *attrib_list)

Many internal EGLSync function signatures had *two* attrib_list
parameters to accomodate both code paths: one parameter was an EGLint
list and other an EGLAttrib list. At most one of the parameters was
allowed to be non-null.  This patch removes the `EGLint *attrib_list`
parameter, leaving only the `EGLAttrib *attrib_list` parameter, for all
internal EGLSync functions.

v2:
  - Consistently use condition (sizeof(int_list[0]) ==
    sizeof(attrib_list[0])). [for emil]
v3:
  - Don't double-unlock the display in eglCreateSyncKHR.

Reviewed-by: Emil Velikov <emil.velikov@collabora.com> (v2)
2016-10-10 09:54:11 -07:00
Eric Anholt 0f99c0686e intel: Fix bash-specific redirection.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2016-10-10 09:50:05 -07:00
Eric Anholt ec9ed1c4d8 gallium: Fix install-gallium-links.mk on non-bash /bin/sh
Debian uses dash by default, which doesn't do '+='.  Fixes servo's
osmesa-based headless testing system, which was looking for libOSMesa in
the lib/ directory.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Cc: mesa-stable@lists.freedesktop.org
2016-10-10 08:56:12 -07:00
Ilia Mirkin ec05331a7b nv50/ir: only stick one preret per function
A function with multiple returns would have had multiple preret settings
at the top of the function. While this is unlikely to have caused issues
since we don't use functions in earnest, it could have in some cases
overflowed the call stack, in case a function had a lot of early
returns.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2016-10-10 10:45:06 -04:00
Nicolai Hähnle 1f95121626 radeonsi: make more use of si_have_tgsi_compute
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-10-10 10:38:33 +02:00
Nicolai Hähnle 38cfd5160a gallium/radeon: assign a name to LLVM output variables in debug builds
This can be helpful with R600_DEBUG=preoptir.

Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-10-10 10:38:30 +02:00
Nicolai Hähnle 39a29c2431 gallium/radeon: avoid redundant work with overlapping in/out arrays
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-10-10 10:37:50 +02:00
Nicolai Hähnle 77c81164bc radeonsi: support ARB_compute_variable_group_size
Not sure if it's possible to avoid programming the block size twice (once for
the userdata and once for the dispatch).

Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-10-10 10:36:42 +02:00
Lionel Landwerlin 014bd4acb8 anv: turn on samplerAnisotropy in VkPhysicalDeviceFeatures
According to the Vulkan spec 5.63.4 :

  samplerAnisotropy indicates whether anisotropic filtering is supported. If
  this feature is not enabled, the maxAnisotropy member of the
  VkSamplerCreateInfo structure must be 1.0.

Since we already set maxAnisotropy to 16 and program the hardware according
to the VkSamplerCreateInfo.maxAnisotropy, it seems we can turn this on.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-10-10 09:25:38 +01:00
Edward O'Callaghan ba43768a1e radv: Use proper header guards over 'pragma once' directives
Signed-off-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2016-10-10 16:10:56 +11:00
Tapani Pälli 2d7e0f35c5 mesa: throw error if bufSize negative in GetSynciv on OpenGL ES
Fixes following dEQP tests:

   dEQP-GLES31.functional.debug.negative_coverage.callbacks.state.get_synciv
   dEQP-GLES31.functional.debug.negative_coverage.get_error.state.get_synciv
   dEQP-GLES31.functional.debug.negative_coverage.log.state.get_synciv

v2: drop _mesa_is_gles check (Kenneth)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98133
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-10-10 07:29:31 +03:00
Tapani Pälli d997d5c0c9 glsl: prohibit lowp, mediump precision on atomic_uint
Fixes following dEQP tests:

   dEQP-GLES31.functional.debug.negative_coverage.callbacks.atomic_counter.atomic_precision
   dEQP-GLES31.functional.debug.negative_coverage.get_error.atomic_counter.atomic_precision
   dEQP-GLES31.functional.debug.negative_coverage.log.atomic_counter.atomic_precision

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98131
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-10-10 07:29:31 +03:00
Tapani Pälli c64093e7d5 glsl: optimize copy_propagation_elements pass
Changes make copy_propagation_elements pass faster, reducing link
time spent in test case of bug 94477. Does not fix the actual issue
but brings down the total time. No regressions seen in CI.

v2 (idr): Formatting / whitespace fixes.  Embed the acp_ref in the
acp_entry.

v3 (idr): Delete unused copy constructor.  Use while(pop_head) instead
of foreach() { remove }.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-10-10 07:29:31 +03:00
Dave Airlie db5d278541 radv: don't build without SHA1.
Just copy the section from anv above this.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98167
Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-10-10 10:08:47 +10:00
Edward O'Callaghan 185be15d9d docs/features.txt: Add GL_KHR_robustness supported on ES 3.2
Both radeonsi and nvc0 should also support ES so fixup doc.

Signed-off-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-10-09 01:06:38 +11:00
Lionel Landwerlin 4682abdaa8 intel: aubinator: enable loading dumps from standard input
In conjuction with an intel_aubdump change, you can now look at your
application's output like this :

$ intel_aubdump -c '/path/to/aubinator --gen=hsw' my_gl_app

v2: Add print_help() comment about standard input handling (Eero)
    Remove shrinked gtt space debug workaround (Eero)

v3: Use realloc rather than memcpy/free (Ben)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sirisha Gandikota <Sirisha.Gandikota@intel.com>
2016-10-08 02:18:47 +01:00
Lionel Landwerlin 619c8de522 intel: aubinator: enable loading xml files from a given directory
This might be useful for people who debug with out of tree descriptions.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sirisha Gandikota <Sirisha.Gandikota@intel.com>
2016-10-08 02:17:35 +01:00
Lionel Landwerlin 63a366a881 intel: aubinator: generate a standalone binary
Embed the xml files into the binary, so aubinator can be used from any
location.

v2: Split generation packing into another patch (Jason)
    Check for xxd (Jason)

v3: Fix out of tree builds (Jason)
    Generate custom variable name rather than names generated by xxd
    (Lionel)

v4: Move generated _xml.h files to genxml/ (Sirisha)

v5: Remove newline from makefile (Jason)

v6: Add comment on gen*_xml.h creation (Jason)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-10-08 02:17:03 +01:00
Nanley Chery 4d7d9825f3 anv/TODO: Update the HiZ task
Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Chad Versace <chadversary@chromium.org>
2016-10-07 12:54:18 -07:00
Nanley Chery d8aacc24cc anv: Enable fast depth clears
Provides an FPS increase of ~30% on the Sascha triangle and multisampling
demos.

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Chad Versace <chadversary@chromium.org>
2016-10-07 12:54:18 -07:00
Chad Versace 78d074b87a anv/cmd_buffer: Enable rendering to HiZ
Nanley Chery:
(rebase)
 - Resolve conflicts with new anv_batch_emit macro
(amend)
 - Handle a QPitch TODO
 - Emit 3DSTATE_HIER_DEPTH_BUFFER on pre-BDW systems
 - Only use HiZ for single-subpass renderpasses
 - Emit the HiZ instruction before the stencil instruction to follow the
   optimized clear sequence specified in the PRMs
 - Don't modify clear params
 - Enable resolves when a HiZ buffer is used to ensure depth buffer validity

Provides an FPS increase of ~15% on the Sascha triangle and multisampling
demos.

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-10-07 12:54:18 -07:00
Nanley Chery 134d181be1 anv/cmd_buffer: Add code for performing HZ operations
Create a function that performs one of three HiZ operations -
depth/stencil clears, HiZ resolve, and depth resolves.

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Chad Versace <chadversary@chromium.org>
2016-10-07 12:54:18 -07:00
Jason Ekstrand 9919a2d34d anv/image: Memset hiz surfaces to 0 when binding memory
Nanley Chery (amend):
 - Change memset value from 0xff to 0 (a defined value for HiZ).

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-10-07 12:54:18 -07:00
Jason Ekstrand b4bbabf21b anv: Move BindImageMemory to anv_image.c
Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-10-07 12:54:18 -07:00
Chad Versace 917814dccd anv: Allocate hiz surface
Nanley Chery:
(rebase)
 - Use isl_surf_get_hiz_surf()
(amend)
 - Only add a HiZ surface onto a depth/stencil attachment
 - Add comment above HiZ surface addition
 - Hide HiZ behind INTEL_VK_HIZ prior to BDW
 - Disable HiZ for untested cases
 - Remove DISABLE_AUX_BIT instead of preventing it from being added

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Chad Versace <chadversary@chromium.org>
2016-10-07 12:54:18 -07:00
Chad Versace 3aec432ed3 anv: Add func anv_image_has_hiz()
Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-10-07 12:54:17 -07:00
Chad Versace fe40d026a1 anv: Add anv_image::hiz_surface
Unused.

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-10-07 12:54:17 -07:00
Nanley Chery 814fa12379 isl: Correct a comment in the isl_format enum
HiZ is not a color surface, but an auxiliary depth surface.

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-10-07 12:54:17 -07:00