[Mesa-dev] [PATCH 5/5] i965: Allow only one slot of clip distances to be set on Gen4-5.

2018-11-09 Thread Kenneth Graunke
The existing backend code assumed that if VARYING_SLOT_CLIP_DIST0 was written, then VARYING_SLOT_CLIP_DIST1 would be as well. That's true with the current lowering, but not necessary if there are 4 or fewer clip distances. Separate out the checks to allow this. The new NIR-based lowering will tr

[Mesa-dev] [PATCH 3/5] nir: Save nir_variable pointers in nir_lower_clip_vs rather than locs.

2018-11-09 Thread Kenneth Graunke
I'll want the variables in the next patch. --- src/compiler/nir/nir_lower_clip.c | 24 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/src/compiler/nir/nir_lower_clip.c b/src/compiler/nir/nir_lower_clip.c index ced6d31c117..2299f746305 100644 --- a/src/comp

[Mesa-dev] [PATCH 4/5] nir: Make nir_lower_clip_vs optionally work with variables.

2018-11-09 Thread Kenneth Graunke
The way nir_lower_clip_vs() works with store_output intrinsics makes a ton of assumptions about the driver_location field. In i965, I'd rather do this lowering early and work with variables. ir3 and vc4 could probably do that as well, but I'm not sure exactly what paths would need updating, so for

[Mesa-dev] [PATCH 1/5] nir: Use nir_shader_get_entrypoint in nir_lower_clip_vs().

2018-11-09 Thread Kenneth Graunke
--- src/compiler/nir/nir_lower_clip.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/compiler/nir/nir_lower_clip.c b/src/compiler/nir/nir_lower_clip.c index 7081295a500..013645101f2 100644 --- a/src/compiler/nir/nir_lower_clip.c +++ b/src/compiler/nir/nir_lower_clip

Re: [Mesa-dev] [PATCH 6/9] intel/fs: Use the new nir_src_is_const and friends

2018-11-07 Thread Kenneth Graunke
On Wednesday, November 7, 2018 1:45:59 PM PST Jason Ekstrand wrote: > On Wed, Nov 7, 2018 at 12:20 PM Kenneth Graunke > wrote: > > > On Saturday, October 20, 2018 10:55:44 AM PST Jason Ekstrand wrote: > > > @@ -553,14 +552,18 @@ > > fs_visitor::optimize_frontfacin

Re: [Mesa-dev] [PATCH] i965: Lift restriction in external textures for EGLImage support

2018-11-07 Thread Kenneth Graunke
On Wednesday, October 31, 2018 5:12:40 PM PST Aditya Swarup wrote: > For Intel platforms, we support external textures only for EGLImages > created with EGL_EXT_image_dma_buf_import. This restriction seems to > be Intel specific and not present for other platforms. > > While running SKQP test - un

Re: [Mesa-dev] [PATCH 6/9] intel/fs: Use the new nir_src_is_const and friends

2018-11-07 Thread Kenneth Graunke
the condition. Normally I wouldn't mind, but I'm a bit paranoid about float equality in assertions. It's probably fine, though, since we ensured fabsf is 1.0f earlier... Patches 5-9 are: Reviewed-by: Kenneth Graunke signature.asc Description: This is a digitally signed messa

Re: [Mesa-dev] [PATCH] intel/decoders: fix instruction base address parsing

2018-11-05 Thread Kenneth Graunke
= iter.raw_value; > - } else if (strcmp(iter.name, "Insntruction Base Address Modify > Enable") == 0) { > + } else if (strcmp(iter.name, "Instruction Base Address Modify Enable") > == 0) { > instruction_modify = it

Re: [Mesa-dev] [PATCH v1] i965/batch/debug: Allow log be dumped before assert

2018-11-05 Thread Kenneth Graunke
On Monday, November 5, 2018 5:02:49 AM PST Sergii Romantsov wrote: > Message that may show the culprit of assert now will > be dumped before that for debug purposes. > > CC: Kenneth Graunke > CC: Lionel G Landwerlin > Signed-off-by: Sergii Romantsov > --- > s

[Mesa-dev] [PATCH 1/4] i965: Move some genX infrastructure to genX_boilerplate.h.

2018-11-01 Thread Kenneth Graunke
This will let us make multiple genX_*.c files, without copy and pasting all this boilerplate. --- src/mesa/drivers/dri/i965/Makefile.sources| 10 ++ src/mesa/drivers/dri/i965/genX_boilerplate.h | 160 ++ src/mesa/drivers/dri/i965/genX_state_upload.c | 129 +- src/

[Mesa-dev] [PATCH 2/4] i965: Rename ISP_DIS to INDIRECT_STATE_POINTERS_DISABLE.

2018-11-01 Thread Kenneth Graunke
Clearer name. --- src/mesa/drivers/dri/i965/brw_pipe_control.c | 2 +- src/mesa/drivers/dri/i965/brw_pipe_control.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_pipe_control.c b/src/mesa/drivers/dri/i965/brw_pipe_control.c index 122ac260703.

[Mesa-dev] [PATCH 4/4] i965: Reimplement all the PIPE_CONTROL rules.

2018-11-01 Thread Kenneth Graunke
This implements virtually all documented PIPE_CONTROL restrictions in a centralized helper. You now simply ask for the operations you want, and the pipe control "brain" will figure out exactly what pipe controls to emit to make that happen without tanking your system. The hope is that this will f

[Mesa-dev] [PATCH 3/4] i965: Use genxml for emitting PIPE_CONTROL.

2018-11-01 Thread Kenneth Graunke
While this does add a bunch of boilerplate, it also protects us against the hardware moving bits, or changing their meaning. For something as finnicky as PIPE_CONTROL, the extra safety seems worth it. We turn PIPE_CONTROL_* into an bitfield of arbitrary flags, and then pack them appropriately. --

[Mesa-dev] [PATCH] intel: Use a URB start offset of 0 for disabled stages.

2018-11-01 Thread Kenneth Graunke
There are some cases where the VS is the only stage enabled, it uses the entire URB, and the URB is large enough that placing later stages after the VS exceeds the number of bits for "URB Starting Address". For example, on Icelake GT2, "varying-packing-simple mat2x4 array" from Piglit is getting a

Re: [Mesa-dev] [PATCH v2 3/3] i965/gen9: Add workarounds for object preemption.

2018-10-31 Thread Kenneth Graunke
On Wednesday, October 31, 2018 11:15:28 AM PDT Rafael Antognolli wrote: > On Tue, Oct 30, 2018 at 04:32:54PM -0700, Kenneth Graunke wrote: > > On Monday, October 29, 2018 10:19:54 AM PDT Rafael Antognolli wrote: > > Do we need any stalling when whacking CS_CHICKEN1...? > >

Re: [Mesa-dev] [PATCH] intel/compiler: Stop assuming the entrypoint is called "main"

2018-10-30 Thread Kenneth Graunke
line.c | 1 - > 3 files changed, 5 insertions(+), 20 deletions(-) Reviewed-by: Kenneth Graunke signature.asc Description: This is a digitally signed message part. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH v2 3/3] i965/gen9: Add workarounds for object preemption.

