Commit Graph

97180 Commits

Author SHA1 Message Date
Eric Engestrom 1946de2b71 meson: pass correct env/args to egl tests
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-10-31 17:59:44 +00:00
Eric Engestrom ddb3a695a8 gles2: fail symbol check if lib is missing
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-10-31 17:59:39 +00:00
Eric Engestrom 4e7612c54d gles1: fail symbol check if lib is missing
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-10-31 17:59:34 +00:00
Eric Engestrom d830351bfa gbm: fail symbol check if lib is missing
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-10-31 17:59:29 +00:00
Eric Engestrom 4e43ba5687 wayland-egl: fail symbol check if lib is missing
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-10-31 17:59:24 +00:00
Eric Engestrom 0529a63384 egl: fail symbol check if lib is missing
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-10-31 17:59:19 +00:00
Dylan Baker 1c59119368 meson: set visibility flags on gbm
This is done in autotools, and is an oversight in the meson build.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Tested-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-10-31 10:41:19 -07:00
Dylan Baker c16486f5db meson: Don't link gbm with threads
It's supposed to be linked with pthread-stubs (if the platform needs
pthread-stubs). Pthread stubs support isn't (yet) implemented in the
meson build, so add a TODO.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-10-31 10:41:19 -07:00
Dylan Baker 0589331d54 meson: Use true and false instead of yes and no for tristate options
This allows a user to not care whether they're setting a tristate or a
boolean option, which is a nice user facing feature, and something I've
personally run into.

Suggested-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-10-31 10:37:17 -07:00
Andrey Grodzovsky f03b7c9ad9 winsys/amdgpu: Add R600_DEBUG flag to reserve VMID per ctx.
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
2017-10-31 16:55:24 +01:00
Erik Faye-Lund 5c2ff5773a meson: do not search for needless deps
If we don't want to use these deps, there's no good reason to search
for them in the first place. This should shave a bit of time for the
initial build.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-10-31 15:44:13 +01:00
Samuel Pitoiset 5010436e09 radv: bail out when binding the same vertex buffers
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2017-10-31 10:16:38 +01:00
Samuel Pitoiset 11fdc2cd34 radv: bail out when binding the same index buffer
DOW3 appears to hit this path.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2017-10-31 10:16:35 +01:00
Erik Faye-Lund cf41c19d9f meson: use dep_m in libgallium
The u_format_other.c users sqrtf, which on some systems require
a math-library. So let's make sure we link with it.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2017-10-31 08:10:37 +01:00
Timothy Arceri e92405c55a radv: use correct alloc function when loading from disk
Fixes regression in:

dEQP-VK.api.object_management.alloc_callback_fail.graphics_pipeline

Fixes: 1e84e53712 "radv: add cache items to in memory cache when reading from disk"
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2017-10-31 14:51:55 +11:00
Plamena Manolova 048d4c45c9 i965: Fix ARB_indirect_parameters logic.
This patch modifies the ARB_indirect_parameters logic in
brw_draw_prims, so that our implementation isn't affected if
another application attempts to use predicates. Previously we
were using a predicate with a DELTAS_EQUAL comparison operation
and relying on the MI_PREDICATE_DATA register being 0. Our code
to initialize MI_PREDICATE_DATA to 0 was incorrect, so we were
accidentally using whatever value was written there. Because the
kernel does not initialize the MI_PREDICATE_DATA register on
hardware context creation, we might inherit the value from whatever
context was last running on the GPU (likely another process).
The Haswell command parser also does not currently allow us to write
the MI_PREDICATE_DATA register. Rather than fixing this and requiring
an updated kernel, we switch to a different approach which uses a
SRCS_EQUAL predicate that makes no assumptions about the states of any
of the predicate registers.

Fixes Piglit's spec/arb_indirect_parameters/tf-count-arrays test.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103085
Signed-off-by: Plamena Manolova <plamena.manolova@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2017-10-30 20:40:05 -07:00
Kenneth Graunke 877dd14e88 i965: Don't flag BRW_NEW_SURFACES unless some push constants are dirty.
Due to a gaffe on my part, we were re-emitting all binding table entries
on every single draw call.  The push_constant_packets atom listens to
BRW_NEW_DRAW_CALL, but skips emitting 3DSTATE_CONSTANT_XS for each stage
unless stage_state->push_constants_dirty is true.  However, it flagged
BRW_NEW_SURFACES unconditionally at the end, by mistake.

Instead, it should only flag it if we actually emit 3DSTATE_CONSTANT_XS
for a stage.  We can move it a few lines up, inside the loop - the early
continues will skip over it if push constants aren't dirty for a stage.

With INTEL_NO_HW=1 set, improves performance of GFXBench5 gl_driver_2
on Apollolake at 1280x720 by 1.01122% +/- 0.470723% (n=35).

Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
2017-10-30 20:38:08 -07:00
Kenneth Graunke 28fcf5cd94 intel/genxml: Fix decoding of groups with fields smaller than a DWord.
Groups containing fields smaller than a DWord were not being decoded
correctly.  For example:

    <group count="32" start="32" size="4">
      <field name="Vertex Element Enables" start="0" end="3" type="uint"/>
    </group>

