mesa.git
8 years agoanv/meta: Prefix anv_ to meta_emit_blit()
Nanley Chery [Tue, 8 Mar 2016 20:45:55 +0000 (12:45 -0800)]
anv/meta: Prefix anv_ to meta_emit_blit()

Follow the convention for non-static functions.

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
8 years agoanv/meta: Split anv_meta_blit.c into three files
Nanley Chery [Mon, 7 Mar 2016 23:15:33 +0000 (15:15 -0800)]
anv/meta: Split anv_meta_blit.c into three files

The new organization is as follows:
* anv_meta_blit.c: Blit and state setup/teardown commands
* anv_meta_copy.c: Copy and update commands
* anv_meta_blit2d.c: 2D Blitter API commands

Also, change the formatting to contain most lines
within 80 columns.

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
8 years agoanv/meta: Make meta_emit_blit() public
Nanley Chery [Tue, 8 Mar 2016 06:38:05 +0000 (22:38 -0800)]
anv/meta: Make meta_emit_blit() public

This can be reverted if the only other consumer, anv_meta_blit2d(),
uses a different method.

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
8 years agoanv/meta: Store src and dst usage flags in a variable
Nanley Chery [Mon, 7 Mar 2016 22:18:27 +0000 (14:18 -0800)]
anv/meta: Store src and dst usage flags in a variable

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
8 years agoanv/meta: Minimize height of images used for copies
Nanley Chery [Fri, 4 Mar 2016 19:43:19 +0000 (11:43 -0800)]
anv/meta: Minimize height of images used for copies

In addition to demystifying the value being added to the height,
this future-proofs the code for new tiling modes and keeps the
image height as small as possible.

v2: Actually use the smallest height possible.

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
8 years agoanv/cmd_buffer: Pull the core of flush_state into genX_cmd_buffer
Jason Ekstrand [Wed, 9 Mar 2016 01:10:05 +0000 (17:10 -0800)]
anv/cmd_buffer: Pull the core of flush_state into genX_cmd_buffer

8 years agoanv/cmd_buffer: Split flush_state into two functions
Jason Ekstrand [Wed, 9 Mar 2016 00:54:07 +0000 (16:54 -0800)]
anv/cmd_buffer: Split flush_state into two functions

8 years agoanv: Pull all of the genX_foo functions into anv_genX.h
Jason Ekstrand [Wed, 9 Mar 2016 00:49:06 +0000 (16:49 -0800)]
anv: Pull all of the genX_foo functions into anv_genX.h

This way we only have to declare them each once and we get it for all gens
at a single go.

8 years agoanv/meta_clear: Use repclear again
Jason Ekstrand [Tue, 8 Mar 2016 19:19:02 +0000 (11:19 -0800)]
anv/meta_clear: Use repclear again

8 years agoanv/pipeline: Unconditionally emit PS_BLEND on gen8+
Jason Ekstrand [Tue, 8 Mar 2016 18:25:00 +0000 (10:25 -0800)]
anv/pipeline: Unconditionally emit PS_BLEND on gen8+

Special-casing the PS_BLEND packet wasn't really gaining us anything.  It's
defined to be more-or-less the contents of blend state entry 0 only without
the indirection.  We can just copy-and-paste the contents.  If there are no
valid color targets, then blend state 0 will be 0-initialized anyway so
it's basically the same as the special case we had before.

8 years agoanv: Compact render targets
Jason Ekstrand [Tue, 8 Mar 2016 01:28:00 +0000 (17:28 -0800)]
anv: Compact render targets

Previously, we would always emit all of the render targets in the subpass.
This commit changes it so that we compact render targets just like we do
with other resources.  Render targets are represented in the surface map by
using a descriptor set index of UINT16_MAX.

8 years agoanv/pipeline: Move binding table setup to its own helper
Jason Ekstrand [Tue, 8 Mar 2016 02:07:48 +0000 (18:07 -0800)]
anv/pipeline: Move binding table setup to its own helper