2018-10-30 Thread Kenneth Graunke
it will be disabled > by a previous 3DPRIMITIVE, which should be fine too. > > Signed-off-by: Rafael Antognolli > Cc: Kenneth Graunke > --- > src/mesa/drivers/dri/i965/genX_state_upload.c | 47 +++ > 1 file changed, 47 insertions(+) > > diff --git a/src/mesa/

Re: [Mesa-dev] [PATCH v2 0/3] Add object level preemption to i965.

2018-10-30 Thread Kenneth Graunke
tlab.freedesktop.org/rantogno/piglit/commits/review/context_preemption_v2 > > Cc: Kenneth Graunke > > Rafael Antognolli (3): > intel/genxml: Add register for object preemption. > i965/gen10+: Enable object level preemption. > i965/gen9: Add workarounds for object pre

Re: [Mesa-dev] [PATCH v3 1/2] i965/batch: avoid reverting batch buffer if saved state is an empty

2018-10-30 Thread Kenneth Graunke
On Friday, October 26, 2018 1:06:52 AM PDT andrey simiklit wrote: > Hi, > > Could you please help me with a push. I don't have a right for it :-) > > Thanks, > Andrii. Thanks for fixing these up! While we're here, there are several other variables where we track the last known state of the GPU,

[Mesa-dev] [PATCH] i965: Respect GL_TEXTURE_SRGB_DECODE_EXT in GenerateMipmaps()

2018-10-29 Thread Kenneth Graunke
Apparently, we're supposed to look at the texture object's built-in sampler object's sRGB decode setting in order to decide whether to decode/downsample/re-encode, or simply downsample as-is. Previously, I had always done the decoding/encoding. Fixes SKQP's Skia_Unit_Tests.SRGBMipMaps test. ---

Re: [Mesa-dev] [PATCH] i965/icl: Disable prefetching of sampler state entries

