Commit graph

82384 commits

Author SHA1 Message Date
Kristian Høgsberg Kristensen
76c096f0e7 anv: Remove stale assert
This goes back to when we didn't have the subpass number in the command
buffer begin info.
2016-01-25 15:15:59 -08:00
Matt Turner
874ede4983 i965/gen7+: Use NIR for lowering of pack/unpack opcodes. 2016-01-25 14:48:34 -08:00
Matt Turner
5deba3f00a i965/vec4: Implement nir_op_pack_uvec2_to_uint.
And mark nir_op_pack_uvec4_to_uint unreachable, since it's only produced
by lowering pack[SU]norm4x8 which the vec4 backend does not need.
2016-01-25 14:24:07 -08:00
Matt Turner
8bb22dc351 nir: Add lowering support for unpacking opcodes. 2016-01-25 14:24:07 -08:00
Matt Turner
d7781038f5 nir: Add lowering support for packing opcodes. 2016-01-25 14:24:07 -08:00
Matt Turner
6c1b3bc950 i965/fs: Implement support for extract_word.
The vec4 backend will lower it.
2016-01-25 14:24:07 -08:00
Matt Turner
26f0444ead nir: Add opcodes to extract bytes or words.
The uint versions zero extend while the int versions sign extend.
2016-01-25 14:24:07 -08:00
Nanley Chery
2c94f659e8 anv/meta: Fix CopyBuffer when size matches HW limit
Perform a copy when the copy_size matches the HW limit (max_copy_size).
Otherwise the current behavior is that we fail the following assertion:

      assert(height < max_surface_dim);

because the values are equal.
2016-01-25 12:26:39 -08:00
Kristian Høgsberg Kristensen
c21de2bf04 anv: Don't use uninitialized barycentric_interp_modes
If we don't have a fragment shader, wm_prog_data in undefined.
2016-01-25 11:34:32 -08:00
Kristian Høgsberg Kristensen
292031a1a5 anv: Disable fs dispatch for depth/stencil only pipelines
Fixes most renderpass bugs.
2016-01-25 11:26:19 -08:00
Matt Turner
26b2cc6f3a glsl: Remove 2x16 half-precision pack/unpack opcodes.
i965/fs was the only consumer, and we're now doing the lowering in NIR.
2016-01-25 11:12:36 -08:00
Matt Turner
24d385f85c i965/fs: Switch from GLSL IR to NIR for un/packHalf2x16 lowering. 2016-01-25 11:11:56 -08:00
Matt Turner
5eb1145434 nir: Add lowering of nir_op_unpack_half_2x16. 2016-01-25 11:11:56 -08:00
Matt Turner
84166aed92 i965: Make separate nir_options for scalar/vector stages.
We'll want to have different lowering options set for scalar/vector
stages.
2016-01-25 11:11:26 -08:00
Matt Turner
b6bb3b9bcd i965: Move brw_compiler_create() to new brw_compiler.c.
A future patch will want to use designated initalizers, which aren't
available in C++, but this is C.
2016-01-25 11:11:25 -08:00
Matt Turner
b126039784 nir: Make argument order of unop_convert match binop_convert.
Strangely the return and parameter types were reversed.
2016-01-25 11:11:08 -08:00
Ian Romanick
2542871387 meta: Use internal functions to set texture parameters
_mesa_texture_parameteriv is used because (the more obvious)
_mesa_texture_parameteri just stuffs the parameter in an array and calls
_mesa_texture_parameteriv.  This just cuts out the middleman.

As a side bonus we no longer need check that ARB_stencil_texturing is
supported.  The test doesn't allow non-supporting implementations to
avoid any work, and it's redundant with the value-changed test.

Fix bug #93717 because the state restore commands at the bottom of
_mesa_meta_GenerateMipmap no longer depend on the bound state.