8 years agoanv: Store CPU-side fence information in the BO
Jason Ekstrand [Mon, 7 Mar 2016 21:45:25 +0000 (13:45 -0800)]
anv: Store CPU-side fence information in the BO

This reduces the number of allocations a bit and cuts back on memory usage.
Kind-of a micro-optimization but it also makes the error handling a bit
simpler so it seems like a win.

8 years agoanv/allocator: Better casting in PFL macros
Jason Ekstrand [Tue, 8 Mar 2016 05:27:55 +0000 (21:27 -0800)]
anv/allocator: Better casting in PFL macros

We cast he constant 0xfff values to a uintptr_t before applying a bitwise
negate to ensure that they are actually 64-bit when needed.  Also, the
count variable doesn't need to be explicitly cast, it will get upcast as
needed by the "|" operation.

8 years agoanv/allocator: Move the alignment assert for the pointer free list
Jason Ekstrand [Tue, 8 Mar 2016 05:22:46 +0000 (21:22 -0800)]
anv/allocator: Move the alignment assert for the pointer free list

Previously we asserted every time you tried to pack a pointer and a counter
together.  However, this wasn't really correct.  In the case where you try
to grab the last element of the list, the "next elemnet" value you get may
be bogus if someonoe else got there first.  This was leading to assertion
failures even though the allocator would safely fall through to the failure
case below.

8 years agoanv/bo_pool: Allow freeing BOs where the anv_bo is in the BO itself
Jason Ekstrand [Mon, 7 Mar 2016 22:56:58 +0000 (14:56 -0800)]
anv/bo_pool: Allow freeing BOs where the anv_bo is in the BO itself

8 years agoanv/device: Up device limits for 3D and array texture dimensions
Nanley Chery [Sat, 5 Mar 2016 23:17:00 +0000 (15:17 -0800)]
anv/device: Up device limits for 3D and array texture dimensions

The limit for these textures is 2048 not 1024.

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
8 years agoanv/device: Actually free the CPU-side fence struct again
Jason Ekstrand [Mon, 7 Mar 2016 22:48:35 +0000 (14:48 -0800)]
anv/device: Actually free the CPU-side fence struct again

In 23de78768, when we switched from allocating individual BOs to using the
pool for fences, we accidentally deleted the free.

8 years agoanv: Quiet pTessellationState warning
Kristian Høgsberg Kristensen [Mon, 7 Mar 2016 06:06:24 +0000 (22:06 -0800)]
anv: Quiet pTessellationState warning

Some application pass a dummy for pTessellationState which results in a
lot of noise. Only warn if we're actually given tessellation shadear
stages.

8 years agoanv: Create fences from the batch BO pool
Jason Ekstrand [Sun, 6 Mar 2016 22:16:51 +0000 (14:16 -0800)]
anv: Create fences from the batch BO pool

Applications may create a *lot* of fences, perhaps as much as one per
vkQueueSubmit.  Really, they're supposed to use ResetFence, but it's easy
enough for us to make them crazy-cheap so we might as well.

8 years agoanv: Emit null render targets
Jason Ekstrand [Fri, 26 Feb 2016 19:31:04 +0000 (11:31 -0800)]
anv: Emit null render targets

v2 (Francisco Jerez): Add the state_offset to the surface state offset

8 years agoanv/pipeline: Handle null wm_prog_data in 3DSTATE_CLIP
Jason Ekstrand [Sat, 5 Mar 2016 22:42:16 +0000 (14:42 -0800)]
anv/pipeline: Handle null wm_prog_data in 3DSTATE_CLIP

8 years agoanv: Fix rebase error
Kristian Høgsberg Kristensen [Sat, 5 Mar 2016 22:33:50 +0000 (14:33 -0800)]
anv: Fix rebase error

8 years agoanv: Turn pipeline cache on by default
Kristian Høgsberg Kristensen [Fri, 4 Mar 2016 23:03:23 +0000 (15:03 -0800)]
anv: Turn pipeline cache on by default