2018-10-29 Thread Kenneth Graunke
rMaskEnable = GEN_GEN >= 8; > > - ps.SamplerCount = > - DIV_ROUND_UP(CLAMP(stage_state->sampler_count, 0, 16), 4); > + /* WA_1606682166: > +* "Incorrect TDL's SSP address shift in SARB for 16:6 & 18:8 modes. > +* Disable th

Re: [Mesa-dev] [PATCH 1/2] intel/icl: Disable combining of vertices from separate instances

2018-10-29 Thread Kenneth Graunke
e - Payloads - SIMD8 Payload [BDW+]) > that vertex shaders could consult. > > CC: Jason Ekstrand > CC: Kenneth Graunke > CC: Anuj Phogat > Signed-off-by: Topi Pohjolainen > --- > src/intel/blorp/blorp_genX_exec.h | 6 ++ > src/intel/vulkan/genX_pipelin

[Mesa-dev] [PATCH] i965: Delete misleading comment.

2018-10-28 Thread Kenneth Graunke
We use cross-thread constants to only upload one copy of the uniforms on Haswell and later. We only duplicate things on Ivybridge. The comment suggests that we duplicate data everywhere, which is inaccurate. The second FINISHME is about a new mechanism we could use, if we wanted to, but we aren'

Re: [Mesa-dev] [PATCH 1/2] blorp: Emit a dummy 3DSTATE_WM prior to 3DSTATE_WM_HZ_OP

2018-10-26 Thread Kenneth Graunke
t; + > /* If we can't alter the depth stencil config and multiple layers are > * involved, the HiZ op will fail. This is because the op requires that a > * new config is emitted for each additional layer. Series is: Reviewed-by: Kenneth Graunke signature.asc Description: Thi

[Mesa-dev] [PATCH 2/2] st/nir: Drop unused parameter from st_nir_assign_uniform_locations().

2018-10-25 Thread Kenneth Graunke
ARB programs won't have one of these, and we don't use it anyway. --- src/mesa/state_tracker/st_glsl_to_nir.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp index c15bd7e511b..dcde95cd60

[Mesa-dev] [PATCH 1/2] st/mesa: Pull nir_lower_wpos_ytransform work into a helper function.

2018-10-25 Thread Kenneth Graunke
This will let me use it in the ARB program code as well. --- src/mesa/state_tracker/st_glsl_to_nir.cpp | 66 +-- src/mesa/state_tracker/st_nir.h | 4 ++ 2 files changed, 41 insertions(+), 29 deletions(-) diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/

[Mesa-dev] [PATCH] st/mesa: Don't record garbage streamout information in the non-SSO case.

2018-10-25 Thread Kenneth Graunke
In the non-SSO case, where multiple shader stages are linked together, we were recording garbage pipe_stream_output_info structures for all but the last enabled geometry-processing stage. Specifically, we were using the gl_transform_feedback_info from shader_program->last_vert_prog (the stage whos

Re: [Mesa-dev] [PATCH] st/mesa: Record shader access qualifiers for images

2018-10-23 Thread Kenneth Graunke
On Friday, October 19, 2018 3:04:45 PM PDT Marek Olšák wrote: > On Mon, Oct 15, 2018 at 6:35 PM Kenneth Graunke > wrote: > > > From: Jason Ekstrand > > > > They're not required to be the same as the access flag on the image > > unit. For hardware that d

Re: [Mesa-dev] [PATCH v3] intel/decoders: fix end of batch limit

2018-10-22 Thread Kenneth Graunke
nsertions(+), 9 deletions(-) Thanks for fixing this! Looks like everything's properly in bytes now. Reviewed-by: Kenneth Graunke signature.asc Description: This is a digitally signed message part. ___ mesa-dev mailing list mesa-dev@lists.f

Re: [Mesa-dev] [PATCH] intel: Fix decoding for partial STATE_BASE_ADDRESS updates.

2018-10-22 Thread Kenneth Graunke
On Monday, October 22, 2018 2:57:10 AM PDT Lionel Landwerlin wrote: > Could you maybe update src/intel/tools/aubinator_viewer_decoder.cpp > (function handle_state_base_address) ? > > Either way : > > Reviewed-by: Lionel Landwerlin Oops, good call, thanks! Pushed a v2 that updates both. sign

[Mesa-dev] [PATCH] intel: Fix decoding for partial STATE_BASE_ADDRESS updates.

2018-10-21 Thread Kenneth Graunke
STATE_BASE_ADDRESS only modifies various bases if the "modify" bit is set. Otherwise, we want to keep the existing base address. Iris uses this for updating Surface State Base Address while leaving the others as-is. --- src/intel/common/gen_batch_decoder.c | 24 +--- 1 file c

Re: [Mesa-dev] [PATCH v2] meson: Add -Werror=return-type when supported.

2018-10-19 Thread Kenneth Graunke
On Friday, October 19, 2018 10:17:29 AM PDT Matt Turner wrote: > On Thu, Oct 18, 2018 at 6:06 PM Kenneth Graunke wrote: > > > > This warning detects non-void functions with a missing return statement, > > return statements with a value in void functions, and functions wit

[Mesa-dev] [RFC] docs: Add a copyright.c template we can copy when making new files.

2018-10-19 Thread Kenneth Graunke
Usually when making a new file, people copy some random other file to get the copyright header comments. Unfortunately, some of them are commented in a decades-old style, are word wrapped poorly, or worse, have a few subtle variations in the text. While we've tried to clean those up, we're not go

Re: [Mesa-dev] [PATCH] i965: consider a 'base level' when calculating width0, height0, depth0

2018-10-19 Thread Kenneth Graunke
On Thursday, October 11, 2018 12:12:38 PM PDT Kenneth Graunke wrote: > On Thursday, October 11, 2018 11:58:40 AM PDT Kenneth Graunke wrote: > > On Tuesday, October 2, 2018 9:16:01 AM PDT asimiklit.w...@gmail.com wrote: > > > From: Andrii Simiklit > > > > > >

[Mesa-dev] [PATCH v2] meson: Add -Werror=return-type when supported.

2018-10-18 Thread Kenneth Graunke
This warning detects non-void functions with a missing return statement, return statements with a value in void functions, and functions with an bogus return type that ends up defaulting to int. It's already enabled by default with -Wall. Generally, these are fairly serious bugs in the code, whic

[Mesa-dev] [PATCH] meson: Add -Werror=return-type when supported.

2018-10-15 Thread Kenneth Graunke
This warning detects non-void functions with a missing return statement, return statements with a value in void functions, and functions with an bogus return type that ends up defaulting to int. It's already enabled by default with -Wall. Generally, these are fairly serious bugs in the code, whic

[Mesa-dev] [PATCH] i965: Add PCI IDs for new Amberlake parts that are Coffeelake based

2018-10-15 Thread Kenneth Graunke
See commit c0c46ca461f136a0ae1ed69da6c874e850aeeb53 in the Linux kernel, where José Roberto de Souza added this new PCI ID there. --- include/pci_ids/i965_pci_ids.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/pci_ids/i965_pci_ids.h b/include/pci_ids/i965_pci_id

[Mesa-dev] [PATCH] st/mesa: Record shader access qualifiers for images

2018-10-15 Thread Kenneth Graunke
From: Jason Ekstrand They're not required to be the same as the access flag on the image unit. For hardware that does shader image lowering based on the qualifier (Intel), it may be required for state setup. --- src/gallium/include/pipe/p_state.h | 1 + src/mesa/state_tracker/st_atom_image

[Mesa-dev] [PATCH] intel: disable FS IR validation in release mode.

2018-10-15 Thread Kenneth Graunke
We probably don't need to iterate, fprintf, and abort in release mode. --- src/intel/compiler/brw_fs_validate.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/intel/compiler/brw_fs_validate.cpp b/src/intel/compiler/brw_fs_validate.cpp index 676942c19c0..75a794fd794 100644 --- a/src/i

[Mesa-dev] [PATCH] i965: Drop assert about number of uniforms in ARB handling.

2018-10-15 Thread Kenneth Graunke
My recent prog_to_nir patch started making new sampler uniforms, which apparently increased the number of parameters. We used to poke at the one parameter directly, making it important that there was only one, but we haven't done that in a while. It should be safe to just delete the assertion. F

[Mesa-dev] [PATCH] nir: fix clip cull lowering to not assert if GLSL already lowered.

2018-10-14 Thread Kenneth Graunke
From: Dave Airlie If GLSL has already done the lowering, we'd rather not crash in this pass. Reviewed-by: Kenneth Graunke --- src/compiler/nir/nir_lower_clip_cull_distance_arrays.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/compiler/nir/nir_lower_clip_cull_distance_arr

[Mesa-dev] [PATCH] st/mesa: Pass index to pipe->create_query() for statistics queries.

2018-10-14 Thread Kenneth Graunke
GL exposes separate queries for each pipeline statistics counter. For some reason, Gallium chose to map them all to a single target, PIPE_QUERY_PIPELINE_STATISTICS. Radeon hardware appears to query them all as a group. pipe->get_query_result_resource() takes an index, indicating which to write to

Re: [Mesa-dev] [PATCH] i965: consider a 'base level' when calculating width0, height0, depth0

2018-10-11 Thread Kenneth Graunke
On Thursday, October 11, 2018 11:58:40 AM PDT Kenneth Graunke wrote: > On Tuesday, October 2, 2018 9:16:01 AM PDT asimiklit.w...@gmail.com wrote: > > From: Andrii Simiklit > > > > I guess that when we calculating the width0, height0, depth0 > > to use for function &#x

Re: [Mesa-dev] [PATCH] i965: consider a 'base level' when calculating width0, height0, depth0

2018-10-11 Thread Kenneth Graunke
On Thursday, October 11, 2018 11:58:40 AM PDT Kenneth Graunke wrote: > On Tuesday, October 2, 2018 9:16:01 AM PDT asimiklit.w...@gmail.com wrote: > > From: Andrii Simiklit > > > > I guess that when we calculating the width0, height0, depth0 > > to use for function &#x

Re: [Mesa-dev] [PATCH] i965: consider a 'base level' when calculating width0, height0, depth0

2018-10-11 Thread Kenneth Graunke
s only good up until the new base...and have to re-assemble it the next time they change the base. It would save memory potentially. But more copies. I don't have a strong preference which is better. Please do make a Piglit or dEQP test for this. Reviewed-by: Kenneth Graunke > diff -

Re: [Mesa-dev] [PATCH 0/3] sse4 patches

2018-10-07 Thread Kenneth Graunke
| 38 +++- > 12 files changed, 579 insertions(+), 108 deletions(-) > create mode 100644 src/mesa/drivers/dri/i965/intel_tiled_memcpy_normal.c > create mode 100644 src/mesa/drivers/dri/i965/intel_tiled_memcpy_sse41.c > create mode 100644 src/mesa/drivers/dri/i965/intel_tiled_mem

Re: [Mesa-dev] [PATCH 7/9] i965: Pack simple pipelined query objects into the same buffer

2018-10-05 Thread Kenneth Graunke
On Tuesday, October 2, 2018 11:06:23 AM PDT Chris Wilson wrote: > Reuse the same query object buffer for multiple queries within the same > batch. > > A task for the future is propagating the GL_NO_MEMORY errors. > > Signed-off-by: Chris Wilson > Cc: Kenneth Graun

Re: [Mesa-dev] [PATCH mesa v2] i965: searching the cache doesn't need to modify it

2018-10-02 Thread Kenneth Graunke
h void * though, so it ends up working for now... Acked-by: Kenneth Graunke On Tuesday, October 2, 2018 7:30:09 AM PDT Eric Engestrom wrote: > Ping? > I'm just adding `const` to make it easier to read and understand the > code, and allow the compiler to tell us if we make a mistake

Re: [Mesa-dev] [PATCH v2 2/4] drirc: Initial blacklist for adaptive sync

2018-09-29 Thread Kenneth Graunke
On Monday, September 24, 2018 8:18:37 PM CEST Nicholas Kazlauskas wrote: > Applications that don't present at a predictable rate (ie. not games) > shouldn't have adaptive sync enabled. This list covers some of the > common desktop compositors, web browsers and video players. > > Signed-off-by: Nic

Re: [Mesa-dev] [PATCH] mesa/st: In the precense of integer buffers enable per buffer blending

2018-09-25 Thread Kenneth Graunke
On Wednesday, September 26, 2018 12:48:13 AM CEST Kenneth Graunke wrote: > On Tuesday, September 25, 2018 4:20:04 PM CEST Ilia Mirkin wrote: > > I haven't double-checked yet, but doesn't this result in a reduction > > of functionality for pre-independent-blend GPUs (like t

Re: [Mesa-dev] [PATCH] mesa/st: In the precense of integer buffers enable per buffer blending

2018-09-25 Thread Kenneth Graunke
On Tuesday, September 25, 2018 4:20:04 PM CEST Ilia Mirkin wrote: > I haven't double-checked yet, but doesn't this result in a reduction > of functionality for pre-independent-blend GPUs (like the early NVIDIA > Tesla series)? Configuring blending for an integer RT does nothing on > NVIDIA hardware

Re: [Mesa-dev] Lets talk about autotools

2018-09-18 Thread Kenneth Graunke
On Monday, September 17, 2018 3:24:56 PM PDT Dylan Baker wrote: > Quoting Marek Olšák (2018-09-17 15:14:11) > > How do I build 32-bit Mesa with meson? > > > > Thanks, > > Marek > > > > Some people get away with just adding CFLAGs=-m32, but using a cross file and > doing a cross build is a better

Re: [Mesa-dev] [PATCH] intel/icl: Fix URB size for different SKUs

2018-09-17 Thread Kenneth Graunke
GEN11_URB_MIN_MAX_ENTRIES, > + }, > .simulator_id = 19, > }; > > static const struct gen_device_info gen_device_info_icl_1x8 = { > GEN11_FEATURES(1, 1, subslices(1), 6), > + .urb = { > + .size = 768, > + GEN11_URB_MIN_MAX_ENTRIES, > + }, > .simulator

Re: [Mesa-dev] [PATCH] anv/icl: Set Enabled Texel Offset Precision Fix bit

2018-09-17 Thread Kenneth Graunke
On Tuesday, August 28, 2018 10:54:57 AM PDT Anuj Phogat wrote: > h/w specification requires this bit to be always set. > > Suggested-by: Kenneth Graunke > Signed-off-by: Anuj Phogat > --- > src/intel/genxml/gen11.xml| 5 + > src/intel/vulkan/genX_state.c | 14

Re: [Mesa-dev] [PATCH V2] i965/icl: Set Enabled Texel Offset Precision Fix bit

2018-09-17 Thread Kenneth Graunke
On Tuesday, August 28, 2018 3:31:18 PM PDT Anuj Phogat wrote: > h/w specification requires this bit to be always set. > > V2: Fix bit mask (Chris Wilson) > > Suggested-by: Kenneth Graunke > Signed-off-by: Anuj Phogat > --- > src/mesa/drivers/dri/i965/brw_defines.h

Re: [Mesa-dev] [PATCH 2/4] anv: Implement a VF cache invalidate workaround

2018-09-07 Thread Kenneth Graunke
/ Argument: VF Invalidate * * "'Post Sync Operation' must be enabled to 'Write Immediate Data' or * 'Write PS Depth Count' or 'Write Timestamp'." */ With those two parts updated for the appropriate gen, this would be R

