Commit graph

85652 commits

Author SHA1 Message Date
Chad Versace
a6ecfe1dd3 isl/tests: Add some tests for intratile offsets
Test isl_surf_get_image_intratile_offset_el() in the tests:
  test_bdw_2d_r8g8b8a8_unorm_512x512_array01_samples01_noaux_tiley0
  test_bdw_2d_r8g8b8a8_unorm_1024x1024_array06_samples01_noaux_tiley0
2016-01-27 15:12:42 -08:00
Chad Versace
7ab0d2e2c0 isl: Add func isl_get_intratile_image_offset_el() 2016-01-27 15:12:42 -08:00
Chad Versace
18a83eaa8c isl/tests: Rename t_assert_offset()
Rename it to t_assert_offset_el(), clarifying that the offset in units
of surface elements, not samples.
2016-01-27 15:12:42 -08:00
Chad Versace
fa08f95ff5 isl: Add func isl_surf_get_image_offset_el()
This replaces function isl_surf_get_image_offset_sa()
2016-01-27 15:12:42 -08:00
Chad Versace
ea44d31528 isl: Fix row pitch for compressed formats
When calculating row pitch, the row's width in samples must be divided
by the format's block width. The commit below accidentally removed the
division.

    commit eea2d4d059
    Author: Chad Versace <chad.versace@intel.com>
    Date:   Tue Jan 5 14:28:28 2016 -0800
    Subject: isl: Don't align phys_slice0_sa.width twice
2016-01-27 15:12:42 -08:00
Chad Versace
45ecfcd637 isl: Add func isl_surf_get_tile_info() 2016-01-27 15:12:42 -08:00
Kenneth Graunke
9f954310e8 vtn: Fix atan2 for non-scalars.
The if/then/else block was bogus, as it can only take a scalar
condition, and we need to select component-wise.  The GLSL IR
implementation of atan2 handles this by looping over components,
but I decided to try and do it vector-wise, and messed up.

For now, just bcsel.  It means that we do the atan1 math even if
all components hit the quick case, but it works, and presumably
at least one component will hit the expensive path anyway.
2016-01-27 15:07:42 -08:00
Kenneth Graunke
f92a35d831 vtn: Fix Modf.
We were botching this for negative numbers - floor of a negative rounds
the wrong way.  Additionally, both results are supposed to retain the
sign of the original.

To fix this, just take the abs of both values, then put the sign back.
There's probably a better way to do this, but this works for now.
2016-01-27 14:21:08 -08:00
Kenneth Graunke
4acfc9effb i965: Fix SIN/COS precision problems.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2016-01-27 13:56:54 -08:00
Ilia Mirkin
34c2c7c61e glsl: only expose double mod when doubles are available
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2016-01-27 15:15:10 -05:00
Kristian Høgsberg Kristensen
b833e7a63c anv: Put back code to grow shader scratch space
This was lost in commit a71e614d33.
2016-01-27 11:36:56 -08:00
Kenneth Graunke
38a3a535eb anv: Update the device limits.
Fixes dEQP-VK.api.info.device.properties.  I haven't tested any others.
2016-01-26 23:09:45 -08:00
Jason Ekstrand
d3607351fe gen7/cmd_buffer: SCISSOR_RECT structs are tightly packed
The pointer has to be 32-byte aligned, but the structs themselves are 2
dwords each, tightly packed.
2016-01-26 22:10:14 -08:00
Jason Ekstrand
f2f03c5b65 anv/pipeline: Set MaximumVPIndex in 3DSTATE_CLIP 2016-01-26 21:52:59 -08:00
Jason Ekstrand
dc3de6f8df anv/pipeline: Only lower input indirects if EmitNoIndirectInput is set 2016-01-26 21:45:21 -08:00
Jason Ekstrand
9ac624751e anv/formats: Use is_power_of_two instead of is_rgb to determine renderability 2016-01-26 20:29:16 -08:00
Jason Ekstrand
2af3acd061 HACK/i965/surface_formats: Mark A4B4G4R4 as being supported
The table has this marked as unsupported on all gens, but I don't really
believe that given how early it is in the table.  I've tested and it seems
to work on Broadwell.  The Bspec says that it sould be renderable on SKL+
but alpha blending is questionable.

Side note: We really need to audit the format table again.
2016-01-26 20:29:16 -08:00
Jordan Justen
c20f78dc5d anv: Support swizzled formats.
Some formats require a swizzle in order to map them to actual hardware
formats.  This allows us to turn on two new Vulkan formats.
2016-01-26 20:29:16 -08:00
Jason Ekstrand
9bc72a9213 anv/image: Do swizzle remapping in anv_image.c
TODO: At some point, we really need to make an image_view_init_info that's
a flyweight and stop stuffing everything into image_view.
2016-01-26 20:23:59 -08:00
Jason Ekstrand
7d84fe9b1f HACK: Expose support for stencil blits
If someone actually tries to use them, they won't work, but at least we
don't fail to return format properties now.
2016-01-26 17:29:49 -08:00
Kenneth Graunke
32dcfc953e vtn: Delete references to IMix opcode.
This is being removed in SPIR-V.