Fixes  piglit   arb_direct_state_access-generatetexturemipmap  with  the
changes  recently sent  to the  piglit mailing  list.  See  the bugzilla
entry for more info.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93717
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
2016-01-25 10:43:47 -08:00
Ian Romanick
18b0ba340b meta/blit: Restore GL_DEPTH_STENCIL_TEXTURE_MODE state for GL_TEXTURE_RECTANGLE
Commit c246828c added the code to save and restore the stencil
texturing mode.  The restore, however, was erroneously inside the
'target != GL_TEXTURE_RECTANGLE' block.

Fixes piglit test 'arb_stencil_texturing-blit_corrupts_state
GL_TEXTURE_RECTANGLE'.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
2016-01-25 10:43:47 -08:00
Ian Romanick
f7800fadff meta/copy_image: Fix typo in comment
Trivial.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
2016-01-25 10:43:47 -08:00
Ian Romanick
bae8a4f05b mesa: Don't include meta.h
Commit 055093e removed the call to _mesa_meta_in_progress, and meta.h
has not been necessary in src/mesa/main/enable.c since.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
2016-01-25 10:43:47 -08:00
Nicolai Hähnle
1067e6eb55 radeonsi: add DCC buffer for sampler views on new CS
This fixes a VM fault and possible lockup in high memory pressure situations.

Cc: "11.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
2016-01-25 10:16:12 -05:00
Nicolai Hähnle
0bacbf5b7e radeonsi: emit rw_buffers for tes_shader only if tes_shader present
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-01-25 10:16:08 -05:00
Nicolai Hähnle
2385b253c6 radeonsi: do not set the shader->key for gs copy shaders
The key for a geometry shader would be interpreted as the key for a vertex
shader further down the line, which really doesn't make sense.

This does not affect the contents of shader->key because geometry shaders
don't have any key entries anyway.

Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-01-25 10:16:05 -05:00
Nicolai Hähnle
46c0ba60c6 radeonsi: si_llvm_emit_vs_epilogue is never used with gs copy shaders
Hence remove the misleading branch on is_gs_copy_shader.

Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-01-25 10:16:02 -05:00
Nicolai Hähnle
c55b9499d5 radeonsi: move is_gs_copy_shader to si_shader_context
It is only used during shader creation now, so no need to keep it around
afterwards.

Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-01-25 10:16:00 -05:00
Nicolai Hähnle
a7754ffd31 radeonsi: replace use of is_gs_copy_shader in si_shader_vs
We now have an explicit parameter that contains the same information, and
this will allow us to get rid of is_gs_copy_shader in the si_shader struct.

Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-01-25 10:15:55 -05:00
Nicolai Hähnle
004fcd4230 radeonsi: ensure that VGT_GS_MODE is sent when necessary
Specifically, when the API switches from using a GS to not using a GS and then
back to using the same GS again, we do not have to re-send all the GS state,
but we do have to send VGT_GS_MODE. So make VGT_GS_MODE consistently be a part
of the VS state.

This fixes a rendering bug in Dolphin, but surely other applications are
affected as well.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93648
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-01-25 10:15:31 -05:00
Nicolai Hähnle
9f89bd69df radeonsi: extract the VGT_GS_MODE calculation into its own function
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-01-25 10:15:08 -05:00
Samuel Pitoiset
429371f22a trace: fix a segfault when tracing indirect draw calls
Like other resources, the indirect draw buffer must be unwrapped.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2016-01-24 19:53:53 +01:00
Marek Olšák
24ea81a491 Revert "mesa: enable enums for OES_geometry_shader"
This reverts commit 67e3098703.

