Commit Graph

85931 Commits

Author SHA1 Message Date
Jason Ekstrand ac0ca066de anv/cmd_buffer: Move state base address re-emit into ExecuteCommands
This has two primary advantages.  First, it means that the batch_chain code
knows less about the actual command buffer contents which is good because
improves separation.  Second, it means that it only gets re-emitted once
after all of the secondaries instead of once after each secondary which is
just wasteful.  It also has the advantage of cleaning the code up a bit.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2016-10-17 17:41:35 -07:00
Edward O'Callaghan 1c05f92590 doc/features.txt: factor out radeonsi as GL45 complete
V2. add i965/hsw+ to list
V3. rebased on master.
V4. 'DONE' -> 'DONE ()'.
V5. remove i965/hsw+ from list :/

Signed-off-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-10-18 09:55:45 +11:00
Ian Romanick 89e1436e2d i965: Silence unused parameter warnings
brw_link.cpp:76:44: warning: unused parameter ‘shader_type’ [-Wunused-parameter]
                            gl_shader_stage shader_type,
                                            ^
brw_nir.c: In function ‘brw_nir_lower_vs_inputs’:
brw_nir.c:194:55: warning: unused parameter ‘devinfo’ [-Wunused-parameter]
                         const struct gen_device_info *devinfo,
                                                       ^
brw_vec4_visitor.cpp:914:37: warning: unused parameter ‘sampler’ [-Wunused-parameter]
                            uint32_t sampler,
                                     ^
brw_vec4_visitor.cpp:1146:34: warning: unused parameter ‘stream_id’ [-Wunused-parameter]
 vec4_visitor::gs_emit_vertex(int stream_id)
                                  ^

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
2016-10-17 11:32:03 -07:00
Ian Romanick 7c0c3740f0 glsl: Remove unused function import_prototypes
Once upon a time, this was used to extract prototypes from the shader
containing GLSL built-in functions.  This was removed by f5692f45 in
November 2010 for Mesa 7.10.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
2016-10-17 11:32:03 -07:00
Ian Romanick 5c025ea6fc glsl: Remove prototypes for nonexistent functions
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
2016-10-17 11:32:03 -07:00
Ian Romanick fde48c1262 glsl: Replace assert with unreachable
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
2016-10-17 11:32:03 -07:00
Lionel Landwerlin 696f5c1853 anv: replace , with ; in anv_batch_emit()
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-10-17 18:16:38 +01:00
Lionel Landwerlin 6b17e3a6da intel: aubinator: use different colors to signal batch start/end
This makes the stream of commands a bit easier to read.

v2 (Ken): Use bold text on green headers for easier readability;
          swap the green and blue headers so the majority stay blue.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2016-10-17 18:16:38 +01:00
Nicolai Hähnle c3ce0d22b4 st/glsl_to_tgsi: fix [ui]vec[34] conversion to double
The corresponding opcodes for integers need to be treated the same as F2D.

Fixes GL45-CTS.gpu_shader_fp64.conversions.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-10-17 19:09:45 +02:00
Nicolai Hähnle 1dd99a15a4 st/glsl_to_tgsi: fix atomic counter addressing
When more than one atomic counter buffer is in use, UniformStorage[n].opaque
is set up to contain indices that are contiguous across all used buffers.

This appears to be used by i965 via NIR, but for TGSI we do not treat atomic
counter buffers as opaque, so using the data in the opaque array is incorrect.

Fixes GL45-CTS.compute_shader.resource-atomic-counter.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-10-17 19:09:42 +02:00
Nicolai Hähnle 9d6f82320c st/glsl_to_tgsi: fix a corner case of std140 layout in uniform buffers
See the comment in the code for an explanation. This fixes
GL45-CTS.buffer_storage.map_persistent_draw.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-10-17 19:09:39 +02:00
Nicolai Hähnle 57a1514203 st/mesa: fix fragment shader output mapping
Properly handle the case where there is a gap in the assigned output locations,
e.g. a fragment shader writes to color buffer 2 but not to color buffers 0 & 1.

Fixes GL45-CTS.gtf33.GL3Tests.explicit_attrib_location.explicit_attrib_location_pipeline.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-10-17 19:09:37 +02:00
Nicolai Hähnle e0213f36bb glsl: print non-zero bindings of variables
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-10-17 19:09:33 +02:00
Nicolai Hähnle 9160b4d981 radeonsi: unify the constant load paths
Remove the split between direct and indirect.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-10-17 19:08:45 +02:00
Nicolai Hähnle 51f9b38ce8 radeonsi: fix indirect loads of 64 bit constants
This fixes GL45-CTS.compute_shader.fp64-case3.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-10-17 19:08:36 +02:00
Eric Engestrom e9864f93c6 gbm: add a couple missing includes
Needed for memset() and drmIoctl().

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
2016-10-17 08:47:38 -07:00
Iago Toral Quiroga 8785a8ff89 glsl: fail compilation of compute shaders when unsupported
Generally, we only check for the presence of compute shaders during
parsing when we find any language (like layout qualifiers) that are
specific to compute shaders, however, it is possible to define an
empty compute shader does not use any language specific to compute
shaders at all and we should fail the compilation anyway. dEQP checks
this.