Bugzilla: https://cvs.khronos.org/bugzilla/show_bug.cgi?id=15452
2016-01-26 17:02:35 -08:00
Ben Widawsky
c5dc6cdf26 i965/skl: Utilize new 5th bit for gateway messages
Cc: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2016-01-26 15:44:48 -08:00
Jason Ekstrand
a1ea45b857 genX/pipeline: Don't make vertex bindings with holes 2016-01-26 15:44:18 -08:00
Jason Ekstrand
7ef0d39cb2 anv/cmd_buffer: Put base_instance in the second component 2016-01-26 15:44:02 -08:00
Francisco Jerez
6840cc1513 anv/image: clflush surface state map in anv_fill_buffer_surface_state().
Some of its users had the required clflush on non-LLC platforms, some
didn't.  Put the clflush in anv_fill_buffer_surface_state() so we
don't forget.
2016-01-26 15:14:50 -08:00
Francisco Jerez
fc7a7b31c5 anv/image: clflush the right state map in anv_fill_image_surface_state().
It was clflushing the nonrt_surface_state structure regardless of
which state structure was actually being initialized.
2016-01-26 15:14:50 -08:00
Francisco Jerez
a50dc70e21 anv/image: Upload raw buffer surface state for untyped storage image and texel buffer access. 2016-01-26 15:14:50 -08:00
Francisco Jerez
d2ec510dda anv/image: Fix image parameter initialization. 2016-01-26 15:14:50 -08:00
Francisco Jerez
d9e0b9a06a isl/gen9: Fix slice offset calculation for 1D array images.
The X component of the offset is set to the layer index times layer
height which is obviously bogus, return the vertical offset of the
slice as Y component instead.  Fixes a few image load/store tests that
use 1D arrays on SKL when forcing it to fall back to untyped reads and
writes.
2016-01-26 15:14:50 -08:00
Jason Ekstrand
cc065e0ad7 i965/fs_surface_builder: Mask signed integers after conversion 2016-01-26 15:14:50 -08:00
Jason Ekstrand
ba393c9d81 anv/image: Actually fill out brw_image_param structs 2016-01-26 15:14:50 -08:00
Jason Ekstrand
aa9987a395 anv/image_view: Add base mip and base layer fields
These will be needed by image_load_store
2016-01-26 15:14:50 -08:00
Jason Ekstrand
42cd994177 gen7: Add support for base vertex/instance 2016-01-26 14:56:37 -08:00
Jason Ekstrand
4bf3cadb66 gen8: Add support for base vertex/instance 2016-01-26 14:56:37 -08:00
Jason Ekstrand
6ba67795db nir/spirv: Add proper support for InstanceIndex 2016-01-26 14:56:37 -08:00
Jason Ekstrand
1c3b7fe1ee nir/lower_io: Lower INSTNACE_INDEX 2016-01-26 14:56:37 -08:00
Jason Ekstrand
b2b7c93318 glsl/enums: Add an enum for Vulkan instance index 2016-01-26 14:56:37 -08:00
Jason Ekstrand
da75492879 genX/pipeline: Break emit_vertex_input out into common code
It's mostly the same and contains some non-trivial logic, so it really
should be shared.  Also, we're about to make some modifications here that
we would really like to share.
2016-01-26 14:56:37 -08:00
Karol Herbst
19ae5de981 nv50/ir: fix memory corruption when spilling and redoing RA
When RA fails, and we spill, we have to clean everything up before doing
RA again. We were forgetting to reset the hi/lo linked lists - at
least the hi list is guaranteed to still have pointers to now-deleted
RIG nodes.

Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: mesa-stable@lists.freedesktop.org
2016-01-26 17:55:06 -05:00
Kristian Høgsberg Kristensen
fe6ccb6031 anv: Remove long unused anv_aub.h 2016-01-26 14:53:00 -08:00
Kristian Høgsberg Kristensen
074a7c7d7c anv: Dirty fragment shader descriptors in meta restore
We need to reemit render targets, so dirtying VK_SHADER_STAGE_VERTEX_BIT
doesn't help us much.
2016-01-26 14:44:02 -08:00
Kristian Høgsberg Kristensen
725d969753 anv: Reemit STATE_BASE_ADDRESS after second level cmd buffers
Otherwise the primary batch will continue using the state base addresses
set by the secondary.  Fixes remaining renderpass tests.
2016-01-26 14:44:02 -08:00
Timothy Arceri
d580a979a4 glsl: remove old FINISHME
This should have been removed long ago.

Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
2016-01-27 09:15:21 +11:00
Chad Versace
df5f6d824b anv/meta: Fix sample mask in clear pipelines
Once we begin emitting the correct sample mask,
genX_3DSTATE_SAMPLE_MASK_pack will hit an assertion if the mask contains
too many bits.
2016-01-26 11:04:44 -08:00
Marek Olšák
98cebc913c configure.ac: don't require EGL/DRM and GBM if OpenGL is disabled
This allows building VDPAU/OMX/VA drivers without OpenGL and its
dependencies.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2016-01-26 19:07:03 +01:00
Jan Vesely
efc4142acd r600,compute: Plug few memory leaks
v2: drop inline keyword
    drop radeon_llvm_dispose_kernel_module wrapper

v3: move definitions to .c file
    use in radeonsi

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
2016-01-26 19:04:38 +01:00
Jan Vesely
e1dcd333e4 r600: Typos and whitespace fixes
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-01-26 19:01:22 +01:00
Marek Olšák
2924ca131f radeonsi: fix clover crash
caused by ce1e7784d0

Trivial.
2016-01-26 18:53:41 +01:00
Marek Olšák
af57507e4f radeonsi: fix shader precompilation for shader-db
The addition of spi_shader_col_format killed all color outputs
in precompiled shaders.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> (v1)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> (v1)

v2: also set the alpha func (trivial)
2016-01-26 18:49:50 +01:00
Ilia Mirkin
38c63abf09 glsl: add GL_OES_geometry_point_size and conditionalize gl_PointSize
For now this will be enabled in tandem with GL_OES_geometry_shader.
Should a driver come along that wants to separate them out, another
enable can be added.

Also adds the missed GL_OES_geometry_shader define in glcpp.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marta Lofstedt <marta.lofstedt@intel.com>
2016-01-26 12:36:15 -05:00