Commit Graph

86720 Commits

Author SHA1 Message Date
Emil Velikov 49ac732651 docs/repository: refer to Submitting patches
v2: Improve grammar - add missing "to" (Eric).

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2016-11-21 15:08:07 +00:00
Emil Velikov 259e65c03e docs: split Submitting Patches into separate document
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2016-11-21 15:08:05 +00:00
Emil Velikov e561737c52 docs: split Codying style into separate document
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2016-11-21 15:08:04 +00:00
Emil Velikov edbf3ebe1f docs: mention/suggest testing your patch against dEQP
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2016-11-21 15:08:02 +00:00
Emil Velikov f2d9c7b60c docs: mention that coding style can differ between drivers
... and point people to use/honour the EditorConfig/Emacs files, where
applicable.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2016-11-21 15:07:59 +00:00
Emil Velikov 4fbeac398a revieweds: add Tomasz for the Android/EGL implementation
As mentioned/requested on the mailing list.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2016-11-21 14:46:40 +00:00
Emil Velikov 4f12fcb6d3 mesa: fold always true conditional
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2016-11-21 14:46:40 +00:00
Emil Velikov e70d0d22a2 mesa: drop unneeded assert
As seen a couple  of lines above - there's no way for the assert to
trigger.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2016-11-21 14:46:40 +00:00
Emil Velikov 130b12f96a egl/wayland: remove non-applicable destroyDrawable from error path
If we fail to create the drawable there's not much point in attampting
to destroy it.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2016-11-21 14:46:40 +00:00
Emil Velikov b421fec958 loader: automake: whitespace cleanup
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
2016-11-21 14:46:40 +00:00
Emil Velikov 4ffa9b2847 gbm: automake: remove unused defines
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
2016-11-21 14:46:40 +00:00
Gwan-gyeong Mun d3780e2e4d intel: aubinator: Fix resource leak in gen_spec_load_from_path
This fixes resource leak in gen_spec_load_from_path XML_ParserCreate
failure path

CID 1373564

Signed-off-by: Mun Gwan-gyeong <elongbug@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2016-11-21 14:38:11 +00:00
Tomasz Figa 51727b1cf5 egl/android: Use gralloc::lock_ycbcr for resolving YUV formats (v2)
There is an interface that can be used to query YUV buffers for their
internal format. Specifically, if gralloc:lock_ycbcr() is given no SW
usage flags, it's supposed to return plane offsets instead of pointers.
Let's use this interface to implement support for YUV formats in Android
EGL backend.

v2: Fixes from Emil's review:
 a) Added comments for parts that might be not clear,
 b) Changed get_fourcc_yuv() to return -1 on failure,
 c) Changed is_yuv() to use bool.

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2016-11-21 13:27:47 +00:00
Tomasz Figa 859d0b0121 egl/android: Get gralloc module in dri2_initialize_android() (v2)
Currently droid_open_device() gets a reference to the gralloc module
only for its own use and does not store it anywhere. To make it possible
to call gralloc methods from code added in further patches, let's
refactor current code to get gralloc module in dri2_initialize_android()
and store it in dri2_dpy.

v2: fixes from Emil's review:
 a) remove duplicate initialization of 'err'.

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2016-11-21 13:27:41 +00:00
Tomasz Figa 925ff0b534 egl/android: Remove handling of RGB_888 pixel format
It is currently completely broken, as it ends up using RGBX_8888 on
hardware side, due to no way of distinguishing between these two in the
DRI API, while HAL_PIXEL_FORMAT_RGB_888 is clearly defined to be the
3-byte per pixel RGB format.

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2016-11-21 13:27:01 +00:00
Gwan-gyeong Mun 9c5b1c7990 radeonsi: Fix resource leak in gs_copy_shader allocation failure path
CID 1394028

Signed-off-by: Mun Gwan-gyeong <elongbug@gmail.com>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-11-22 00:04:59 +11:00
Nicolai Hähnle 0e11290ef5 glsl/lower_output_reads: remove unused mem_ctx
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-11-21 08:21:52 +01:00
Nicolai Hähnle a3b98edf6f glsl/lower_output_reads: bail early in tessellation control shaders
This whole pass is a no-op.

Acked-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-11-21 08:21:41 +01:00
Nicolai Hähnle 0d383a79a8 glsl/lower_output_reads: fix geometry shader output handling with conditional emit
Consider a geometry shader that contains code like this:

   some_out = expr;

   if (cond) {
      ...
      EmitVertex();
   } else {
      ...
      EmitVertex();
   }