Move the environment variable check to cache creation time so we block
both lookups and uploads if it's turned off.

8 years agoanv: Check if shader if present before uploading to cache
Kristian Høgsberg Kristensen [Sat, 5 Mar 2016 20:20:16 +0000 (12:20 -0800)]
anv: Check if shader if present before uploading to cache

Between the initial check the returns NO_KERNEL and compiling the
shader, other threads may have added the shader to the cache. Before
uploading the kernel, check again (under the mutex) that the compiled
shader still isn't present.

8 years agoanv: Always use point size from the shader
Kristian Høgsberg Kristensen [Sat, 5 Mar 2016 06:07:02 +0000 (22:07 -0800)]
anv: Always use point size from the shader

There is no API for setting the point size and the shader is always
required to set it. Section 24.4:

   "If the value written to PointSize is less than or equal to zero, or
    if no value was written to PointSize, results are undefined."

As such, we can just always program PointWidthSource to Vertex. This
simplifies anv_pipeline a bit and avoids trouble when we enable the
pipeline cache and don't have writes_point_size in the prog_data.

8 years agoanv: Also cache the struct anv_pipeline_binding maps
Kristian Høgsberg Kristensen [Fri, 4 Mar 2016 20:56:14 +0000 (12:56 -0800)]
anv: Also cache the struct anv_pipeline_binding maps

This is state the we generate when compiling the shaders and we need it
for mapping resources from descriptor sets to binding table indices.

8 years agoanv: Don't re-upload shaders when merging
Kristian Høgsberg Kristensen [Fri, 4 Mar 2016 20:27:31 +0000 (12:27 -0800)]
anv: Don't re-upload shaders when merging

Using anv_pipeline_cache_upload_kernel() will re-upload the kernel and
prog_data when we merge caches. Since the kernel and prog_data is
already in the program_stream, use anv_pipeline_cache_add_entry()
instead to only add the entry to the hash table.

8 years agoanv: Add anv_pipeline_cache_add_entry()
Kristian Høgsberg Kristensen [Fri, 4 Mar 2016 20:25:23 +0000 (12:25 -0800)]
anv: Add anv_pipeline_cache_add_entry()

This function will grow the cache to make room and then add the entry.

8 years agoanv: Rename anv_pipeline_cache_add_entry() to 'set'
Kristian Høgsberg Kristensen [Fri, 4 Mar 2016 20:21:43 +0000 (12:21 -0800)]
anv: Rename anv_pipeline_cache_add_entry() to 'set'

This function is a helper that unconditionally sets a hash table entry
and expects the cache to have enough room. Calling it 'add_entry'
suggests it will grow the cache as needed.

8 years agoanv: Simplify pipeline cache control flow a bit
Kristian Høgsberg Kristensen [Fri, 4 Mar 2016 18:59:21 +0000 (10:59 -0800)]
anv: Simplify pipeline cache control flow a bit

No functional change, but the control flow around searching the cache
and falling back to compiling is a bit simpler.

8 years agoanv: Store prog data in pipeline cache stream
Kristian Høgsberg Kristensen [Fri, 4 Mar 2016 16:15:16 +0000 (08:15 -0800)]
anv: Store prog data in pipeline cache stream

We have to keep it there for the cache to work, so let's not have an
extra copy in struct anv_pipeline too.

8 years agoanv: Rename 'table' to 'hash_table' in anv_pipeline_cache
Kristian Høgsberg Kristensen [Fri, 4 Mar 2016 00:52:20 +0000 (16:52 -0800)]
anv: Rename 'table' to 'hash_table' in anv_pipeline_cache

A little less ambiguous.

8 years agoanv: Serialize as much pipeline cache as we can
Kristian Høgsberg Kristensen [Fri, 4 Mar 2016 00:48:31 +0000 (16:48 -0800)]
anv: Serialize as much pipeline cache as we can