gen_field_iterator_next would properly walk over each element of the
array, incrementing group_iter, and calling iter_group_offset_bits()
to advance to the proper DWord.  However, the code to print the actual
values only considered iter->field->start/end, which are 0 and 3 in the
above example.  So it would always fetch bits 3:0 of the current DWord
when printing values, instead of advancing to each element of the array,
printing bits 0-3, 4-7, 8-11, and so on.

To fix this, we add new iter->start/end tracking, which properly
advances for each instance of a group's field.

Caught by Matt Turner while working on 3DSTATE_VF_COMPONENT_PACKING,
with a patch to convert it to use an array of bitfields (the example
above).

This also fixes the decoding of 3DSTATE_SBE's "Attribute Active
Component Format" fields.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2017-10-30 20:22:55 -07:00
Ian Romanick 53c7b8bdca glsl: Fix bad formatting in a comment
Trivial

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2017-10-30 20:08:25 -07:00
Eric Anholt 2a77c763fe broadcom/vc5: Force blending to treat alpha as 1 for formats without alpha.
Fixes fbo-blending-formats on RGB8 and 565.  We will still need to demote
blending to shader code in the MRT case to fix it in general, but that can
be added when we start doing 32F blending (which also needs to be done in
the shader).
2017-10-30 13:31:32 -07:00
Eric Anholt 61bb0df60e broadcom/vc5: Do BGRA vs RGBA swapping for the BLEND_CONSTANT_COLOR.
Fixes many of the fbo-blending-formats tests.
2017-10-30 13:31:32 -07:00
Eric Anholt 2e3c7beb1e broadcom/vc5: Pack clear colors according to the TLB internal format/type.
The previous packing I did got us all the R*16F and R*32F formats, where
the pipe format basically matched the TLB's format, but since the clear
color will just be memcpyed to the TLB, we should be looking at its format
for deciding how to pack.

Fixes RGB565, RGB5_A1 and RGBA10 fbo-clear-formats tests and improves
4444.
2017-10-30 13:31:32 -07:00
Eric Anholt 828299d1bd broadcom/vc5: Don't do r/b channel swapping on 565.
The HW's format actually matches the gallium format.
2017-10-30 13:31:32 -07:00
Eric Anholt 9e5df1897c broadcom/vc5: Use the proper gallium format for our RGB10_A2.
This keeps us from needing our own reswizzling of the B vs R fields.
2017-10-30 13:31:31 -07:00
Eric Anholt 6d1809a6d6 broadcom/vc5: Add some comments about the texture/output format ordering.
The output formats are consistent with their channels appearing from low
to high in their name.  Textures are interpreted the same way, but their
names may have the channels swapped around.  I'm retaining the texture
names so that we are consistent with the documentation, but I want to
leave a warning for others.
2017-10-30 13:31:28 -07:00
Eric Anholt 2d6088f2a3 broadcom/vc5: Drop duplicated setup of clip_window_height_in_pixels. 2017-10-30 13:31:28 -07:00
Eric Anholt 1b32786de6 broadcom/vc5: Don't forget to actually turn on stencil testing.
I had the rest of stencil state set up, but forgot to actually enable it
in the higher level configuration bits packet.
2017-10-30 13:31:28 -07:00
Eric Anholt 4d2619a6b3 broadcom/vc5: Stop lowering negates to subs.
In the case of fneg(0.0), we were getting back 0.0 instead of -0.0.  We
were also needing an immediate 0 value for ineg, when there's an opcode to
do the job properly.

Fixes fs-floatBitsToInt-neg.shader_test.
2017-10-30 13:31:28 -07:00
Eric Anholt a797f0eb63 broadcom/vc5: Set up MSAA texture type according to the internal format.
It gets most of EXT_framebuffer_multisample-formats passing, but doesn't
really work for texture views.
2017-10-30 13:31:28 -07:00
Eric Anholt fe6fc579cb broadcom/vc5: Use the sampler view's format, not the resource's.
This should help with texture views, though I just noticed this while
reading the code.
2017-10-30 13:31:27 -07:00
Eric Anholt 0ec4b4178f broadcom/vc5: Emit raw loads for MSAA buffers.
Similar to stores, but we also need to emit dummy stores in between each
load, to flush out the previous queued load.
2017-10-30 13:31:27 -07:00
Eric Anholt 464f1fb733 broadcom/vc5: Use raw stores for MSAA buffers.
We were storing the resolved pixels in all cases, but nr_samples > 0 means
we should be keeping the per-sample values.