Both branches should see the correct value of some_out.

Since this is a rather subtle and rare case, I'm submitting a piglit test
for this as well.

GLSL says that the values of output variables are undefined after
EmitVertex(). With this change, the values will now be defined and
unmodified. This may reduce optimization opportunities in the probably
quite rare case where subsequent compiler passes cannot prove that the
value of the output variable is overwritten.

Cc: 13.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-11-21 08:21:31 +01:00
Nicolai Hähnle 42d5e91a2a radeonsi: store group_size_variable in struct si_compute
For compute shaders, we free the selector after the shader has been
compiled, so we need to save this bit somewhere else.  Also, make sure that
this type of bug cannot re-appear, by NULL-ing the selector pointer after
we're done with it.

This bug has been there since the feature was added, but was only exposed
in piglit arb_compute_variable_group_size-local-size by commit
9bfee7047b (which is totally unrelated).

Cc: 13.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-11-21 08:19:43 +01:00
Nicolai Hähnle 47db6b4600 glsl: don't flatten if-blocks with dynamic array indices
This fixes the regression of radeonsi in
glsl-1.10/execution/variable-indexing/vs-output-array-vec3-index-wr
caused by commit 74e39de932.

Acked-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-11-21 08:18:47 +01:00
Iago Toral Quiroga 39c47e7698 anv/state: enable coordinate address rounding for Min/Mag filters
This patch improves pass rate of dEQP-VK.texture.explicit_lod.2d.sizes.*
from 68.0% (98/144) to 83.3% (120/144) by enabling sampler address
rounding mode when the selected filter is not nearest, which is the same
thing we do for OpenGL.

These tests check texture filtering for various texture sizes and mipmap
levels. The failures (without this patch) affect cases where the target
texture has odd dimensions (like 57x35) and either the Min or the Mag filter
is not nearest.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-11-21 08:01:54 +01:00
Jason Ekstrand a8b85f1f77 anv: Implement a depth stall restriction on gen7
Fixes around 60 Vulkan CTS tests on Haswell

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
2016-11-20 20:40:40 -08:00
Ilia Mirkin 9145873b15 nvc0/ir: use levelZero flag when the lod is set to 0
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2016-11-20 18:13:12 -05:00
Dave Airlie b1340fd708 radv: spir-v allows texture size query with and without lod.
The translation to llvm was failing here due to required lod.

This fixes some new  SteamVR shaders.

Cc: "13.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-11-21 09:00:22 +10:00
Dave Airlie 6d7be52d90 radv: fix image view creation for depth and stencil only
This fixes the image view for sampling just the depth.

It removes some pointless swizzle code, and adds
a missing case for the x8_d24 format.

Fixes:
dEQP-VK.renderpass.formats.d32_sfloat_s8_uint.input.*
dEQP-VK.renderpass.formats.d24_unorm_s8_uint.input.*
dEQP-VK.renderpass.formats.x8_d24_unorm_pack32.input.*

Cc: "13.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-11-21 08:58:03 +10:00
Dave Airlie 51a44c0021 radv: make sure to flush input attachments correctly.
This fixes 9 of the
dEQP-VK.renderpass.attachment_allocation.input_output.*
tests.

Cc: "13.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-11-21 08:57:31 +10:00
Brian Paul e899d47bc9 tnl: remove unneeded #include "util/simple_list.h"
Reviewed-by: Vinson Lee <vlee@freedesktop.org>
2016-11-20 06:41:42 -07:00
Brian Paul a6e849c672 radeon: remove unneeded #include "util/simple_list.h"
Compile tested only.

Reviewed-by: Vinson Lee <vlee@freedesktop.org>
2016-11-20 06:41:42 -07:00
Brian Paul 36678e97e4 r200: remove unneeded #include "util/simple_list.h"
And include "util/simple_list.h" where it is needed in r200_state.c
Compile tested only.

Reviewed-by: Vinson Lee <vlee@freedesktop.org>
2016-11-20 06:41:41 -07:00
Brian Paul 5d7b5d8627 i915: remove unneeded #include "util/simple_list.h"
Compile tested only.