We can serialize as much as the application asks for and just stop once
we run out of memory. This lets applications use a fixed amount of
space for caching and still get some benefit.

8 years agoanv: Use 1.0 pipeline cache header
Kristian Høgsberg Kristensen [Fri, 4 Mar 2016 00:39:59 +0000 (16:39 -0800)]
anv: Use 1.0 pipeline cache header

The final version of the pipeline cache header adds a few more fields.

8 years agoanv: Fix shader key hashing
Kristian Høgsberg Kristensen [Fri, 4 Mar 2016 00:21:17 +0000 (16:21 -0800)]
anv: Fix shader key hashing

This was copied from inline code to a helper and wasn't updated to hash
a pointer instead.

8 years agoanv: Remove excess whitespace
Kristian Høgsberg Kristensen [Fri, 4 Mar 2016 00:18:30 +0000 (16:18 -0800)]
anv: Remove excess whitespace

8 years agoanv: Remove left-over bits of sparse-descriptor code
Kristian Høgsberg Kristensen [Fri, 4 Mar 2016 00:10:29 +0000 (16:10 -0800)]
anv: Remove left-over bits of sparse-descriptor code

8 years agoanv/pipeline: Implement the depth compare EQUAL workaround on gen8+
Jason Ekstrand [Sat, 5 Mar 2016 17:19:01 +0000 (09:19 -0800)]
anv/pipeline: Implement the depth compare EQUAL workaround on gen8+

8 years agoanv: Don't allow D16_UNORM to be combined with stencil
Jason Ekstrand [Sat, 5 Mar 2016 17:13:44 +0000 (09:13 -0800)]
anv: Don't allow D16_UNORM to be combined with stencil

Among other things, this can cause the depth or stencil test to spurriously
fail when the fragment shader uses discard.

8 years agoanv/pipeline: Calculate the correct max_source_attr for 3DSTATE_SBE
Jason Ekstrand [Sat, 5 Mar 2016 16:45:01 +0000 (08:45 -0800)]
anv/pipeline: Calculate the correct max_source_attr for 3DSTATE_SBE

8 years agoanv/hsw: Move query code to genX file for Haswell
Jordan Justen [Sat, 5 Mar 2016 08:54:54 +0000 (00:54 -0800)]
anv/hsw: Move query code to genX file for Haswell

This fixes many CTS cases, but will require an update to the kernel
command parser register whitelist. (The CS GPRs and TIMESTAMP
registers need to be whitelisted.)

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
8 years agoanv: Implement VK_REMAINING_{MIP_LEVELS,ARRAY_LAYERS}
Nanley Chery [Sat, 5 Mar 2016 04:41:05 +0000 (20:41 -0800)]
anv: Implement VK_REMAINING_{MIP_LEVELS,ARRAY_LAYERS}

v2: Subtract the baseMipLevel and baseArrayLayer (Jason)

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
8 years agoanv/meta_clear: Set the right number of dynamic states
Jason Ekstrand [Sat, 5 Mar 2016 03:14:48 +0000 (19:14 -0800)]
anv/meta_clear: Set the right number of dynamic states

8 years agoanv/pipeline: Fix depthBiasEnable on gen7
Jason Ekstrand [Sat, 5 Mar 2016 01:56:12 +0000 (17:56 -0800)]
anv/pipeline: Fix depthBiasEnable on gen7

The first time I tried to fix this, I set the wrong fields.

8 years agoanv/cmd_buffer: Reset the state streams when resetting the command buffer
Jason Ekstrand [Fri, 4 Mar 2016 20:42:03 +0000 (12:42 -0800)]
anv/cmd_buffer: Reset the state streams when resetting the command buffer

8 years agoanv/cmd_buffer: Include Haswell in set_subpass
Jason Ekstrand [Fri, 4 Mar 2016 23:38:11 +0000 (15:38 -0800)]
anv/cmd_buffer: Include Haswell in set_subpass