This patch adds a check for compute shader availability after we have
parsed the source code. At this point we know the effective GLSL version
and also extensions enabled in the shader.

Fixes a subcase of the following dEQP tests:
dEQP-GLES31.functional.debug.negative_coverage.callbacks.shader.compile_compute_shader
dEQP-GLES31.functional.debug.negative_coverage.get_error.shader.compile_compute_shader
dEQP-GLES31.functional.debug.negative_coverage.log.shader.compile_compute_shader

The tests still fail because there is one more subcase that fails that needs
another fix.

Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
2016-10-17 15:14:12 +02:00
Tapani Pälli 3d48353e29 egl/android: fix error in droid_add_configs_for_visuals()
This was some kind of leftover in commit acd35c8 and format_count
array variable (declared in outer scope) should be used instead.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Fixes: acd35c8758 ("egl/android: tweak droid_add_configs_for_visuals()")
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2016-10-17 11:51:15 +01:00
Marek Olšák 74d145f4a8 radeonsi: shorten "shader->selector" to "sel" in si_shader_create
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-10-17 12:13:00 +02:00
Marek Olšák 2e74e8ead9 radeonsi: clear DB_RENDER_OVERRIDE
Vulkan doesn't set these fields even though it doesn't use HiS.
HiS is disabled by programming DB_SRESULTS_COMPARE_STATEn to 0.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-10-17 12:13:00 +02:00
Kenneth Graunke f30f48476f glsl: Disable textureOffset(sampler2DArrayShadow, ...) in GLSL ES.
This has apparently never existed in GLSL ES.

Fixes dEQP-GLES3.functional.shaders.texture_functions.invalid
.textureoffset_sampler2darrayshadow_vec4_ivec2_vertex and
.textureoffset_sampler2darrayshadow_vec4_ivec2_fragment

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98244
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2016-10-16 15:05:00 -07:00
Axel Davy 9baf4505fb st/nine: Fix multisample limit check
Fixes regression introduced by
b560305687

The regression prevents some apps to start.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2016-10-17 00:02:52 +02:00
Eric Anholt c61eb3c91c vc4: Fix fast clear color packing for 565.
Piglit didn't manage to cover this because fbo-clear-formats uses
scissors, so we don't get fast clearing.
2016-10-16 11:22:50 -07:00
Eric Anholt 46cd3bab93 state_tracker: Fix check for scissor enabled when < 0.
DEQP's clear tests like to give us x + w < 0 or y + h < 0.  Since we
were comparing to an unsigned, it would get promoted to unsigned and come
out as bignum >= width or height and we would clear the whole fb instead
of none of the fb.

Fixes 10 tests under deqp-gles2/functional/color_clear.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-10-16 11:22:50 -07:00
Chad Versace 07422bf32b egl/surfaceless: Fix comparison between pointer and integer
Fixes GCC warning:
  drivers/dri2/platform_surfaceless.c:196:18: warning: comparison
      between pointer and integer

Fixes: 4b8a55809e ("egl/surfaceless: tweak surfaceless_add_configs_for_visuals()")
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2016-10-16 09:03:31 -07:00
Emil Velikov d19b014b77 egl/surfaceless: use correct index when accesing the visual
i is used for the driver_configs, while j is for the visuals.

Fixes: 4b8a55809e ("egl/surfaceless: tweak surfaceless_add_configs_for_visuals()")
Reported-by: Chad Versace <chadversary@chromium.org>
Tested-by: Chad Versace <chadversary@chromium.org>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
2016-10-16 09:03:27 -07:00
Gustaw Smolarczyk 36cb5508e8 radv/winsys: Fail early on overgrown cs.
When !use_ib_bos, we can't easily chain ibs one to another. If the
required cs size grows over 1Mi - 8 dwords just fail the cs so that we
won't assert-fail in radv_amdgpu_winsys_cs_submit later on.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2016-10-16 12:38:53 +02:00
Kenneth Graunke 493237d4ee glsl: Drop the ES requirement that VS outputs must be flat qualified.
Several conformance tests violate this requirement:

ES31-CTS.core.tessellation_shader.max_patch_vertices
ES31-CTS.core.tessellation_shader.tessellation_control_to_tessellation_evaluation.data_pass_through

I submitted a merge request to fix the conformance tests, but Khronos
opted to drop this GLSL ES specific requirement in favor of making flat
qualification of VS outputs optional, matching modern desktop GL.