Re: [Mesa-dev] [PATCH 3/4] anv: Disable the vertex cache when tessellating on SKL GT4

2018-09-07 Thread Kenneth Graunke
tion shaders are > + * likely generating and processing far more geometry than the > vertex > + * stage. > + */ > + vs.VertexCacheDisable = true; > + } > >vs.VertexURBEntryReadLength = vs_prog_data->base.urb_read_length; >v

Re: [Mesa-dev] [PATCH 1/4] anv: Re-emit vertex buffers when the pipeline changes

2018-09-07 Thread Kenneth Graunke
vb_emit |= pipeline->vb_used; > > assert((pipeline->active_stages & VK_SHADER_STAGE_COMPUTE_BIT) == 0); > > This patch is: Reviewed-by: Kenneth Graunke signature.asc Description: This is a digitally signed message part. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 4/4] anv: Clamp scissors to the framebuffer boundary

2018-09-07 Thread Kenneth Graunke
ndle the case where they don't. > > Fixes: fb2a5ceb3264 "anv: Emit DRAWING_RECTANGLE once at driver..." > --- > src/intel/vulkan/gen7_cmd_buffer.c | 5 +++-- > src/intel/vulkan/genX_cmd_buffer.c | 3 ++- > 2 files changed, 5 insertions(+), 3 deletions(-) > This patch is: Rev