8 years agoisl: Fix RenderTargetViewExtent for mipmapped 3D surfaces
Nanley Chery [Thu, 3 Mar 2016 23:49:13 +0000 (15:49 -0800)]
isl: Fix RenderTargetViewExtent for mipmapped 3D surfaces

Match the comment stated above the assignment.

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
8 years agoisl: Get rid of isl_surf_fill_state_info::level0_extent_px
Nanley Chery [Thu, 3 Mar 2016 23:40:13 +0000 (15:40 -0800)]
isl: Get rid of isl_surf_fill_state_info::level0_extent_px

This field is no longer needed.

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
8 years agoanv/cmd_buffer: Let the pipeline set StencilBufferWriteEnable on gen9
Jason Ekstrand [Fri, 4 Mar 2016 20:23:01 +0000 (12:23 -0800)]
anv/cmd_buffer: Let the pipeline set StencilBufferWriteEnable on gen9

8 years agoanv/cmd_buffer: Mask stencil reference values
Jason Ekstrand [Fri, 4 Mar 2016 20:22:32 +0000 (12:22 -0800)]
anv/cmd_buffer: Mask stencil reference values

8 years agoanv/clear: Pull the stencil write mask from the pipeline
Jason Ekstrand [Fri, 4 Mar 2016 19:07:27 +0000 (11:07 -0800)]
anv/clear: Pull the stencil write mask from the pipeline

The stencil write mask wasn't getting set at all so we were using whatever
write mask happend to be left over by the application.

8 years agoanv/pipeline: Set StencilBufferWriteEnable from the pipeline
Jason Ekstrand [Fri, 4 Mar 2016 18:45:24 +0000 (10:45 -0800)]
anv/pipeline: Set StencilBufferWriteEnable from the pipeline

The hardware docs say that StencilBufferWriteEnable should only be set if
StencilTestEnable is set.  It seems reasonable to set them together.

8 years agoanv/pipeline: More competent gen8 clipping
Jason Ekstrand [Tue, 1 Mar 2016 21:39:04 +0000 (13:39 -0800)]
anv/pipeline: More competent gen8 clipping

8 years agoanv/pipeline: Use the right provoking vertex for triangle fans
Jason Ekstrand [Fri, 4 Mar 2016 08:02:18 +0000 (00:02 -0800)]
anv/pipeline: Use the right provoking vertex for triangle fans

8 years agoanv/pipeline: Respect pRasterizationState->depthBiasEnable
Jason Ekstrand [Fri, 4 Mar 2016 08:01:25 +0000 (00:01 -0800)]
anv/pipeline: Respect pRasterizationState->depthBiasEnable

8 years agoanv: Fix backwards shadow comparisons
Kenneth Graunke [Fri, 4 Mar 2016 00:43:49 +0000 (16:43 -0800)]
anv: Fix backwards shadow comparisons

sample_c is backwards from what GL and Vulkan expect.

See intel_state.c in i965.

v2: Drop unused vk_to_gen_compare_op.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agohack to make dota 2 menus work
Kenneth Graunke [Fri, 4 Mar 2016 00:21:09 +0000 (16:21 -0800)]
hack to make dota 2 menus work

8 years agoisl/surface_state: Set L2 bypass disable for certain BC* formats
Jason Ekstrand [Fri, 4 Mar 2016 00:15:54 +0000 (16:15 -0800)]
isl/surface_state: Set L2 bypass disable for certain BC* formats

8 years agoanv: Compile shader stages in pipeline order.
Kenneth Graunke [Wed, 24 Feb 2016 23:41:24 +0000 (15:41 -0800)]
anv: Compile shader stages in pipeline order.

Instead of the arbitrary order modules might be specified in.