Reviewed-by: Vinson Lee <vlee@freedesktop.org>
2016-11-20 06:41:41 -07:00
Brian Paul da0bc7b646 mesa: remove unneeded #includes in errors.c
Reviewed-by: Vinson Lee <vlee@freedesktop.org>
2016-11-20 06:41:41 -07:00
Brian Paul 0d1e240a4f mesa: remove trailing whitespace in errors.c
Reviewed-by: Vinson Lee <vlee@freedesktop.org>
2016-11-20 06:41:41 -07:00
Kenneth Graunke 9c1609f0d6 nir: Add a C wrapper for glsl_type::is_array_of_arrays().
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-11-19 12:30:26 -08:00
Kenneth Graunke a1a292d177 i965: Store a clip_distance_mask field similar to cull_distance_mask.
This isn't useful for legacy GL, but will be used in Vulkan.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-11-19 12:30:25 -08:00
Kenneth Graunke 19c652b29c i965: Use shader_info for brw_vue_prog_data::cull_distance_mask.
This also allows us to move it from a GL specific location to a
part of the compiler shared by both GL and Vulkan.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-11-19 12:30:25 -08:00
Kenneth Graunke c447ca64c1 compiler: Store the clip/cull distance array sizes in shader_info.
We switched from a boolean to array lengths in gl_program a while back.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-11-19 12:30:25 -08:00
Kenneth Graunke c4be6e0b8d i965: Fix GS push inputs with enhanced layouts.
We weren't taking first_component into account when handling GS push
inputs.  We hardly ever push GS inputs, so this was not caught by
existing tests.  When I started using component qualifiers for the
gl_ClipDistance arrays, glsl-1.50-transform-feedback-type-and-size
started catching this.

Cc: "13.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-11-19 12:30:25 -08:00
Kenneth Graunke 45aee6be02 i965: Delete unused variable.
I forgot to delete this in 9ef2b9277d.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2016-11-19 12:30:25 -08:00
Kenneth Graunke 9ef2b9277d intel: Share URB configuration code between GL and Vulkan.
This code is far too complicated to cut and paste.

v2: Update the newly added genX_gpu_memcpy.c; const a few things.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2016-11-19 11:40:01 -08:00
Kenneth Graunke 6d416bcd84 i965: Use arrays in Gen7+ URB code.
So much of this code was cut and pasted per stage.  We can accomplish
much of it by looping over shader stages.

Improves performance of OglBatch7 (version 6) by 1.50783% +/- 0.287049%
(n = 71) at 1024x768 on Cherryview.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2016-11-19 11:40:00 -08:00
Kenneth Graunke 6656dd4b92 i965: Drop brw->urb.{nr_*_entries,*_start} assignments from gen7_urb.c.
The context fields are for Gen4-5; setting them has always been useless.
There's no point in spending the cost in the hottest path in the driver.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2016-11-19 11:40:00 -08:00
Kenneth Graunke 74d8612eed i965: Switch to roundf in HS/DS URB code.
Matt intentionally switched the VS calculation to be float-based in
commit c1da15709a.  Tessellation support
was written before this and rebased forward, and missed the change.

Now it's consistent.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2016-11-19 11:39:59 -08:00
Kenneth Graunke c87b5dee11 i965: Make URB code use prog_data for GS/tessellation enable checks.
If geometry/tessellation shaders are disabled, prog_data will be NULL
(see brw_state_upload.c).  This consolidates dirty bits a little.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2016-11-19 11:39:58 -08:00
Kenneth Graunke 639af2a7c6 intel: Convert devinfo->urb.min_*_entries into an array.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2016-11-19 11:39:56 -08:00
Kenneth Graunke 58c09e72b1 intel: Convert devinfo->urb.max_*_entries into an array.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2016-11-19 11:39:45 -08:00
Brian Paul 2acfd36479 docs: document MESA_DEBUG=context
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2016-11-19 08:44:03 -07:00
Ilia Mirkin ea276512a0 swr: mark streamout buffers as written
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2016-11-19 10:40:37 -05:00
Timothy Arceri 203c8794a1 st/mesa/glsl/nir/i965: make use of new gl_shader_program_data in gl_shader_program
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2016-11-19 15:45:46 +11:00
Timothy Arceri 65cd0a0d7f mesa: create new gl_shader_program_data struct
This will be used to share data between gl_program and gl_shader_program
allowing for greater code simplification as we can remove a number of
awkward uses of gl_shader_program.

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2016-11-19 15:45:46 +11:00