Re: [Mesa-dev] [PATCH] i965: Bump aperture tracking to u64

2018-09-07 Thread Kenneth Graunke
On Friday, September 7, 2018 6:34:45 AM PDT Chris Wilson wrote: > As a prelude to handling large address spaces, first allow ourselves the > luxury of handling the full 4G. > > Reported-by: Andrey Simiklit > Cc: Kenneth Graunke > --- > src/mesa/drivers/dri/i965/br

Re: [Mesa-dev] [PATCH v2] i965: clearify map_gtt cases

2018-09-06 Thread Kenneth Graunke
On Thursday, September 6, 2018 3:30:58 AM PDT Lionel Landwerlin wrote: > On 05/09/2018 18:01, Kenneth Graunke wrote: > > On Tuesday, September 4, 2018 3:30:42 AM PDT Lionel Landwerlin wrote: > >> Both brw_bo_map_cpu() & brw_bo_map_wc() assert if mapping the > >> un

Re: [Mesa-dev] [PATCH v2] i965: clearify map_gtt cases

2018-09-05 Thread Kenneth Graunke
On Tuesday, September 4, 2018 3:30:42 AM PDT Lionel Landwerlin wrote: > Both brw_bo_map_cpu() & brw_bo_map_wc() assert if mapping the > underlying BO fails. Failing back to brw_bo_map_gtt() doesn't seem to > make any sense for that reason. > > We also only call brw_bo_map_gtt() for tiled buffers w

Re: [Mesa-dev] [PATCH v1] i965: compiler option msse2 and mstackrealign