Acked-by: Jason Ekstrand <jason.ekstrand@intel.com>
8 years agoanv/meta: Delete unused functions
Nanley Chery [Mon, 29 Feb 2016 22:37:48 +0000 (14:37 -0800)]
anv/meta: Delete unused functions

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
8 years agoanv/meta: Use blitter API for state-handling in Buffer Update/Copy
Nanley Chery [Wed, 2 Mar 2016 22:33:51 +0000 (14:33 -0800)]
anv/meta: Use blitter API for state-handling in Buffer Update/Copy

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
8 years agoanv/meta: Use blitter API in do_buffer_copy()
Nanley Chery [Sun, 28 Feb 2016 01:11:55 +0000 (17:11 -0800)]
anv/meta: Use blitter API in do_buffer_copy()

v2: Keep pitch in units of bytes (Jason)

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
8 years agoanv/meta: Use blitter API in anv_CmdCopyImage()
Nanley Chery [Mon, 29 Feb 2016 20:19:51 +0000 (12:19 -0800)]
anv/meta: Use blitter API in anv_CmdCopyImage()

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
8 years agoanv/meta: Use blitter API for copies between Images and Buffers
Nanley Chery [Sun, 28 Feb 2016 01:11:55 +0000 (17:11 -0800)]
anv/meta: Use blitter API for copies between Images and Buffers

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
8 years agoanv/meta: Add function which copies between Buffers and Images
Nanley Chery [Mon, 29 Feb 2016 22:28:25 +0000 (14:28 -0800)]
anv/meta: Add function which copies between Buffers and Images

v2: Keep pitch in units of bytes (Jason)

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
8 years agoanv/meta: Add function to create anv_meta_blit2d_surf from anv_image
Nanley Chery [Wed, 2 Mar 2016 07:15:35 +0000 (23:15 -0800)]
anv/meta: Add function to create anv_meta_blit2d_surf from anv_image

v2: Keep pitch in units of bytes (Jason)

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
8 years agoanv/meta: Implement the blitter API functions
Nanley Chery [Sat, 27 Feb 2016 20:26:21 +0000 (12:26 -0800)]
anv/meta: Implement the blitter API functions

Most of the code in anv_meta_blit2d() is borrowed from do_buffer_copy().

Create an image and image view for each rectangle.
Note: For tiled RGB images, ISL will align the image's row_pitch up to
the nearest tile width.

v2 (Jason):
    Keep pitch in units of bytes
    Make src_format and dst_format variables
    s/dest/dst/ in every usage
v3: Fix dst_image width

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
8 years agoanv/meta: Modify blitter API fields
Nanley Chery [Thu, 25 Feb 2016 23:21:12 +0000 (15:21 -0800)]
anv/meta: Modify blitter API fields

Some fields are unnecessary. The variables "pitch" and "bs" are used
for consistency with ISL.

v2: Keep pitch in units of bytes (Jason)

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
8 years agoanv/meta: Add the beginnings of a blitter API
Jason Ekstrand [Thu, 31 Dec 2015 23:37:54 +0000 (15:37 -0800)]
anv/meta: Add the beginnings of a blitter API

This API is designed to be an abstraction that sits between the VkCmdCopy
commands and the hardware.  The idea is that it is simple enough that it
*should* be implementable using the blitter but with enough extra data that
we can implement it with the 3-D pipeline efficiently.  One design
objective is to allow the user to supply enough information that we can
handle most blit operations with a single draw call even if they require
copying multiple rectangles.

8 years agoanv/meta: Remove redundancies in do_buffer_copy()
Nanley Chery [Sat, 27 Feb 2016 21:29:04 +0000 (13:29 -0800)]
anv/meta: Remove redundancies in do_buffer_copy()

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
8 years agoanv/meta: Replace copy_format w/ block size in do_buffer_copy()
Nanley Chery [Sat, 27 Feb 2016 22:25:00 +0000 (14:25 -0800)]
anv/meta: Replace copy_format w/ block size in do_buffer_copy()