We will probably want to change the job structure at some point, as we'll
want to recognize full-buffer resolves and do the resolved store in the
same job as the original rendering, meaning we'll need to track both the
MSAA and single-sample resources in the job.  However, this will be enough
to build the rest of the MSAA support.
2017-10-30 13:31:27 -07:00
Eric Anholt e717e3e7cd broadcom/vc5: Add lowering for txf_ms to a txf on a 2x2-scaled texture.
The HW has no native sampler support for multisample textures, but since
we only need to support txf_ms and the layout is UIF, we just need to
scale up the texcoords and then add in the sample.

This drops the old TEXTURE_MSAA_ADDR special uniform, since we're treating
MSAA textures as textures, rather than basically texbos like VC4 had to.
2017-10-30 13:31:27 -07:00
Eric Anholt b1a8b3979c broadcom/vc5: Lay out MSAA textures/renderbuffers as UIF scaled by 4.
We just need to multiply width/height by 2 each, and always set them up as
UIF tiling, since that's how the TLB will store them in raw (per-sample)
mode.
2017-10-30 13:31:27 -07:00
Eric Anholt 1d8105a167 broadcom/vc5: Keep output height pad out of the store TLB general address.
The equivalent load already had the pad separated out.
2017-10-30 13:31:24 -07:00
Eric Anholt 99c69027e4 broadcom/vc5: Drop padding bits from the texture shader state's address. 2017-10-30 13:31:22 -07:00
Eric Anholt cf3759a9a4 broadcom/vc5: Drop alignment bits from texture P1's address. 2017-10-30 13:31:19 -07:00
Eric Anholt 607031f411 broadcom/vc5: Drop alignment bits from Z/S rendering mode config address.
Improves CLIF dumping output.
2017-10-30 13:31:16 -07:00
Eric Anholt d0f7053369 broadcom/xml: Fix address packing for address with >= 8 alignment bits.
We were handing the intra-byte padding fine, but with a 24-bit address
(bottom 8 bits implied 0) we would end up off by 8 bytes in our shift,
impacting vc5's load/store general packets (all other packets we have had
<8 bits of padding).
2017-10-30 13:31:16 -07:00
Eric Anholt 40280b0abe broadcom/clif: Print out the contents of the generic tile list.
This is the real meat of the RCL, so let's get it printed again.
2017-10-30 13:31:16 -07:00
Eric Anholt 10fa685b53 broadcom/clif: Move the CL printing part of CL dumps to a helper.
This will let me reuse the printing for processing branches to other CLs.
2017-10-30 13:31:16 -07:00
Eric Anholt 125f2a751e broadcom/vc5: Lower unpack_*_4x8 to normal math.
We only have 2x16 unpacking in our ALUs.  To enable this, we also need
lower_fdiv for its new instructions, which had been handled at a higher
level previously.
2017-10-30 13:31:16 -07:00
Eric Anholt eecdbaa985 broadcom/vc5: Add PIPE_TEX_WRAP_CLAMP support for linear-filtered textures.
I already had the texture's wrapping set up to use different behavior for
nearest or linear, so we just needed to saturate the coordinates in linear
mode to get the "proper" blend between the edge and border values.
2017-10-30 13:31:16 -07:00
Eric Anholt e798455330 broadcom/vc5: Disable GL_ARB_transform_feedback3.
We don't seem to have a way to generally handle gl_SkipComponents.
2017-10-30 13:31:15 -07:00
Eric Anholt e2d9ed4f39 broadcom/vc5: Fix gl_FragCoord pixel center setup.
Fixes glsl-arb-fragment-coord-conventions.
2017-10-30 13:31:15 -07:00
Eric Anholt bacbcafec1 broadcom/vc5: Always set up 1D textures as raster order.
1D is the exception to "all V3D textures are tiled", since tiling 1D
textures would just waste memory and cache space.  This ended up being a
problem once we started actually marking 1D textures as 1D instead of 2D.
2017-10-30 13:31:15 -07:00
Eric Anholt 443e1984d2 broadcom/xml: Throw an #error in XML-based codegen for a >1bit bool
I've debugged two nasty errors now due to copy-and-pasting a bool type
when writing a uint field.  Make sure I don't do that again.
2017-10-30 13:31:12 -07:00
Eric Anholt e2f114b32b broadcom/vc4: Fix bool marking on Rasterizer Oversample Mode.
We don't set this field using the XML codegen, but this would help us
decode the right value in case of 16x (VG) oversampling.
2017-10-30 13:27:03 -07:00
Eric Anholt 45e70bdc8c broadcom/vc5: Mark lookup type as uint, not bool.
Fixes non-2D texturing.
2017-10-30 13:27:03 -07:00
Eric Anholt 77c7b98ba5 broadcom/vc5: Fix GPU hang with no vertex elements used by the VS.
Like VC4, we need to at least have one element set up, but unlike VC4 it
seems we don't need to read it to keep the HW happy.  Fixes GPU hangs with
glsl-no-vertex-attribs.shader_test.
2017-10-30 13:25:45 -07:00