2018-09-04 Thread Kenneth Graunke
On Tuesday, September 4, 2018 5:22:31 AM PDT Lionel Landwerlin wrote: > On 04/09/2018 11:46, Sergii Romantsov wrote: > > Seems in case of 32-bit library, usage of msse2 makes > > some stack corruption or incorrect instructions. > > Usage with mstackrealign fixes that case. > > > > Bugzilla: https:/

Re: [Mesa-dev] [PATCH] i965: clearify map_gtt cases

2018-09-04 Thread Kenneth Graunke
On Tuesday, September 4, 2018 2:57:29 AM PDT Lionel Landwerlin wrote: > Both brw_bo_map_cpu() & brw_bo_map_wc() assert if mapping the > underlying BO fails. Failing back to brw_bo_map_gtt() doesn't seem to > make any sense for that reason. > > We also only call brw_bo_map_gtt() for tiled buffers w

Re: [Mesa-dev] [PATCH 2/4] anv: Implement a VF cache invalidate workaround

2018-09-03 Thread Kenneth Graunke
On Saturday, September 1, 2018 9:24:53 AM PDT Jason Ekstrand wrote: > This appears to hang broadwell; we should probably think twice before > enabling it so broadly. I'll adjust it to be gen9 only or we can just can > the patch entirely. There a bunch of workarounds and they're tricky to get righ

Re: [Mesa-dev] [PATCH] gallium/u_threaded: increase batch size to increase performance

2018-09-01 Thread Kenneth Graunke
On Saturday, September 1, 2018 12:14:38 AM PDT Marek Olšák wrote: > From: Marek Olšák > > This reduces mutex overhead. > > +4.4% performance with piglit/drawoverhead, DrawElements, Ryzen X1700 +14% with piglit/drawoverhead and iris_dri.so, DrawArrays, i7 7700HQ. Acked-by:

Re: [Mesa-dev] [PATCH v2] i965/gen7_urb: Re-emit PUSH_CONSTANT_ALLOC on some gen9

2018-08-30 Thread Kenneth Graunke
_CONSTANT_ALLOC_VS << 16 | (2 - 2)); > OUT_BATCH(vs_size | offset << GEN7_PUSH_CONSTANT_BUFFER_OFFSET_SHIFT); > @@ -154,6 +181,7 @@ const struct brw_tracked_state gen7_push_constant_space = > { > .dirty = { >.mesa = 0, >.brw = BRW_NEW_CONTEXT | > + BRW_NEW_BATCH | /* P

Re: [Mesa-dev] [PATCH 2/2] i965/vec4: Clamp indirect tes input array reads with 0x0fffffff

2018-08-29 Thread Kenneth Graunke
> emit(TES_OPCODE_ADD_INDIRECT_URB_OFFSET, dst_reg(header), > - input_read_header, indirect_offset); > + input_read_header, clamped_indirect_offset); >} else { > /* Arbitrarily only push up to 24 vec4 slots worth of data, >* which is 12 reg

Re: [Mesa-dev] [PATCH v2 14/22] intel/compiler: Do image load/store lowering to NIR

2018-08-29 Thread Kenneth Graunke
7;t have that much image_load_store happening in the > shaders in shader-db Looks like the untyped stride checks are back and the unnecessary typed load checks (mistakenly copied from atomics) are gone. Nice. Reviewed-by: Kenneth Graunke signature.asc Description: This is a digitally signed messa

Re: [Mesa-dev] [PATCH v2 21.5/22 (was 18/22)] intel: Use TXS for image_size when we have a typed surface

2018-08-29 Thread Kenneth Graunke
, > +BRW_REGISTER_TYPE_UD); > + image = bld.emit_uniformize(image); > + > + /* Since the image size is always uniform, we can just emit a SIMD8 > + * query instruction and splat the result out. > + */ > + con

Re: [Mesa-dev] [PATCH 22/22] intel/compiler: Remove surface_idx from brw_image_param

2018-08-29 Thread Kenneth Graunke
12 +++- > 6 files changed, 9 insertions(+), 29 deletions(-) Reviewed-by: Kenneth Graunke signature.asc Description: This is a digitally signed message part. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 21/22] anv, i965: Lower away image derefs in the driver

2018-08-29 Thread Kenneth Graunke
ial to decouple the two and provide > actual binding table indices. Reviewed-by: Kenneth Graunke signature.asc Description: This is a digitally signed message part. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 14/22] intel/compiler: Do image load/store lowering to NIR

2018-08-29 Thread Kenneth Graunke
On Wednesday, August 29, 2018 5:31:38 AM PDT Jason Ekstrand wrote: > On Wed, Aug 29, 2018 at 12:49 AM Kenneth Graunke > wrote: > > > On Friday, August 17, 2018 1:06:20 PM PDT Jason Ekstrand wrote: > > [snip] > > > +# Intel-specific query for loading from the brw

Re: [Mesa-dev] [PATCH 18/22] intel: Use TXQ for image_size when we have a typed surface

2018-08-29 Thread Kenneth Graunke
On Wednesday, August 29, 2018 5:38:59 AM PDT Jason Ekstrand wrote: > On Wed, Aug 29, 2018 at 1:36 AM Kenneth Graunke > wrote: > > > On Friday, August 17, 2018 1:06:24 PM PDT Jason Ekstrand wrote: > > > --- > > > src/intel/compiler/brw_eu_defines.h |

Re: [Mesa-dev] [PATCH 18/22] intel: Use TXQ for image_size when we have a typed surface