Note that there were 7 Piglit tests which enforce this rule:
tests/spec/glsl-es-3.00/compiler/interpolation/qualifiers/*nonflat*
but these were deleted in Piglit commit acc0a2fabbd714bc704c16f1675e7c0.

Bugzilla: https://cvs.khronos.org/bugzilla/show_bug.cgi?id=15465#c7
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
2016-10-15 13:47:47 -07:00
Jason Ekstrand 6ef5a44a43 intel/genxml: Make some PIPE_CONTROL fields booleans
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-10-15 12:20:50 -07:00
Jason Ekstrand f34de3e8b0 intel/genxml: Make "Predication enable" a boolean
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-10-15 12:20:46 -07:00
Jason Ekstrand 468e1042cb intel/genxml; Make "Use Global GTT a boolean
We also remove the redundant zero defaults since everything without an
explicit default gets zeroed automatically.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-10-15 12:20:43 -07:00
Jason Ekstrand ce86227175 intel/genxml; Make "Tiled Surface" a boolean
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-10-15 12:20:39 -07:00
Jason Ekstrand e6f9637d8a intel/genxml: Make "SO Buffer Enable" fields boolean
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-10-15 12:20:36 -07:00
Jason Ekstrand fa0285eaac intel/genxml: Make "Stencil Buffer Enable" a boolean
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-10-15 12:20:30 -07:00
Jason Ekstrand 34826078f6 intel/genxml: Make a couple of STREAMOUT fields booleans
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-10-15 12:20:26 -07:00
Jason Ekstrand 6a064ad01d intel/genxml: Make "Include Vertex Handles" and "Include Primitive ID" booleans
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-10-15 12:20:23 -07:00
Jason Ekstrand f21d3b4d01 intel/genxml: Make "Vector Mask Enable" a boolean
We also get rid of the "(VME)" a few places

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-10-15 12:20:19 -07:00
Jason Ekstrand aee501c87e intel/genxml: Make "Single Program Flow" a boolean
We also get rid of the "(SPF)" a few places.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-10-15 12:20:14 -07:00
Tobias Klausmann b7d9677de8 nv50/ir: constant fold OP_SPLIT
Split the source immediate value into new values and move them into the
original defs set by the split. Since we can only have up to 64-bit
immediates, this is largely beneficial for F64 (and, in the future, U64)
operations.

Signed-off-by: Tobias Klausmann <tobias.johannes.klausmann@mni.thm.de>
[imirkin: always use U32, set newi for foldCount tracking]
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2016-10-14 23:23:57 -04:00
Kenneth Graunke 75128d6ffd i965: Enable OpenGL 4.5.
Everything is in place.  There are still conformance issues to sort out,
but we may as well turn it on in master.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
2016-10-14 17:35:13 -07:00
Jason Ekstrand 9d65595c06 anv/pipeline: Remove a meta hack from emit_ds_state
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
2016-10-14 15:40:39 -07:00
Jason Ekstrand 69b2e931d4 anv/image: Create views directly in VkCreate*View
Without meta, we no longer need the _init helpers and the ability to back
an image view with surface states allocated out of the command buffer.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
2016-10-14 15:40:39 -07:00
Jason Ekstrand 0a2c375af9 anv/image: Get rid of the usage hacks for meta
Now that meta is gone and we're using blorp, we don't need all of the usage
hacks.  Instead, the usage provided by the app is exactly the usage that we
want because the app is the only thing creating image views.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
2016-10-14 15:40:39 -07:00
Jason Ekstrand 8e1a8dd47e anv: Move Create*Pipelines into genX_cmd_buffer.c
Now that we don't have meta, we have no need for a gen-agnostic pipeline
create path.  We can, instead, just generate one Create*Pipelines function
per gen and be done with it.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
2016-10-14 15:40:39 -07:00
Jason Ekstrand 7df46b7533 anv/pipeline: Remove support for direct-from-nir shaders
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
2016-10-14 15:40:39 -07:00
Jason Ekstrand 6d557ae403 anv: Make entrypoint resolution take a gen_device_info
In order for things such as the ANV_CALL and the ifuncs to work, we used to
have a singleton gen_device_info structure that got assigned the first time
you create a device.  Given that the driver will never be used
simultaneously on two different generations of hardware, this was fairly
safe to do.  However, it has caused a few hickups and isn't, in general, a
good plan.  Now that the two primary reasons for this singleton are gone,
we can get rid of it and make things quite a bit safer.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
2016-10-14 15:40:39 -07:00
Jason Ekstrand 4c9dec80ed anv: Get rid of the ANV_CALL macro
This macro was needed by meta in order to make gen-specific calls from
gen-agnostic code.  Now that we don't have meta, the remaining two uses are
fairly trivial to get rid of.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
2016-10-14 15:40:39 -07:00
Jason Ekstrand ac77528f7d anv: Get rid of graphics_pipeline_create_info_extra
Now that we no longer have meta, all pipelines get created via the normal
Vulkan pipeline creation mechanics.  There is no more need for this bit of
extra magic data that we've been passing around.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2016-10-14 15:40:39 -07:00
Jason Ekstrand dedc406ec8 anv: Get rid of meta
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2016-10-14 15:40:39 -07:00
Jason Ekstrand d823f92970 anv: Use blorp for subpass clears
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2016-10-14 15:39:41 -07:00