mesa.git
5 years agoiris: Fill out brw_image_params for storage images on Broadwell
Kenneth Graunke [Fri, 30 Nov 2018 10:27:07 +0000 (02:27 -0800)]
iris: Fill out brw_image_params for storage images on Broadwell

5 years agoiris: Don't make duplicate system values
Kenneth Graunke [Thu, 27 Dec 2018 09:27:44 +0000 (01:27 -0800)]
iris: Don't make duplicate system values

We were relying on CSE/GVN/etc to coalesce all intrinsics that load the
same value, but that's a bad idea.  We might have a couple intrinsics
that reload the same value.  If so, we only want to set up the uniform
on the first one we see.

5 years agoiris: Don't enable push constants just because there are system values
Kenneth Graunke [Thu, 27 Dec 2018 08:49:56 +0000 (00:49 -0800)]
iris: Don't enable push constants just because there are system values

System values are built-in uniforms.  We set them up as UBO values, and
might pull or push them.  UBO push analysis will take care of that.  We
only want to enable push constants if there's an actual range being
pushed.  Otherwise, we might get into a scenario where 3DSTATE_PS
enables push constants but 3DSTATE_CONSTANT_PS isn't pushing anything.

This fixes GPU hangs in Broadwell image load store tests which have
unused image param system values but no other uniforms.  (We shouldn't
be making those anyway, but that's a separate fix...)

5 years agoiris: Fix framebuffer layer count
Kenneth Graunke [Mon, 24 Dec 2018 02:22:44 +0000 (18:22 -0800)]
iris: Fix framebuffer layer count

cso_fb->layers is only valid for no-attachment framebuffers.  Use the
helper function to get the real value, then stash it so we don't have
to call the helper function on the old value for comparison, or at draw
time for Force Zero RTA Index setting.

This fixes Force Zero RTA Index being set even when attempting layered
rendering.

5 years agoiris: handle qbo fragment shader invocation workaround
Dave Airlie [Fri, 9 Nov 2018 02:13:30 +0000 (12:13 +1000)]
iris: handle qbo fragment shader invocation workaround

5 years agoiris: add fs invocations query workaround for broadwell
Dave Airlie [Thu, 8 Nov 2018 07:46:22 +0000 (17:46 +1000)]
iris: add fs invocations query workaround for broadwell

5 years agoiris: setup gen8 caps
Dave Airlie [Thu, 8 Nov 2018 00:38:48 +0000 (10:38 +1000)]
iris: setup gen8 caps

5 years agoiris: limit gen8 to 8 samples
Dave Airlie [Thu, 8 Nov 2018 00:20:54 +0000 (10:20 +1000)]
iris: limit gen8 to 8 samples

5 years agoiris/WIP: add broadwell support
Dave Airlie [Wed, 7 Nov 2018 04:23:27 +0000 (14:23 +1000)]
iris/WIP: add broadwell support

This adds all the state changes, MOCS changes,

5 years agoiris: Delete bogus comment about cube array counting.
Kenneth Graunke [Sun, 23 Dec 2018 07:09:16 +0000 (23:09 -0800)]
iris: Delete bogus comment about cube array counting.

Both 'z' and 'depth' are counted in slices, according to the Gallium
docs (context.rst).  In our temporary memory, we allocate `box.depth`
slices, so we need to rebase the starting slice (box.z) down to 0,
and back again when writing on unmap.

There's nothing strange about cubes here.

5 years agoiris: Fix compute scratch pinning
Kenneth Graunke [Fri, 21 Dec 2018 09:00:34 +0000 (01:00 -0800)]
iris: Fix compute scratch pinning

Thanks to Eero Tamminen for helping catch this.

5 years agoiris: Add a more long term TODO about timebase scaling
Kenneth Graunke [Fri, 14 Dec 2018 08:51:00 +0000 (00:51 -0800)]
iris: Add a more long term TODO about timebase scaling

5 years agoiris: Only resolve inputs for actual shader stages
Kenneth Graunke [Thu, 20 Dec 2018 04:34:55 +0000 (20:34 -0800)]
iris: Only resolve inputs for actual shader stages

We don't need to consider compute at render time, and don't need to
consider disabled stages.  4% on drawoverhead.

5 years agoiris: Fix assertion in iris_resource_from_handle() tiling usage
Rhys Kidd [Mon, 17 Dec 2018 06:25:11 +0000 (01:25 -0500)]
iris: Fix assertion in iris_resource_from_handle() tiling usage

Assertion error:

  iris_resource_from_handle: Assertion `res->bo->tiling_mode ==
      isl_tiling_to_i915_tiling(res->surf.tiling)' failed.

This patch fixes 16 piglit tests on KBL:
glx/glx-multithread-texture
glx/glx-query-drawable-glx_fbconfig_id-glxpbuffer
glx/glx-query-drawable-glx_fbconfig_id-glxpixmap
glx/glx-query-drawable-glx_preserved_contents
glx/glx-query-drawable-glxpbuffer-glx_height
glx/glx-query-drawable-glxpbuffer-glx_width
glx/glx-query-drawable-glxpixmap-glx_height
glx/glx-query-drawable-glxpixmap-glx_width
glx/glx-swap-pixmap
glx/glx-swap-pixmap-bad
glx/glx-tfp
glx/glx-visuals-depth -pixmap
glx/glx-visuals-stencil -pixmap
spec/egl 1.4/eglcreatepbuffersurface and then glclear
spec/egl 1.4/largest possible eglcreatepbuffersurface and then glclear
spec/egl_nok_texture_from_pixmap/basic

Cc: Kenneth Graunke <kenneth@whitecape.org>
Cc: Jason Ekstrand <jason.ekstrand@intel.com>
Signed-off-by: Rhys Kidd <rhyskidd@gmail.com>
5 years agoiris: Fix scratch space allocation on Icelake.
Kenneth Graunke [Fri, 14 Dec 2018 23:48:07 +0000 (15:48 -0800)]
iris: Fix scratch space allocation on Icelake.

Gen9-10 have fewer than 4 subslices per slice, so they need this to be
rounded up.  Gen11 isn't documented as needing this hack, and it can
also have more than 4 subslices, so the hack actually can break things.

Fixes tests/spec/arb_enhanced_layouts/execution/component-layout/
sso-vs-gs-fs-array-interleave

5 years agoiris: better MOCS
Kenneth Graunke [Wed, 12 Dec 2018 08:02:25 +0000 (00:02 -0800)]
iris: better MOCS

5 years agoiris: fix gpu calcs for timestamp queries
Dave Airlie [Fri, 14 Dec 2018 04:05:27 +0000 (14:05 +1000)]
iris: fix gpu calcs for timestamp queries

5 years agoiris: only mark depth/stencil as writable if writes are actually enabled
Kenneth Graunke [Wed, 12 Dec 2018 10:03:57 +0000 (02:03 -0800)]
iris: only mark depth/stencil as writable if writes are actually enabled

5 years agoiris: more dead comments
Kenneth Graunke [Wed, 12 Dec 2018 09:52:23 +0000 (01:52 -0800)]
iris: more dead comments

5 years agoiris: pin and re-pin the scratch BO
Kenneth Graunke [Wed, 12 Dec 2018 09:41:39 +0000 (01:41 -0800)]
iris: pin and re-pin the scratch BO

5 years agoiris: delete finished comments
Kenneth Graunke [Wed, 12 Dec 2018 06:51:15 +0000 (22:51 -0800)]
iris: delete finished comments

5 years agoiris: always pin the binder...in the compute context, too.
Kenneth Graunke [Wed, 12 Dec 2018 06:46:40 +0000 (22:46 -0800)]
iris: always pin the binder...in the compute context, too.

not sure why this hasn't tripped things up

5 years agoiris: Track blend enables, save outbound for resolve code
Kenneth Graunke [Tue, 11 Dec 2018 07:22:54 +0000 (23:22 -0800)]
iris: Track blend enables, save outbound for resolve code

5 years agoiris: whitespace fixes
Kenneth Graunke [Mon, 10 Dec 2018 08:49:35 +0000 (00:49 -0800)]
iris: whitespace fixes

5 years agoiris: Make a alloc_surface_state helper
Kenneth Graunke [Fri, 7 Dec 2018 19:20:39 +0000 (11:20 -0800)]
iris: Make a alloc_surface_state helper

This does the gtt_offset addition for us

5 years agoiris: Use a surface state fill helper
Kenneth Graunke [Fri, 7 Dec 2018 07:29:20 +0000 (23:29 -0800)]
iris: Use a surface state fill helper

This will check aux_usage eventually

5 years agoiris: don't print the pointer in INTEL_DEBUG=submit
Kenneth Graunke [Sat, 8 Dec 2018 19:21:48 +0000 (11:21 -0800)]
iris: don't print the pointer in INTEL_DEBUG=submit

lots of noise in diff, hope was it would be useful for gdb, but the
the GEM handle is good enough

5 years agoiris: Fix the prototype for iris_bo_alloc_tiled
Kenneth Graunke [Fri, 7 Dec 2018 07:05:14 +0000 (23:05 -0800)]
iris: Fix the prototype for iris_bo_alloc_tiled

This now matches the actual function in iris_bufmgr.c, as well as the
equivalent brw_bufmgr.c function...

5 years agoiris: Fix for PIPE_CAP_SIGNED_VERTEX_BUFFER_OFFSET
Kenneth Graunke [Wed, 5 Dec 2018 11:30:42 +0000 (03:30 -0800)]
iris: Fix for PIPE_CAP_SIGNED_VERTEX_BUFFER_OFFSET

This fixes ext_transform_feedback-builtin-varyings gl_Position after the
combination of my transform feedback reworks and my vertex buffer
reworks (?)

5 years agoiris: drop unnecessary genx->streamout field
Kenneth Graunke [Wed, 5 Dec 2018 11:16:54 +0000 (03:16 -0800)]
iris: drop unnecessary genx->streamout field

5 years agoiris: Implement DrawTransformFeedback()
Kenneth Graunke [Wed, 5 Dec 2018 06:19:33 +0000 (22:19 -0800)]
iris: Implement DrawTransformFeedback()

We get the count by dividing the offset by the stride.

5 years agoiris: Copy anv's MI_MATH helpers for multiplication and division
Jason Ekstrand [Wed, 5 Dec 2018 06:00:33 +0000 (22:00 -0800)]
iris: Copy anv's MI_MATH helpers for multiplication and division

(import done by Ken but with author set to Jason because it's his
code that's being imported, so he deserves the credit)

5 years agoiris: only get space for one offset in stream output targets
Kenneth Graunke [Wed, 5 Dec 2018 09:16:23 +0000 (01:16 -0800)]
iris: only get space for one offset in stream output targets

Target corresponds to a buffer, buffer only records one offset, not
multiple.

5 years agoiris: Move iris_stream_output_target def to iris_context.h
Kenneth Graunke [Wed, 5 Dec 2018 08:57:07 +0000 (00:57 -0800)]
iris: Move iris_stream_output_target def to iris_context.h

now that it doesn't have genxml

5 years agoiris: Don't bother packing 3DSTATE_SO_BUFFER at create time
Kenneth Graunke [Wed, 5 Dec 2018 08:55:45 +0000 (00:55 -0800)]
iris: Don't bother packing 3DSTATE_SO_BUFFER at create time

We have to do half the packet late anyway, we may as well just do it
all at set time.  This also lets us move the struct def out of genxml

5 years agoiris: Add _MI_ALU helpers that don't paste
Kenneth Graunke [Wed, 5 Dec 2018 06:04:16 +0000 (22:04 -0800)]
iris: Add _MI_ALU helpers that don't paste

This lets you pass arguments as function parameters

5 years agoiris: Reorder LRR parameters to have dst first.
Kenneth Graunke [Wed, 5 Dec 2018 06:02:50 +0000 (22:02 -0800)]
iris: Reorder LRR parameters to have dst first.

LRI and LRM both put dst first, be consistent.

5 years agoiris: rewrite set_vertex_buffer and VB handling
Kenneth Graunke [Wed, 5 Dec 2018 00:38:14 +0000 (16:38 -0800)]
iris: rewrite set_vertex_buffer and VB handling

I was using the Gallium API wrong.  set_* functions with start_slot
and count parameters are supposed to update a subrange of the items.
I had been trashing all bound vertex buffers and starting over.

This should hopefully also make it easier to slot in additional
VERTEX_BUFFER_STATEs at draw time, say, for shader draw parameters.

5 years agoiris: handle PatchVerticesIn as a system value.
Kenneth Graunke [Tue, 4 Dec 2018 22:11:51 +0000 (14:11 -0800)]
iris: handle PatchVerticesIn as a system value.

5 years agoiris: add Android build
Tapani Pälli [Mon, 3 Dec 2018 12:15:13 +0000 (14:15 +0200)]
iris: add Android build

Note that at least following additional libs/components require changes
since they refer to BOARD_GPU_DRIVERS variable which is used to select
the driver:

  - mixins
  - minigbm
  - libdrm
  - drm_gralloc

v2: (feedback by Gustaw Smolarczyk) Fix trailing \ in a few cases

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
5 years agoiris: override alpha to one src1 blend factors
Kenneth Graunke [Tue, 4 Dec 2018 08:18:41 +0000 (00:18 -0800)]
iris: override alpha to one src1 blend factors

No idea why this used to pass and doesn't after updating...seems like
we should have been handling it all along...

5 years agoiris: Always do rasterizer discard in clipper
Kenneth Graunke [Mon, 3 Dec 2018 10:59:08 +0000 (02:59 -0800)]
iris: Always do rasterizer discard in clipper

but continue doing it in SOL if possible because it's faster

Fixes ./bin/ext_transform_feedback-discard-drawarrays - simpler too

5 years agoiris: Fix primitive generated query active flag
Kenneth Graunke [Mon, 3 Dec 2018 10:59:08 +0000 (02:59 -0800)]
iris: Fix primitive generated query active flag

5 years agoiris: Enable guardband clipping
Kenneth Graunke [Mon, 3 Dec 2018 10:08:23 +0000 (02:08 -0800)]
iris: Enable guardband clipping

5 years agoiris: Clamp viewport extents to the framebuffer dimensions
Kenneth Graunke [Mon, 3 Dec 2018 10:02:49 +0000 (02:02 -0800)]
iris: Clamp viewport extents to the framebuffer dimensions

Fixes arb_framebuffer_no_attachments-query's resize subtest.

5 years agoiris: Fix clear dimensions
Kenneth Graunke [Mon, 3 Dec 2018 09:03:17 +0000 (01:03 -0800)]
iris: Fix clear dimensions

Fixes depthstencil-render-miplevels 1024 s=z24_s8

5 years agoiris: Drop continues in resolve
Kenneth Graunke [Mon, 3 Dec 2018 07:30:09 +0000 (23:30 -0800)]
iris: Drop continues in resolve

Now that we u_bit_scan we know it exists

5 years agoiris: Replace num_textures etc with a bitmask we can scan
Kenneth Graunke [Mon, 3 Dec 2018 07:17:44 +0000 (23:17 -0800)]
iris: Replace num_textures etc with a bitmask we can scan

More accurate bounds, plus can skip dead ones

5 years agoiris: Fix set_sampler_views with start > 0
Kenneth Graunke [Mon, 3 Dec 2018 07:15:41 +0000 (23:15 -0800)]
iris: Fix set_sampler_views with start > 0

5 years agoiris: fix set_sampler_views to not unbind, be better about bounds
Kenneth Graunke [Mon, 3 Dec 2018 07:07:27 +0000 (23:07 -0800)]
iris: fix set_sampler_views to not unbind, be better about bounds

5 years agoiris: fix overhead regression from flushing for storage images
Kenneth Graunke [Mon, 3 Dec 2018 07:03:08 +0000 (23:03 -0800)]
iris: fix overhead regression from flushing for storage images

st calls us with count = 32 but a NULL pointer...we only really care
about the highest non-NULL image...

5 years agoiris: Fix NOS mechanism
Kenneth Graunke [Mon, 3 Dec 2018 06:30:07 +0000 (22:30 -0800)]
iris: Fix NOS mechanism

Set bits, not values

5 years agoiris: re-pin inherited streamout buffers
Kenneth Graunke [Mon, 3 Dec 2018 00:06:01 +0000 (16:06 -0800)]
iris: re-pin inherited streamout buffers

5 years agoiris: reemit SBE when sprite coord origin changes
Kenneth Graunke [Sun, 2 Dec 2018 23:52:46 +0000 (15:52 -0800)]
iris: reemit SBE when sprite coord origin changes

fixes arb_point_sprite-checkerboard

5 years agoiris: omask can kill
Kenneth Graunke [Sun, 2 Dec 2018 23:41:13 +0000 (15:41 -0800)]
iris: omask can kill

5 years agoiris: reject all clipping when we can't use streamout render disabled
Kenneth Graunke [Sun, 2 Dec 2018 22:51:52 +0000 (14:51 -0800)]
iris: reject all clipping when we can't use streamout render disabled

5 years agoiris: make clipper statistics dynamic
Kenneth Graunke [Sun, 2 Dec 2018 22:39:29 +0000 (14:39 -0800)]
iris: make clipper statistics dynamic

5 years agoiris: CS stall for stream out -> VB
Kenneth Graunke [Sun, 2 Dec 2018 22:16:08 +0000 (14:16 -0800)]
iris: CS stall for stream out -> VB

i965 doesn't do this, but I suspect it just stalls a lot and doesn't hit
this.  Fixes ext_transform_feedback-position render among others.

5 years agoiris: fix dma buf import strides
Kenneth Graunke [Sun, 2 Dec 2018 21:37:55 +0000 (13:37 -0800)]
iris: fix dma buf import strides

5 years agoiris: fix alpha channel for RGB BC1 formats
Kenneth Graunke [Sun, 2 Dec 2018 01:07:09 +0000 (17:07 -0800)]
iris: fix alpha channel for RGB BC1 formats

5 years agoiris: Allocate buffer resources separately
Jason Ekstrand [Thu, 25 Oct 2018 22:02:56 +0000 (17:02 -0500)]
iris: Allocate buffer resources separately

(cleaned up by Ken - make sure a bunch of things were more obviously
not using res->surf, do allow checking res->surf.tiling == LINEAR,
drop format cpp checks that aren't needed, drop memzone handling for
images, assume buffers / non-buffers in a few places...)

5 years agoiris: Don't bother considering if the underlying surface is a cube
Kenneth Graunke [Fri, 30 Nov 2018 07:03:20 +0000 (23:03 -0800)]
iris: Don't bother considering if the underlying surface is a cube

Dave fixed it to consider whether the sampler view is a cube.
With that, there's no point (possibly harm) in looking if the original
resource was a cube...if it's an array view, we don't want to treat it
as a cube anymore...

5 years agoiris: move some non-buffer case code in a bit
Kenneth Graunke [Fri, 30 Nov 2018 06:23:34 +0000 (22:23 -0800)]
iris: move some non-buffer case code in a bit

5 years agoiris: Stop leaking iris_uncompiled_shaders like mad
Kenneth Graunke [Thu, 29 Nov 2018 00:43:21 +0000 (16:43 -0800)]
iris: Stop leaking iris_uncompiled_shaders like mad

Now shader-db actually executes.  We still need a plan for culling
dead iris_compiled_shaders...

5 years agoiris: Destroy the bufmgr
Kenneth Graunke [Wed, 28 Nov 2018 23:23:13 +0000 (15:23 -0800)]
iris: Destroy the bufmgr

Plugs a 12360 byte leak

5 years agoiris: Fix IRIS_MEMZONE_COUNT to exclude the border color pool
Kenneth Graunke [Wed, 28 Nov 2018 23:29:38 +0000 (15:29 -0800)]
iris: Fix IRIS_MEMZONE_COUNT to exclude the border color pool

This is supposed to exclude single address zones.  We were getting
too many VMA allocators but failing to set them up, which worked out
because we also forgot to destroy them...

5 years agoiris: Unref unbound_tex resource
Kenneth Graunke [Wed, 28 Nov 2018 23:22:07 +0000 (15:22 -0800)]
iris: Unref unbound_tex resource

Plugs a 12536 byte leak

5 years agoiris: Destroy the border color pool
Kenneth Graunke [Wed, 28 Nov 2018 23:15:21 +0000 (15:15 -0800)]
iris: Destroy the border color pool

This plugs a 12224 byte leak

5 years agoiris: Destroy transfer helper on screen teardown
Kenneth Graunke [Wed, 28 Nov 2018 23:10:07 +0000 (15:10 -0800)]
iris: Destroy transfer helper on screen teardown

Plugs a 16 byte leak

5 years agoiris: Fix failed to compile TCS message
Kenneth Graunke [Wed, 28 Nov 2018 23:06:00 +0000 (15:06 -0800)]
iris: Fix failed to compile TCS message

5 years agoiris: Rework tiling/modifiers handling
Kenneth Graunke [Wed, 28 Nov 2018 10:30:42 +0000 (02:30 -0800)]
iris: Rework tiling/modifiers handling

We were being very picky about things being Y tiled.  But, not
everything can be - for example, > 16382 surfaces on SKL GT1-3
have to fall back to linear.

Instead, give ISL options and let it pick.

5 years agoiris: fix conditional compute, don't stomp predicate for pipelined queries
Kenneth Graunke [Tue, 27 Nov 2018 23:30:16 +0000 (15:30 -0800)]
iris: fix conditional compute, don't stomp predicate for pipelined queries

5 years agoiris: check query first
Kenneth Graunke [Tue, 27 Nov 2018 22:20:48 +0000 (14:20 -0800)]
iris: check query first

this lets us avoid the predicate bit in more cases, which is nice

5 years agoiris: for BLORP, only use the predicate enable bit when USE_BIT
Kenneth Graunke [Tue, 27 Nov 2018 04:55:59 +0000 (20:55 -0800)]
iris: for BLORP, only use the predicate enable bit when USE_BIT

5 years agoiris: add conditional render support
Dave Airlie [Mon, 26 Nov 2018 23:03:16 +0000 (09:03 +1000)]
iris: add conditional render support

5 years agoiris: drop key_size_for_cache
Kenneth Graunke [Tue, 27 Nov 2018 23:35:48 +0000 (15:35 -0800)]
iris: drop key_size_for_cache

dead since my program cache API rework.  we could still use it for one
function, but it's so trivial to pass the size, that it's probably not
worth the extra code

5 years agoiris: iris add load register reg32/64
Dave Airlie [Fri, 9 Nov 2018 02:13:17 +0000 (12:13 +1000)]
iris: iris add load register reg32/64

These will be needed for broadwell and conditional render

5 years agoiris: execute compute related query on compute batch.
Dave Airlie [Tue, 27 Nov 2018 03:42:58 +0000 (13:42 +1000)]
iris: execute compute related query on compute batch.

This only happens for the compute invocations query.

5 years agoiris: fix cube texture view
Dave Airlie [Tue, 27 Nov 2018 03:02:03 +0000 (13:02 +1000)]
iris: fix cube texture view

5 years agoiris: fix some SO overflow query bugs and tidy the code a bit
Kenneth Graunke [Mon, 26 Nov 2018 22:59:17 +0000 (14:59 -0800)]
iris: fix some SO overflow query bugs and tidy the code a bit

5 years agoiris: add initial transform feedback overflow query paths (V3)
Dave Airlie [Mon, 26 Nov 2018 05:22:48 +0000 (15:22 +1000)]
iris: add initial transform feedback overflow query paths (V3)

v2: fix cpu overflow calc
v3: use a struct

5 years agoiris: actually flush for storage images
Kenneth Graunke [Mon, 26 Nov 2018 03:03:43 +0000 (19:03 -0800)]
iris: actually flush for storage images

5 years agoiris: add an extra BT assert from Chris Wilson
Kenneth Graunke [Sat, 24 Nov 2018 10:55:40 +0000 (02:55 -0800)]
iris: add an extra BT assert from Chris Wilson

5 years agoiris: add assertions about binding table starts
Kenneth Graunke [Sat, 24 Nov 2018 03:12:36 +0000 (19:12 -0800)]
iris: add assertions about binding table starts

5 years agoiris: drop pull constant binding table entry
Kenneth Graunke [Fri, 23 Nov 2018 21:01:47 +0000 (13:01 -0800)]
iris: drop pull constant binding table entry

nothing uses this

5 years agoiris: Use program's num textures not the state tracker's bound
Kenneth Graunke [Fri, 23 Nov 2018 19:47:55 +0000 (11:47 -0800)]
iris: Use program's num textures not the state tracker's bound

the state tracker might bind more textures than the program is using.

5 years agoiris: Enable precompiles
Kenneth Graunke [Thu, 22 Nov 2018 10:55:27 +0000 (02:55 -0800)]
iris: Enable precompiles

5 years agoiris: rework program cache interface
Kenneth Graunke [Thu, 22 Nov 2018 02:15:28 +0000 (18:15 -0800)]
iris: rework program cache interface

This exposes iris_upload_shader() without having to bind it, which will
be useful for precompiles.  It also lets us examine the old programs and
flag dirty bits at a higher level, rather than cramming all that
knowledge into the cache layer.

5 years agoiris: Use wrappers for create_xs_state rather than a switch statement
Kenneth Graunke [Thu, 22 Nov 2018 01:02:02 +0000 (17:02 -0800)]
iris: Use wrappers for create_xs_state rather than a switch statement

5 years agoiris: fix comment location
Kenneth Graunke [Thu, 22 Nov 2018 00:53:09 +0000 (16:53 -0800)]
iris: fix comment location

5 years agoiris: export iris_upload_shader
Kenneth Graunke [Thu, 22 Nov 2018 00:45:14 +0000 (16:45 -0800)]
iris: export iris_upload_shader

5 years agoiris: fix prototype warning
Kenneth Graunke [Thu, 22 Nov 2018 00:45:35 +0000 (16:45 -0800)]
iris: fix prototype warning

5 years agoiris: Re-pin even if nothing is dirty
Kenneth Graunke [Wed, 21 Nov 2018 19:54:37 +0000 (11:54 -0800)]
iris: Re-pin even if nothing is dirty

5 years agoiris: Flush for history at various moments
Kenneth Graunke [Wed, 21 Nov 2018 09:03:48 +0000 (01:03 -0800)]
iris: Flush for history at various moments

When we blit, transfer, or copy_resource to a buffer, we need to flush
to ensure any stale data for that buffer is invalidated in the caches.

bind_history will inform us which caches need to be flushed.

Also, for any push constant buffers, we need to flag those dirty so
that we re-emit 3DSTATE_CONSTANT_*, causing the data to be re-pushed.

5 years agoiris: add iris_flush_and_dirty_for_history
Kenneth Graunke [Wed, 21 Nov 2018 08:52:25 +0000 (00:52 -0800)]
iris: add iris_flush_and_dirty_for_history

5 years agoiris: Track a binding history for buffer resources
Kenneth Graunke [Wed, 21 Nov 2018 08:38:49 +0000 (00:38 -0800)]
iris: Track a binding history for buffer resources

This will let us know what caches to flush / state to dirty when
altering the contents of a buffer.

5 years agoiris: drop long dead XXX comment
Kenneth Graunke [Wed, 21 Nov 2018 19:37:12 +0000 (11:37 -0800)]
iris: drop long dead XXX comment

5 years agoiris: Do the 48-bit vertex buffer address invalidation workaround
Kenneth Graunke [Wed, 21 Nov 2018 08:06:46 +0000 (00:06 -0800)]
iris: Do the 48-bit vertex buffer address invalidation workaround

5 years agoiris: Fix VIEWPORT/LAYER in stream output info
Kenneth Graunke [Wed, 21 Nov 2018 07:03:16 +0000 (23:03 -0800)]
iris: Fix VIEWPORT/LAYER in stream output info

Fixes glsl-1.50-transform-feedback-builtins and
ext_transform_feedback-builtin-varyings gl_PointSize

5 years agoiris: Fix buffer -> buffer copy_region
Kenneth Graunke [Wed, 21 Nov 2018 06:51:26 +0000 (22:51 -0800)]
iris: Fix buffer -> buffer copy_region

Size can be too large for a surf, blorp_buffer_copy chops things up
into segments we can actually handle

Fixes map_buffer_range_test and copy_buffer_coherency