2018-08-28 Thread Kenneth Graunke
On Friday, August 17, 2018 1:06:24 PM PDT Jason Ekstrand wrote: > --- > src/intel/compiler/brw_eu_defines.h | 3 +++ > src/intel/compiler/brw_fs.cpp | 8 ++ > src/intel/compiler/brw_fs_generator.cpp | 26 --- > src/intel/compiler/brw_fs_nir.cpp

Re: [Mesa-dev] [PATCH 17/22] glsl/link, i965: Make ImageAccess four-state

2018-08-28 Thread Kenneth Graunke
: RELOC_WRITE); > + written ? RELOC_WRITE : 0); > } > > isl_surf_fill_image_param(&brw->isl_dev, param, &mt->surf, &view); > diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h > i

Re: [Mesa-dev] [PATCH 04/22] nir/opcodes: Make unpack_half_2x16_split_* variable-width

2018-08-28 Thread Kenneth Graunke
quot;) > +unop_convert("unpack_half_2x16_split_y", tfloat32, tuint32, > + "unpack_half_1x16((uint16_t)(src0 >> 16))") > > unop_convert("unpack_32_2x16_split_x", tuint16, tuint32, "src0") > unop_convert("unpack_32_2x16_split_y&q

Re: [Mesa-dev] [PATCH 14/22] intel/compiler: Do image load/store lowering to NIR

2018-08-28 Thread Kenneth Graunke
On Friday, August 17, 2018 1:06:20 PM PDT Jason Ekstrand wrote: [snip] > +# Intel-specific query for loading from the brw_image_param struct passed > +# into the shader as a uniform. The variable is a deref to the image > +# variable. The const index specifies which of the six parameters to load.

Re: [Mesa-dev] [PATCH] st/mesa: Override blend factors involving alpha if it doesn't exist.

2018-08-27 Thread Kenneth Graunke
On Monday, August 27, 2018 6:18:21 PM PDT Marek Olšák wrote: > On Mon, Aug 27, 2018 at 5:55 PM, Kenneth Graunke > wrote: > > On Monday, August 27, 2018 11:05:19 AM PDT Marek Olšák wrote: > >> Yeah, this will be more complicated because it's per RT. > >> >

Re: [Mesa-dev] [PATCH] i965/gen7_urb: Re-emit PUSH_CONSTANT_ALLOC on GLK

2018-08-27 Thread Kenneth Graunke
On Monday, August 27, 2018 11:03:33 AM PDT Nanley Chery wrote: > On Fri, Aug 24, 2018 at 05:46:44PM -0700, Nanley Chery wrote: > > According to internal docs, some gen9 platforms have a pixel shader push > > constant synchronization issue. Although not listed among said > > platforms, this issue se

Re: [Mesa-dev] [PATCH] st/mesa: Override blend factors involving alpha if it doesn't exist.

2018-08-27 Thread Kenneth Graunke
On Monday, August 27, 2018 11:05:19 AM PDT Marek Olšák wrote: > Yeah, this will be more complicated because it's per RT. > > I suggest adding a PIPE_CAP for the hw capability to force DST_ALPHA > to 0, and applying this workaround only if the PIPE_CAP is 0. > > Marek I was thinking of applying t

Re: [Mesa-dev] [PATCH 2/3] nir: Create sampler variables in prog_to_nir.

2018-08-25 Thread Kenneth Graunke
On Saturday, August 25, 2018 6:05:57 AM PDT Jason Ekstrand wrote: > On Fri, Aug 24, 2018 at 8:24 PM Kenneth Graunke > wrote: > > > This is needed for nir_gather_info to actually count the textures, > > since it operates solely on variables. > > --- > > sr

[Mesa-dev] [PATCH] st/mesa: Override blend factors involving alpha if it doesn't exist.

2018-08-25 Thread Kenneth Graunke
When faking an RGB format with an RGBA format, there may be a channel of data containing garbage. st/mesa already overrides texture swizzles to replace the A channel with ONE. This patch makes it override blend factors to achieve a similar effect. It appears that st_update_blend is already calle

[Mesa-dev] [PATCH] st/mesa: Disable blending for integer formats.

2018-08-25 Thread Kenneth Graunke
Blending isn't valid for integer formats. Rather than having drivers worry about this, just disable blending in this case. This hopefully will increase hits in the CSO cache as well, by eliminating most of the meaningless fields in this case. --- src/mesa/state_tracker/st_atom_blend.c | 1 + 1 f

[Mesa-dev] [PATCH 1/3] nir: Create sampler2D variables in nir_lower_{bitmap, drawpixels}.

2018-08-24 Thread Kenneth Graunke
This is needed for nir_gather_info to actually count the new textures, since it operates solely on variables. --- src/compiler/nir/nir_lower_bitmap.c | 7 +++ src/compiler/nir/nir_lower_drawpixels.c | 17 - 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src

[Mesa-dev] [PATCH 3/3] st/nir: Call nir_gather_info in st_finalize_nir.

2018-08-24 Thread Kenneth Graunke
Several of the passes change varyings. This is necessary for inputs_read and outputs_written to be accurate. --- src/mesa/state_tracker/st_glsl_to_nir.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp i

[Mesa-dev] [PATCH 2/3] nir: Create sampler variables in prog_to_nir.

2018-08-24 Thread Kenneth Graunke
This is needed for nir_gather_info to actually count the textures, since it operates solely on variables. --- src/mesa/program/prog_to_nir.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/mesa/program/prog_to_nir.c b/src/mesa/program/prog_to_nir.c index 14

[Mesa-dev] [PATCH] intel/decoder: Decode SFIXED values.

2018-08-23 Thread Kenneth Graunke
This lets us example SAMPLER_STATE's LOD Bias field, among other things. --- src/intel/common/gen_decoder.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/intel/common/gen_decoder.c b/src/intel/common/gen_decoder.c index ec0a486b101..a276f37835b 100644 --- a/src

Re: [Mesa-dev] [PATCH] i965/icl: Allow headerless sampler messages for pre-emptable contexts

2018-08-20 Thread Kenneth Graunke
On Monday, August 20, 2018 10:26:29 AM PDT Anuj Phogat wrote: > On Mon, Aug 20, 2018 at 12:18 AM Kenneth Graunke wrote: [snip] > > I don't know if people are trying to enable pre-emption during GPGPU > > work on pre-Gen11. If so, that probably will not work, and we'd

Re: [Mesa-dev] [PATCH 06/22] nir/format_convert: Add vec mask and sign-extend helpers

2018-08-20 Thread Kenneth Graunke
t; - for (unsigned i = 0; i < num_components; i++) { This used to operate on the num_components parameter to nir_format_pack_uint, but now it operates on color->num_components instead. That's probably OK...do we even need the parameter? Nothing actually uses this function in ma

Re: [Mesa-dev] [PATCH 11/22] nir: Make image load/store intrinsics variable-width

2018-08-20 Thread Kenneth Graunke
; be able to shrink them for i965. > --- > src/compiler/glsl/glsl_to_nir.cpp | 9 +++-- > src/compiler/nir/nir_intrinsics.py | 4 ++-- > src/compiler/spirv/spirv_to_nir.c | 2 ++ > 3 files changed, 11 insertions(+), 4 deletions(-) Patches 10-13 are: Reviewed-by: Kenne

Re: [Mesa-dev] [PATCH 08/22] nir/format_convert: Add [us]norm conversion helpers

2018-08-20 Thread Kenneth Graunke
; > + > + /* Clamp to the range [0, 1] */ Should be [-1, 1] here. Could always move nir_fclamp from nir_builtin_builder.h to nir_builder.h and then use that here, too. Would be ever so slightly simpler. With the comment fixed, Reviewed-by: Kenneth Graunke > + f = nir_fmin(b,

Re: [Mesa-dev] [PATCH] i965/icl: Allow headerless sampler messages for pre-emptable contexts

2018-08-20 Thread Kenneth Graunke
R MODE register is set to 0, which means > + * headerless sampler messages are not allowed for pre-emptable > + * contexts. Set the bit 5 to 1 to allow them. Bonus space after the stars. Can we also change this to: * contexts. Set bit 5 to allow them. Same for the anv p

Re: [Mesa-dev] Tidy up dri config options

2018-08-20 Thread Kenneth Graunke
and eventually use it with the radv driver. Patches 1-8 are Reviewed-by: Kenneth Graunke signature.asc Description: This is a digitally signed message part. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 10/22] nir/format_convert: Fix a bitmask in unpack_11f11f10f

2018-08-20 Thread Kenneth Graunke
, -17); > > for (unsigned i = 0; i < 3; i++) > Patches 9-10 are: Reviewed-by: Kenneth Graunke signature.asc Description: This is a digitally signed message part. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] anv/icl: Disable binding table prefetching