It breaks a bunch of geometry shader tests, such as "spec@!opengl 3.2@minmax"
and others depending on the glGet queries.
2016-01-24 15:47:39 +01:00
Marek Olšák
e707b9d8ba winsys/amdgpu: optionally use buffer lists with all allocated buffers
Set RADEON_ALL_BOS=1 to use it.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-01-23 17:01:54 +01:00
Jason Ekstrand
a804d82ef6 anv/cmd_buffer: Zero out binding tables and samplers in state_reset
This fixes a use of an undefined value if the client uses push constants in
a stage without ever setting any descriptors on GEN8-9.
2016-01-22 22:57:05 -08:00
Jason Ekstrand
9e0bc29f80 nir/opcodes: Properly flush denormals in fquantize2f16 2016-01-22 22:18:31 -08:00
Jason Ekstrand
89672d81f3 i965/nir: Properly flush denormals in nir_op_fquantize2f16 2016-01-22 22:18:31 -08:00
Kenneth Graunke
ae9f73ea40 glsl: Conditionalize atan2 math.
In the old hand-writen implementation of atan2, the calculation of
atan(y/x) was performed conditionally in the "then" block of the
outermost if statement.  I believe I accidentally lifted this out
into unconditional code when converting to IR builder.

For reference, the original hand-written IR is visible in commit
722eff674b.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Cc: Erik Faye-Lund <kusmabite@gmail.com>
2016-01-22 21:03:00 -08:00
Jason Ekstrand
2bfb9f29b8 anv/format: Add a helpful comment about format names 2016-01-22 19:14:41 -08:00
Jason Ekstrand
259e1bdf79 anv/formats: Add support for 3 more formats 2016-01-22 19:03:27 -08:00
Jason Ekstrand
0b6c1275d0 anv/pipeline: Add a default L3$ setup 2016-01-22 19:02:55 -08:00
Rob Herring
7ee8954753 virgl: enable building on Android
This is just a copy-n-paste and rename of vc4 Android makefiles.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-01-23 12:35:29 +10:00
Rob Herring
657dc4f533 virtio_gpu: Add PCI ID to driver map
Add the virtio-gpu PCI ID so the driver probing works.

Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-01-23 12:35:24 +10:00
Chad Versace
99a4885328 anv/formats: Rename ambiguous func parameter
vkGetPhysicalDeviceImageFormatProperties has multiple 'flags'
parameters.
2016-01-22 17:51:24 -08:00
Chad Versace
149d5ba64d anv/formats: Advertise multisample formats
Teach vkGetPhysicalDeviceImageFormatProperties() to advertise
multisampled formats.
2016-01-22 17:50:15 -08:00
Chad Versace
d96d78c3b6 anv/image: Drop assertion that samples == 1 2016-01-22 17:19:57 -08:00
Chad Versace
fda074b23f isl: Fix gen8_choose_msaa_layout()
Gen8 requires any Y tiling, not any *standard* Y tiling.
2016-01-22 17:19:57 -08:00
Chad Versace
2fa1f745ea isl: Add func isl_tiling_is_any_y() 2016-01-22 17:19:57 -08:00
Chad Versace
fa5f45e8aa anv/meta: Assert correct sample counts for blit funcs
Add assertions to:
    anv_CmdBlitImage
    anv_CmdCopyImage
    anv_CmdCopyImageToBuffer
    anv_CmdCopyBufferToImage
2016-01-22 17:19:57 -08:00
Chad Versace
dfcb4ee6df anv: Add anv_image::samples
It's set but not yet used.
2016-01-22 17:19:57 -08:00
Chad Versace
1c5d7b38e2 anv: Use isl_device_get_sample_counts()
Use it in vkGetPhysicalDeviceProperties.
2016-01-22 17:19:57 -08:00
Chad Versace
14b753f666 isl: Add func isl_device_get_sample_counts() 2016-01-22 17:19:57 -08:00
Nanley Chery
d4de918ad0 gen8/state: Remove SKL special-casing for MinimumArrayElement
MinimumArrayElement carries the same meaning for BDW and SKL.
Suggested by Jason.

No regressions in dEQP-VK.pipeline.image.view_type.cube_array.*
Fixes a number of cube tests, including cube_array_base_slice
and cube_base_slice tests.
2016-01-22 17:10:14 -08:00