This is a preparatory commit that will simplify the future usage of
this function.

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
8 years agoanv/meta: Add missing command to exit meta in anv_CmdUpdateBuffer()
Nanley Chery [Wed, 2 Mar 2016 22:27:17 +0000 (14:27 -0800)]
anv/meta: Add missing command to exit meta in anv_CmdUpdateBuffer()

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
8 years agoanv/image: Create a linear image when requested
Nanley Chery [Wed, 2 Mar 2016 17:44:48 +0000 (09:44 -0800)]
anv/image: Create a linear image when requested

If a linear image is requested, the only possible result should be a
linearly-tiled surface.

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
8 years agoisl: Don't filter tiling flags if a specific tiling bit is set
Nanley Chery [Wed, 2 Mar 2016 01:32:14 +0000 (17:32 -0800)]
isl: Don't filter tiling flags if a specific tiling bit is set

If a specific bit is set, the intention to create a surface with a
specific tiling format should be respected.

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
8 years agoisl: Add function to get intratile offsets from x/y offsets
Nanley Chery [Fri, 26 Feb 2016 22:49:51 +0000 (14:49 -0800)]
isl: Add function to get intratile offsets from x/y offsets

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
8 years agoanv/util: Fix vector resizing
Jason Ekstrand [Thu, 3 Mar 2016 16:17:36 +0000 (08:17 -0800)]
anv/util: Fix vector resizing

It wasn't properly handling the fact that wrap-around in the source may not
translate to wrap-around in the destination.  This really needs unit tests.

8 years agoanv/gen7: Use predicated rendering for indirect compute
Jordan Justen [Wed, 2 Mar 2016 09:11:29 +0000 (01:11 -0800)]
anv/gen7: Use predicated rendering for indirect compute

For OpenGL, see commit 9a939ebb47a0d37a6b29e3dbb1b20bdc9538a721.

Fixes:
 * dEQP-VK.compute.indirect_dispatch.upload_buffer.empty_command
 * dEQP-VK.compute.indirect_dispatch.gen_in_compute.empty_command

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
8 years agoanv: Save batch to local variable for indirect compute
Jordan Justen [Wed, 2 Mar 2016 09:09:16 +0000 (01:09 -0800)]
anv: Save batch to local variable for indirect compute

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
8 years agoanv: Fix make check
Jason Ekstrand [Wed, 2 Mar 2016 19:31:32 +0000 (11:31 -0800)]
anv: Fix make check

8 years agoisl: Fix make check
Jason Ekstrand [Wed, 2 Mar 2016 19:31:22 +0000 (11:31 -0800)]
isl: Fix make check

8 years agogen8/cmd_buffer: Properly return flushed push constant stages
Jason Ekstrand [Wed, 2 Mar 2016 18:46:13 +0000 (10:46 -0800)]
gen8/cmd_buffer: Properly return flushed push constant stages

This is required on SKL so that we can properly re-emit binding table
pointers commands.

8 years agoanv/meta_blit: Use unorm formats for 8 and 16-bit RGB and RGBA values
Jason Ekstrand [Wed, 2 Mar 2016 01:19:43 +0000 (17:19 -0800)]
anv/meta_blit: Use unorm formats for 8 and 16-bit RGB and RGBA values

While Broadwell is very good about UINT formats, HSW is more restrictive.
Neither R8G8B8_UINT nor R16G16B16_UINT really exist on HSW.  It should be
safe to just use the unorm formats.

8 years agoMerge remote-tracking branch 'origin/master' into vulkan
Kenneth Graunke [Wed, 2 Mar 2016 00:26:09 +0000 (16:26 -0800)]
Merge remote-tracking branch 'origin/master' into vulkan

8 years agogenxml: Make the border color pointer consistent across gens
Jason Ekstrand [Tue, 1 Mar 2016 22:43:05 +0000 (14:43 -0800)]
genxml: Make the border color pointer consistent across gens

8 years agogen7/pipeline: Add competent blending
Jason Ekstrand [Tue, 1 Mar 2016 21:51:50 +0000 (13:51 -0800)]
gen7/pipeline: Add competent blending