2018-08-20 Thread Kenneth Graunke
igned-off-by: Anuj Phogat > --- > src/intel/vulkan/genX_pipeline.c | 21 +++-- > 1 file changed, 15 insertions(+), 6 deletions(-) Looks reasonable, we can always revert it later. Reviewed-by: Kenneth Graunke signature.asc Description: This is a di

[Mesa-dev] [PATCH 2/3] gallium/format: Add a helper to combine separate Z24 and S8 stencil.

2018-08-14 Thread Kenneth Graunke
This new function takes separate Z24 depth and S8 stencil sources, and packs them into a single combined Z24S8 buffer. --- src/gallium/auxiliary/util/u_format_zs.c | 20 src/gallium/auxiliary/util/u_format_zs.h | 2 ++ 2 files changed, 22 insertions(+) diff --git a/src/galli

[Mesa-dev] [PATCH 1/3] gallium/auxiliary: Add util_format_get_depth_only() helper.

2018-08-14 Thread Kenneth Graunke
This will be used by u_transfer_helper.c shortly, in order to split packed depth-stencil into separate resources. --- src/gallium/auxiliary/util/u_format.h | 21 + 1 file changed, 21 insertions(+) diff --git a/src/gallium/auxiliary/util/u_format.h b/src/gallium/auxiliary/util

[Mesa-dev] [PATCH 3/3] gallium/u_transfer_helper: Add support for separate Z24/S8 as well.

2018-08-14 Thread Kenneth Graunke
u_transfer_helper already had code to handle treating packed Z32_S8 as separate Z32_FLOAT and S8_UINT resources, since some drivers can't handle that interleaved format natively. Other hardware needs depth and stencil as separate resources for all formats. For example, V3D3 needs this for 24-bit

Re: [Mesa-dev] [PATCH v4 1/2] intel/ppgtt: memory address alignment

2018-08-14 Thread Kenneth Graunke
Hi Sergii, This patch causes 2,384 failures in CI. The issue is that we're apparently trying to allocate 0 size BOs in some places, which are getting rounded up to 4096 with the current code...but with your patch, we get ALIGN(0, 4096) == 0, and assert(bo_size) triggers. We might want to continu

<    1   2   3   4   5   6   7   8   9   10   >