This is mostly a copy-and-paste from gen8.  Blending still isn't 100% but
it fixes about 1100 CTS blend tests on HSW.

8 years agoanv: Unify gen7 and gen8 state
Jason Ekstrand [Tue, 1 Mar 2016 19:38:11 +0000 (11:38 -0800)]
anv: Unify gen7 and gen8 state

Now that we've pulled surface state setup into ISL, there's not much to do
here.

8 years agomesa: Remove NV_fragment_program remnants from dlist.c.
Matt Turner [Sat, 27 Feb 2016 23:30:09 +0000 (15:30 -0800)]
mesa: Remove NV_fragment_program remnants from dlist.c.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Brian Paul <brianp@vmware.com>
8 years agomesa: Remove NV_fragment_program_option enable bit.
Matt Turner [Sat, 27 Feb 2016 22:24:58 +0000 (14:24 -0800)]
mesa: Remove NV_fragment_program_option enable bit.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Brian Paul <brianp@vmware.com>
8 years agoprogram: Remove NV_fragment_program opcode parsing.
Matt Turner [Sat, 27 Feb 2016 22:05:17 +0000 (14:05 -0800)]
program: Remove NV_fragment_program opcode parsing.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Brian Paul <brianp@vmware.com>
8 years agoprogram: Remove NV_fragment_program scalar suffix parsing.
Matt Turner [Mon, 29 Feb 2016 22:47:43 +0000 (14:47 -0800)]
program: Remove NV_fragment_program scalar suffix parsing.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Brian Paul <brianp@vmware.com>
8 years agoprogram: Remove NV_fragment_program_option parsing support.
Matt Turner [Sat, 27 Feb 2016 22:05:42 +0000 (14:05 -0800)]
program: Remove NV_fragment_program_option parsing support.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Brian Paul <brianp@vmware.com>
8 years agoprogram: Remove NV_fragment_program Abs support.
Matt Turner [Sat, 27 Feb 2016 22:04:30 +0000 (14:04 -0800)]
program: Remove NV_fragment_program Abs support.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Brian Paul <brianp@vmware.com>
8 years agoprogram: Remove incorrect comment about OPCODE_TXD.
Matt Turner [Sat, 27 Feb 2016 21:55:27 +0000 (13:55 -0800)]
program: Remove incorrect comment about OPCODE_TXD.

The table in prog_instruction.h is correct.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Brian Paul <brianp@vmware.com>
8 years agoprogram: Remove OPCODE_TXP_NV.
Matt Turner [Sat, 27 Feb 2016 21:53:50 +0000 (13:53 -0800)]
program: Remove OPCODE_TXP_NV.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Brian Paul <brianp@vmware.com>
8 years agoprogram: Clean up after previous commit.
Matt Turner [Sat, 27 Feb 2016 21:29:32 +0000 (13:29 -0800)]
program: Clean up after previous commit.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Brian Paul <brianp@vmware.com>
8 years agoprogram: Remove condition-code and precision support.
Matt Turner [Sat, 27 Feb 2016 19:06:25 +0000 (11:06 -0800)]
program: Remove condition-code and precision support.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Brian Paul <brianp@vmware.com>
8 years agoprogram: Remove OPCODE_KIL_NV.
Matt Turner [Sat, 27 Feb 2016 21:19:50 +0000 (13:19 -0800)]
program: Remove OPCODE_KIL_NV.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Brian Paul <brianp@vmware.com>
8 years agoprogram: Remove RelAddr2 support.
Matt Turner [Sat, 27 Feb 2016 21:44:50 +0000 (13:44 -0800)]
program: Remove RelAddr2 support.

Looks like more never-used crap from the first geometry shader attempt.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Brian Paul <brianp@vmware.com>
8 years agoprogram: Mark table const.
Matt Turner [Sat, 27 Feb 2016 22:15:26 +0000 (14:15 -0800)]
program: Mark table const.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Brian Paul <brianp@vmware.com>