Compare commits

...

36 Commits

Author SHA1 Message Date
Dylan Baker
7c75d83842 VERSION: bump for 22.1.0-rc2 2022-04-20 21:44:50 -07:00
Mike Blumenkrantz
b7e08dbc06 zink: remove xfb_barrier flag
this was an attempt to minimize the number of xfb barriers being emitted,
but really xfb barriers need to always be emitted in order for xfb to work

cc: mesa-stable

fixes (nv):
KHR-GL46.texture_view.reference_counting
KHR-GL46.transform_feedback_overflow_query_ARB.multiple-streams-multiple-buffers-per-stream
KHR-GL46.transform_feedback_overflow_query_ARB.multiple-streams-one-buffer-per-stream

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16065>
(cherry picked from commit e509598470)

Conflicts:
	src/gallium/drivers/zink/ci/zink-nv-fails.txt
2022-04-20 21:44:50 -07:00
Mike Blumenkrantz
f00600e1a3 zink: fix xfb counter buffer barriers
a read barrier is needed for resume, yes, but the counter buffer
is always being written to, so write access must always be set

cc: mesa-stable

fixes (nv):
KHR-GL46.transform_feedback.draw_xfb_test

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16065>
(cherry picked from commit fc5edf9b68)

Conflicts:
	src/gallium/drivers/zink/ci/zink-nv-fails.txt
2022-04-20 21:44:50 -07:00
Mike Blumenkrantz
68b25a57c1 zink: fix synchronization when drawing from streamout
this was well-documented, but ultimately wrong: the synchronization
being used was for binding streamout buffers (not counter buffers) as
vertex buffers, which was already handled just fine in the normal
vertex buffer binding

drawing from streamout ONLY uses the counter buffer, which means
the counter buffer needs to be synchronized for reading

cc: mesa-stable

fixes (nv):
KHR-GL46.transform_feedback.draw_xfb_feedbackk_test
KHR-GL46.transform_feedback.draw_xfb_instanced_test
KHR-GL46.transform_feedback.draw_xfb_stream_instanced_test

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16065>
(cherry picked from commit a056cbc691)

Conflicts:
	src/gallium/drivers/zink/ci/zink-nv-fails.txt
2022-04-20 21:44:50 -07:00
Mike Blumenkrantz
6a69784335 zink: set VK_QUERY_RESULT_WAIT_BIT when copying to qbo
according to spec, this ensures that drivers will accurately
return results relative to when the query was ended

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16049>
(cherry picked from commit 373c8001d6)
2022-04-20 21:44:50 -07:00
Emma Anholt
3987237220 nouveau/nir: Fix the inverted sense of usesSampleMaskIn.
Fixes: 9f3d5e99ea ("compiler: Use util/bitset.h for system_values_read")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16063>
(cherry picked from commit af718674ab)
2022-04-20 21:44:50 -07:00
Konstantin Seurer
a6c2047ea0 radv: Enable rt primitive culling for spirv2nir
Fixes: c8fe408fcc ("radv: Advertise ray primitive culling")
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16028>
(cherry picked from commit 324b2ae5f2)
2022-04-20 21:44:50 -07:00
Boris Brezillon
8efeb7e3bf dzn: Pass the right type to CreateCommandList() in the reset path
The Command allocator and command list type must match, but we
are forcing it to D3D12_COMMAND_LIST_TYPE_DIRECT in the reset path.

Fixes: a012b21964 ("microsoft: Initial vulkan-on-12 driver")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16023>
(cherry picked from commit 9fd02d49b8)
2022-04-20 21:44:50 -07:00
Marcin Ślusarz
9a28aea2a2 intel/compiler: invalidate metadata in brw_nir_initialize_mue
New "if" blocks may have been inserted.

Fixes: bc4f8c073a ("intel/compiler: inject MUE initialization")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15924>
(cherry picked from commit 5dace41c10)
2022-04-20 21:44:50 -07:00
Marcin Ślusarz
30a980fb94 intel/compiler: invalidate all metadata in brw_nir_lower_intersection_shader
New "if" blocks were inserted.

Fixes: 303378e1dd ("intel/rt: Add lowering for combined intersection/any-hit shaders")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15924>
(cherry picked from commit 4fddef33d5)
2022-04-20 21:44:50 -07:00
Marcin Ślusarz
4f031f35fe anv: invalidate all metadata in anv_nir_lower_ubo_loads
lower_ubo_load_instr may insert "if" blocks.

Fixes: 61749b5a15 ("anv: Add a pass for lowering A64 UBO access")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15924>
(cherry picked from commit 5bd3ba5b67)
2022-04-20 21:44:50 -07:00
Lionel Landwerlin
df6dc532d2 anv: allow getting the address of the beginning of the batch
There is no reason not to be able to get it.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 34a0ce58c7 ("anv: add a new execution mode for secondary command buffers")
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15968>
(cherry picked from commit 184084e21c)
2022-04-20 21:44:50 -07:00
Erik Faye-Lund
c849ae36e0 vulkan: explicitly cast object-type enum
VkObjectType and VkDebugReportObjectTypeEXT has the same enum-values.
Why the Vulkan WG thought this was a good idea, beats me. But it's what
we have to live with now.

Anyway, instead of having a statement that implicitly casts two
different values from the former to the latter, let's fully relsove the
type as the former, and cast the value when using it instead.

Fixes: 41318a5819 ("vulkan: Use vk_object_base::type for debug_report")
Acked-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15547>
(cherry picked from commit b27a2ba4fc)
2022-04-20 21:44:50 -07:00
Mike Blumenkrantz
b7fe949ab9 zink: rework zink_kopper_update() assert
the dt might have been killed, so just assert that it's a display target

fixes #6317

Fixes: 8ade5588e3 ("zink: add kopper api")

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16017>
(cherry picked from commit 3d97367a60)
2022-04-20 21:44:50 -07:00
Mike Blumenkrantz
445892367a zink: make a kopper debug print into an error
Fixes: 8ade5588e3 ("zink: add kopper api")

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16017>
(cherry picked from commit 9ecdc2e985)
2022-04-20 21:44:50 -07:00
Mike Blumenkrantz
81b10bd0dd zink: fix extended restart prim types without dynamic state2
these are all allowed with the ext

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15978>
(cherry picked from commit 8806f444a5)
2022-04-20 21:44:50 -07:00
Mike Blumenkrantz
24d6489d0d zink: support restart with PIPE_PRIM_LINES_ADJACENCY if ext is available
cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15978>
(cherry picked from commit cd9424d93f)
2022-04-20 21:44:50 -07:00
Mike Blumenkrantz
b27d409cfd zink: unconditionally set line width on rasterizer state change
the pipe cap is used for gating wideline support, so this will always
be 1.0 when not supported

furthermore, the previous code wasn't accurately checking line width
for tess shaders, breaking tests

cc: mesa-stable

fixes (nv):
KHR-GL46.tessellation_shader.tessellation_control_to_tessellation_evaluation.gl_PatchVerticesIn

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15960>
(cherry picked from commit d8b66fcbf9)
2022-04-20 21:44:50 -07:00
Mike Blumenkrantz
df84664032 zink: use mixed zs renderpass for depth read/write
this is triggered by u_blitter when doing src==dst blits

Fixes: 7781a75229 ("zink: add a renderpass flag for mixed zs layout")

affects:
GTF-GL46.gtf30.GL3Tests.framebuffer_blit.framebuffer_blit_functionality*

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15960>
(cherry picked from commit 9409756ee3)
2022-04-20 21:44:50 -07:00
Mike Blumenkrantz
357e3130ad zink: reject resource creation if format features don't match attachment
if a rendertarget-specified image can't be a rendertarget or a blit dst
then it can't be used for the designated functionality and must be rejected

cc: mesa-stable

fixes hangs on various nv driver versions:
dEQP-GLES2.functional.texture.mipmap.2d.generate.rgba5551_fastest

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15960>
(cherry picked from commit 37ac8647fc)
2022-04-20 21:44:50 -07:00
Mike Blumenkrantz
247ecdcc05 zink: remove tcs patch slot map
this is illegal, and we'll just have to eat some piglit fails
until indirects are handled

Fixes: f7ade1f188 ("zink: simplify shader i/o assignment")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15976>
(cherry picked from commit 12cf9a1544)

Conflicts:
	src/gallium/drivers/zink/ci/zink-lvp-fails.txt
2022-04-20 21:44:50 -07:00
Sviatoslav Peleshko
72cc88d205 mesa: flush bitmap caches when changing scissors or window rects state
If we change the sate without flushing the bitmap cache, the cache might be
rendered with the new scissor, which excludes some parts that should've
been rendered with the old state, and vice versa.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6233

Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15881>
(cherry picked from commit dd7278aa10)
2022-04-20 21:44:50 -07:00
Timothy Arceri
a27af70c1b nir: fix setting varying from uniform as flat
Here we just make sure we match the interpolation type on both
sides of the shader interface. Drivers like d3d12 are expecting
this.

Fixes: 9401990e6f ("nir/linker: set varying from uniform as flat")

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16003>
(cherry picked from commit 4b4bb46af4)
2022-04-20 21:44:50 -07:00
Samuel Pitoiset
424c960492 radv: fix initializing pipeline_key::topology for GFX9 and older
This is used to determine the geometry shader info on GFX9, and it
looks like it was broken for topologies that use adjacency.

This is also used to remove PSIZ from shaders that don't need it.

Found by inspection.

fossils-db (Polaris10):
Totals from 140 (0.10% of 135960) affected shaders:
SGPRs: 10448 -> 9696 (-7.20%)
VGPRs: 4376 -> 4264 (-2.56%)
CodeSize: 164316 -> 161028 (-2.00%)
Instrs: 26449 -> 25767 (-2.58%)
Latency: 184448 -> 180468 (-2.16%)
InvThroughput: 80772 -> 79092 (-2.08%)
VClause: 337 -> 328 (-2.67%); split: -2.97%, +0.30%
SClause: 859 -> 813 (-5.36%); split: -5.70%, +0.35%
Copies: 1027 -> 790 (-23.08%)
PreSGPRs: 2751 -> 2331 (-15.27%)
PreVGPRs: 3887 -> 3836 (-1.31%)

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15948>
(cherry picked from commit ed7d831525)
2022-04-20 21:44:50 -07:00
Lionel Landwerlin
db3e06f76c intel: fix URB programming for GT1s
We're missing a programming restriction.

Hopefully fixing
dEQP-VK.spirv_assembly.instruction.graphics.float16.arithmetic_1.* on
Gfx9atoms

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6216
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>.
Tested-by: Mark Janes <markjanes@swizzler.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15596>
(cherry picked from commit b07c215c35)
2022-04-20 21:44:49 -07:00
Gert Wollny
353330c094 r600/sfn: Fix store_shared_r600 write masks
The error was caught by the new nir_validation code.

Fixes: 73ef225fc2
    nir: validate write_mask for all intrinsics that have it

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15994>
(cherry picked from commit ef75752ef8)
2022-04-20 21:44:49 -07:00
Emma Anholt
f1168c53ae nir: Add lowering for fround_even on r300.
When we put NIR in the compiler stack for r300, indirect addressing broke
for gallium nine.  DX's array indirects round the float value, so the DX
shader gets mapped to a TGSI "ARR ADDR[0] src.x" instruction.  Translating
that to NIR maps to r0[f2i32(fround(src.x))].  While we might hope that in
translation back using nir-to-tgsi after optimization we would recognize
the construct and emit ARR again, that's going to be error prone (think
"what if src.x is in a NIR register?") so we need a fallback plan.  r300
will be able to handle this lowering, so get it in place first to fix the
regression.

Fixes: #6297
Fixes: 7d2ea9b0ed ("r300: Request NIR shaders from mesa/st and use NIR-to-TGSI.")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15870>
(cherry picked from commit 6947016b46)
2022-04-20 21:44:49 -07:00
Icecream95
62b00f70fd panfrost: Stop overallocating compressed textures
The line stride uses the number of bytes in the entire block, so both
the width and height need to be reduced for compressed textures so
that the surface stride is calculated correctly.

Fixes: 051d62cf04 ("panfrost: Add a pan_image_layout_init() helper")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6286
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15989>
(cherry picked from commit f267000240)
2022-04-20 21:44:49 -07:00
Michel Zou
ff76add805 gallium: fix unused symbols warnings
fixes: d760a915

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15840>
(cherry picked from commit 4c1cb62999)
2022-04-20 21:44:49 -07:00
Jason Ekstrand
f48a3cffe7 nir/opcodes: fisfinite32 should return bool32
Otherwise constant-folding will fold it to 0/1 instead of 0/~0.

Fixes: 330e28155f ("nir: add 32-bit bool of fisfinite")
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15984>
(cherry picked from commit 5c9e4d400a)
2022-04-20 21:44:49 -07:00
Rhys Perry
a80f8a5ed0 ac/nir: properly handle large global access constant offsets
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Fixes: 61ac5acca3 ("radv,ac/nir: lower global access to _amd global access intrinsics")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6321
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15951>
(cherry picked from commit 8fe8c5dfd0)
2022-04-20 21:44:49 -07:00
Mike Blumenkrantz
5f5c562f00 mesa/st: set normalized coords for RECT samplers if rects are unsupported
the shaders will never see these, so set the expected value for 2D

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15895>
(cherry picked from commit 2058ae7b43)
2022-04-20 21:44:49 -07:00
Mike Blumenkrantz
653b560413 nir/lower_tex: fix rect queries with lower_rect set
queries still need the sampler_dim changed

Fixes: 682e14d3ea ("nir: lower_tex: Don't normalize coordinates for TXF with RECT")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15895>
(cherry picked from commit 5b0634d735)
2022-04-20 21:44:49 -07:00
Emma Anholt
9a1ca294a8 Revert "ci: Disable Google's lab"
This reverts commit 8506c2b7ee.  Network
admins say the fixed things, and we see the runners phoning home again.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15936>
(cherry picked from commit eb78378345)
2022-04-20 21:44:49 -07:00
Dylan Baker
252a858bc5 .pick_status.json: Update to e509598470 2022-04-20 21:44:49 -07:00
Dylan Baker
c519c37784 VESRION: bump for 22.1.0-rc1 release 2022-04-14 09:47:46 -07:00
37 changed files with 2173 additions and 131 deletions

View File

@@ -17,7 +17,7 @@ variables:
PIGLIT_REPLAY_REFERENCE_IMAGES_BASE: "${MINIO_HOST}/mesa-tracie-results/$FDO_UPSTREAM_REPO"
# Individual CI farm status, set to "offline" to disable jobs
# running on a particular CI farm (ie. for outages, etc):
FD_FARM: "offline"
FD_FARM: "online"
COLLABORA_FARM: "online"
default:

2000
.pick_status.json Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1 +1 @@
22.1.0-devel
22.1.0-rc2

View File

@@ -144,8 +144,10 @@ process_instr(nir_builder *b, nir_instr *instr, void *_)
b->cursor = nir_before_instr(&intrin->instr);
if (off_const > UINT32_MAX)
if (off_const > UINT32_MAX) {
addr = nir_iadd_imm(b, addr, off_const);
off_const = 0;
}
nir_intrinsic_instr *new_intrin = nir_intrinsic_instr_create(b->shader, op);

View File

@@ -3057,9 +3057,9 @@ radv_generate_graphics_pipeline_key(const struct radv_pipeline *pipeline,
key.ps.is_int10 = blend->col_format_is_int10;
}
if (pipeline->device->physical_device->rad_info.chip_class >= GFX10) {
key.vs.topology = pCreateInfo->pInputAssemblyState ? pCreateInfo->pInputAssemblyState->topology : 0;
key.vs.topology = pCreateInfo->pInputAssemblyState ? pCreateInfo->pInputAssemblyState->topology : 0;
if (pipeline->device->physical_device->rad_info.chip_class >= GFX10) {
const VkPipelineRasterizationStateCreateInfo *raster_info = pCreateInfo->pRasterizationState;
const VkPipelineRasterizationProvokingVertexStateCreateInfoEXT *provoking_vtx_info =
vk_find_struct_const(raster_info->pNext,

View File

@@ -632,6 +632,7 @@ radv_shader_compile_to_nir(struct radv_device *device, const struct radv_pipelin
.post_depth_coverage = true,
.ray_query = true,
.ray_tracing = true,
.ray_traversal_primitive_culling = true,
.runtime_descriptor_array = true,
.shader_clock = true,
.shader_viewport_index_layer = true,

View File

@@ -3286,6 +3286,14 @@ typedef struct nir_shader_compiler_options {
bool lower_ftrunc;
/** Lowers fround_even to ffract+feq+csel.
*
* Not correct in that it doesn't correctly handle the "_even" part of the
* rounding, but good enough for DX9 array indexing handling on DX9-class
* hardware.
*/
bool lower_fround_even;
bool lower_ldexp;
bool lower_pack_half_2x16;

View File

@@ -1391,8 +1391,10 @@ nir_link_opt_varyings(nir_shader *producer, nir_shader *consumer)
/* The varying is loaded from same uniform, so no need to do any
* interpolation. Mark it as flat explicitly.
*/
if (in_var && in_var->data.interpolation <= INTERP_MODE_NOPERSPECTIVE)
if (in_var && in_var->data.interpolation <= INTERP_MODE_NOPERSPECTIVE) {
in_var->data.interpolation = INTERP_MODE_FLAT;
out_var->data.interpolation = INTERP_MODE_FLAT;
}
}
}

View File

@@ -1334,9 +1334,10 @@ nir_lower_tex_block(nir_block *block, nir_builder *b,
}
if ((tex->sampler_dim == GLSL_SAMPLER_DIM_RECT) && options->lower_rect &&
tex->op != nir_texop_txf && !nir_tex_instr_is_query(tex)) {
if (compiler_options->has_txs)
tex->op != nir_texop_txf) {
if (nir_tex_instr_is_query(tex))
tex->sampler_dim = GLSL_SAMPLER_DIM_2D;
else if (compiler_options->has_txs)
lower_rect(b, tex);
else
lower_rect_tex_scale(b, tex);

View File

@@ -1292,7 +1292,7 @@ binop("umul24_relaxed", tuint32, _2src_commutative + associative, "src0 * src1")
unop_convert("fisnormal", tbool1, tfloat, "isnormal(src0)")
unop_convert("fisfinite", tbool1, tfloat, "isfinite(src0)")
unop_convert("fisfinite32", tint32, tfloat, "isfinite(src0)")
unop_convert("fisfinite32", tbool32, tfloat, "isfinite(src0)")
# vc4-specific opcodes

View File

@@ -356,6 +356,14 @@ optimizations.extend([
(('~flrp', a, 0.0, c), ('fadd', ('fmul', ('fneg', a), c), a)),
(('ftrunc', a), ('bcsel', ('flt', a, 0.0), ('fneg', ('ffloor', ('fabs', a))), ('ffloor', ('fabs', a))), 'options->lower_ftrunc'),
# Approximate handling of fround_even for DX9 addressing from gallium nine on
# DX9-class hardware with no proper fround support.
(('fround_even', a), ('bcsel',
('feq', ('ffract', a), 0.5),
('fadd', ('ffloor', ('fadd', a, 0.5)), 1.0),
('ffloor', ('fadd', a, 0.5))), 'options->lower_fround_even'),
(('ffloor', a), ('fsub', a, ('ffract', a)), 'options->lower_ffloor'),
(('fadd', a, ('fneg', ('ffract', a))), ('ffloor', a), '!options->lower_ffloor'),
(('ffract', a), ('fsub', a, ('ffloor', a)), 'options->lower_ffract'),

View File

@@ -58,7 +58,7 @@ struct pipe_loader_sw_device {
#define pipe_loader_sw_device(dev) ((struct pipe_loader_sw_device *)dev)
static const struct pipe_loader_ops pipe_loader_sw_ops;
#ifdef HAVE_ZINK
#if defined(HAVE_PIPE_LOADER_DRI) && defined(HAVE_ZINK)
static const struct pipe_loader_ops pipe_loader_vk_ops;
#endif
@@ -93,16 +93,14 @@ static const struct sw_driver_descriptor driver_descriptors = {
};
#endif
#if defined(GALLIUM_STATIC_TARGETS) && defined(HAVE_ZINK)
#if defined(GALLIUM_STATIC_TARGETS) && defined(HAVE_ZINK) && defined(HAVE_PIPE_LOADER_DRI)
static const struct sw_driver_descriptor kopper_driver_descriptors = {
.create_screen = sw_screen_create_zink,
.winsys = {
#ifdef HAVE_PIPE_LOADER_DRI
{
.name = "dri",
.create_winsys = dri_create_sw_winsys,
},
#endif
#ifdef HAVE_PIPE_LOADER_KMS
{
.name = "kms_dri",
@@ -158,7 +156,7 @@ pipe_loader_sw_probe_init_common(struct pipe_loader_sw_device *sdev)
return true;
}
#ifdef HAVE_ZINK
#if defined(HAVE_PIPE_LOADER_DRI) && defined(HAVE_ZINK)
static bool
pipe_loader_vk_probe_init_common(struct pipe_loader_sw_device *sdev)
{
@@ -404,7 +402,7 @@ pipe_loader_sw_get_driconf(struct pipe_loader_device *dev, unsigned *count)
return NULL;
}
#ifdef HAVE_ZINK
#if defined(HAVE_PIPE_LOADER_DRI) && defined(HAVE_ZINK)
static const driOptionDescription zink_driconf[] = {
#include "zink/driinfo_zink.h"
};
@@ -437,7 +435,7 @@ static const struct pipe_loader_ops pipe_loader_sw_ops = {
.release = pipe_loader_sw_release
};
#ifdef HAVE_ZINK
#if defined(HAVE_PIPE_LOADER_DRI) && defined(HAVE_ZINK)
static const struct pipe_loader_ops pipe_loader_vk_ops = {
.create_screen = pipe_loader_sw_create_screen,
.get_driconf = pipe_loader_vk_get_driconf,

View File

@@ -1317,7 +1317,7 @@ Converter::parseNIR()
BITSET_TEST(nir->info.system_values_read, SYSTEM_VALUE_SAMPLE_POS);
info_out->prop.fp.usesDiscard = nir->info.fs.uses_discard || nir->info.fs.uses_demote;
info_out->prop.fp.usesSampleMaskIn =
!BITSET_TEST(nir->info.system_values_read, SYSTEM_VALUE_SAMPLE_MASK_IN);
BITSET_TEST(nir->info.system_values_read, SYSTEM_VALUE_SAMPLE_MASK_IN);
break;
case Program::TYPE_GEOMETRY:
info_out->prop.gp.instanceCount = nir->info.gs.invocations;

View File

@@ -514,6 +514,7 @@ static const nir_shader_compiler_options r500_vs_compiler_options = {
.lower_flrp32 = true,
.lower_flrp64 = true,
.lower_fmod = true,
.lower_fround_even = true,
.lower_rotate = true,
.lower_uniforms_to_ubo = true,
.lower_vector_cmp = true,
@@ -541,6 +542,7 @@ static const nir_shader_compiler_options r500_fs_compiler_options = {
.lower_flrp32 = true,
.lower_flrp64 = true,
.lower_fmod = true,
.lower_fround_even = true,
.lower_rotate = true,
.lower_uniforms_to_ubo = true,
.lower_vector_cmp = true,
@@ -568,6 +570,7 @@ static const nir_shader_compiler_options r300_vs_compiler_options = {
.lower_flrp32 = true,
.lower_flrp64 = true,
.lower_fmod = true,
.lower_fround_even = true,
.lower_rotate = true,
.lower_uniforms_to_ubo = true,
.lower_vector_cmp = true,
@@ -594,6 +597,7 @@ static const nir_shader_compiler_options r300_fs_compiler_options = {
.lower_flrp32 = true,
.lower_flrp64 = true,
.lower_fmod = true,
.lower_fround_even = true,
.lower_rotate = true,
.lower_uniforms_to_ubo = true,
.lower_vector_cmp = true,

View File

@@ -244,10 +244,11 @@ emit_store_lds(nir_builder *b, nir_intrinsic_instr *op, nir_ssa_def *addr)
for (int i = 0; i < 2; ++i) {
unsigned test_mask = (0x3 << 2 * i);
if (!(orig_writemask & test_mask))
unsigned wmask = orig_writemask & test_mask;
if (!(wmask))
continue;
uint32_t writemask = test_mask >> nir_intrinsic_component(op);
uint32_t writemask = wmask >> nir_intrinsic_component(op);
auto store_tcs_out = nir_intrinsic_instr_create(b->shader, nir_intrinsic_store_local_shared_r600);
nir_intrinsic_set_write_mask(store_tcs_out, writemask);

View File

@@ -1,3 +1,9 @@
# #6115
spec@arb_tessellation_shader@execution@variable-indexing@tes-both-input-array-float-index-rd,Crash
spec@arb_tessellation_shader@execution@variable-indexing@tes-both-input-array-vec2-index-rd,Crash
spec@arb_tessellation_shader@execution@variable-indexing@tes-both-input-array-vec3-index-rd,Crash
spec@arb_tessellation_shader@execution@variable-indexing@tes-both-input-array-vec4-index-rd,Crash
# #6270
spec@arb_shader_texture_lod@execution@arb_shader_texture_lod-texgradcube,Fail

View File

@@ -143,17 +143,11 @@ KHR-GL46.tessellation_shader.tessellation_shader_triangles_tessellation.inner_te
KHR-GL46.tessellation_shader.vertex.vertex_ordering,Fail
KHR-GL46.tessellation_shader.vertex.vertex_spacing,Fail
KHR-GL46.texture_swizzle.smoke,Timeout
KHR-GL46.texture_view.reference_counting,Fail
KHR-GL46.texture_view.view_classes,Fail
KHR-GL46.texture_view.view_sampling,Fail
KHR-GL46.transform_feedback.capture_geometry_interleaved_test,Fail
KHR-GL46.transform_feedback.capture_geometry_separate_test,Fail
KHR-GL46.transform_feedback.capture_vertex_separate_test,Fail
KHR-GL46.transform_feedback.draw_xfb_feedbackk_test,Fail
KHR-GL46.transform_feedback.draw_xfb_instanced_test,Fail
KHR-GL46.transform_feedback.draw_xfb_stream_instanced_test,Fail
KHR-GL46.transform_feedback.draw_xfb_stream_test,Fail
KHR-GL46.transform_feedback.draw_xfb_test,Fail
KHR-GL46.transform_feedback.query_geometry_interleaved_test,Fail
KHR-GL46.transform_feedback.query_geometry_separate_test,Fail
KHR-GL46.transform_feedback.query_vertex_interleaved_test,Fail
@@ -162,8 +156,6 @@ KHR-GL46.transform_feedback_overflow_query_ARB.advanced-single-stream-interleave
KHR-GL46.transform_feedback_overflow_query_ARB.advanced-single-stream-separate-attribs,Fail
KHR-GL46.transform_feedback_overflow_query_ARB.basic-single-stream-interleaved-attribs,Fail
KHR-GL46.transform_feedback_overflow_query_ARB.basic-single-stream-separate-attribs,Fail
KHR-GL46.transform_feedback_overflow_query_ARB.multiple-streams-multiple-buffers-per-stream,Fail
KHR-GL46.transform_feedback_overflow_query_ARB.multiple-streams-one-buffer-per-stream,Fail
dEQP-GLES31.functional.blend_equation_advanced.barrier.colorburn,Fail
dEQP-GLES31.functional.blend_equation_advanced.barrier.colordodge,Fail

View File

@@ -1169,11 +1169,9 @@ rewrite_and_discard_read(nir_builder *b, nir_instr *instr, void *data)
void
zink_compiler_assign_io(nir_shader *producer, nir_shader *consumer)
{
unsigned reserved = 0, patch_reserved = 0;
unsigned reserved = 0;
unsigned char slot_map[VARYING_SLOT_MAX];
memset(slot_map, -1, sizeof(slot_map));
unsigned char patch_slot_map[VARYING_SLOT_MAX];
memset(patch_slot_map, -1, sizeof(patch_slot_map));
bool do_fixup = false;
nir_shader *nir = producer->info.stage == MESA_SHADER_TESS_CTRL ? producer : consumer;
if (consumer->info.stage != MESA_SHADER_FRAGMENT) {
@@ -1189,13 +1187,9 @@ zink_compiler_assign_io(nir_shader *producer, nir_shader *consumer)
if (producer->info.stage == MESA_SHADER_TESS_CTRL) {
/* never assign from tcs -> tes, always invert */
nir_foreach_variable_with_modes(var, consumer, nir_var_shader_in)
assign_producer_var_io(consumer->info.stage, var,
var->data.patch ? &patch_reserved : &reserved,
var->data.patch ? patch_slot_map : slot_map);
assign_producer_var_io(consumer->info.stage, var, &reserved, slot_map);
nir_foreach_variable_with_modes_safe(var, producer, nir_var_shader_out) {
if (!assign_consumer_var_io(producer->info.stage, var,
var->data.patch ? &patch_reserved : &reserved,
var->data.patch ? patch_slot_map : slot_map))
if (!assign_consumer_var_io(producer->info.stage, var, &reserved, slot_map))
/* this is an output, nothing more needs to be done for it to be dropped */
do_fixup = true;
}

View File

@@ -2075,7 +2075,11 @@ get_render_pass(struct zink_context *ctx)
bool needs_write_s = state.rts[fb->nr_cbufs].clear_stencil || outputs_written & BITFIELD64_BIT(FRAG_RESULT_STENCIL);
if (!needs_write_z && (!ctx->dsa_state || !ctx->dsa_state->base.depth_enabled))
/* depth sample, stencil write */
state.rts[fb->nr_cbufs].mixed_zs = needs_write_s && zsbuf->bind_count[0];
else
/* depth write + sample */
state.rts[fb->nr_cbufs].mixed_zs = needs_write_z && zsbuf->bind_count[0];
state.rts[fb->nr_cbufs].needs_write = needs_write_z | needs_write_s;
state.num_rts++;
}
@@ -3887,17 +3891,8 @@ zink_set_stream_output_targets(struct pipe_context *pctx,
pipe_so_target_reference(&ctx->so_targets[i], targets[i]);
if (!t)
continue;
struct zink_resource *res = zink_resource(t->counter_buffer);
if (offsets[0] == (unsigned)-1) {
ctx->xfb_barrier |= zink_resource_buffer_needs_barrier(res,
VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT,
VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT);
} else {
ctx->xfb_barrier |= zink_resource_buffer_needs_barrier(res,
VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT,
VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT);
if (offsets[0] != (unsigned)-1)
t->counter_buffer_valid = false;
}
struct zink_resource *so = zink_resource(ctx->so_targets[i]->buffer);
if (so) {
so->so_bind_count++;

View File

@@ -363,7 +363,6 @@ struct zink_context {
uint32_t num_so_targets;
struct pipe_stream_output_target *so_targets[PIPE_MAX_SO_OUTPUTS];
bool dirty_so_targets;
bool xfb_barrier;
bool first_frame_done;
bool have_timelines;

View File

@@ -20,45 +20,27 @@
static void
zink_emit_xfb_counter_barrier(struct zink_context *ctx)
{
/* Between the pause and resume there needs to be a memory barrier for the counter buffers
* with a source access of VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT
* at pipeline stage VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT
* to a destination access of VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT
* at pipeline stage VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT.
*
* - from VK_EXT_transform_feedback spec
*/
for (unsigned i = 0; i < ctx->num_so_targets; i++) {
struct zink_so_target *t = zink_so_target(ctx->so_targets[i]);
if (!t)
continue;
struct zink_resource *res = zink_resource(t->counter_buffer);
if (t->counter_buffer_valid)
zink_resource_buffer_barrier(ctx, res, VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT,
VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT);
else
zink_resource_buffer_barrier(ctx, res, VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT,
VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT);
VkAccessFlags access = VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT;
VkPipelineStageFlags stage = VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT;
if (t->counter_buffer_valid) {
/* Between the pause and resume there needs to be a memory barrier for the counter buffers
* with a source access of VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT
* at pipeline stage VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT
* to a destination access of VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT
* at pipeline stage VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT.
*
* - from VK_EXT_transform_feedback spec
*/
access |= VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT;
stage |= VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT;
}
zink_resource_buffer_barrier(ctx, res, access, stage);
}
ctx->xfb_barrier = false;
}
static void
zink_emit_xfb_vertex_input_barrier(struct zink_context *ctx, struct zink_resource *res)
{
/* A pipeline barrier is required between using the buffers as
* transform feedback buffers and vertex buffers to
* ensure all writes to the transform feedback buffers are visible
* when the data is read as vertex attributes.
* The source access is VK_ACCESS_TRANSFORM_FEEDBACK_WRITE_BIT_EXT
* and the destination access is VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT
* for the pipeline stages VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT
* and VK_PIPELINE_STAGE_VERTEX_INPUT_BIT respectively.
*
* - 20.3.1. Drawing Transform Feedback
*/
zink_resource_buffer_barrier(ctx, res, VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT,
VK_PIPELINE_STAGE_VERTEX_INPUT_BIT);
}
static void
@@ -239,25 +221,6 @@ update_gfx_program(struct zink_context *ctx)
ctx->dirty_shader_stages &= ~bits;
}
static bool
line_width_needed(enum pipe_prim_type reduced_prim,
unsigned polygon_mode)
{
switch (reduced_prim) {
case PIPE_PRIM_POINTS:
return false;
case PIPE_PRIM_LINES:
return true;
case PIPE_PRIM_TRIANGLES:
return polygon_mode == VK_POLYGON_MODE_LINE;
default:
unreachable("unexpected reduced prim");
}
}
ALWAYS_INLINE static void
update_drawid(struct zink_context *ctx, unsigned draw_id)
{
@@ -552,8 +515,7 @@ zink_draw(struct pipe_context *pctx,
bool have_streamout = !!ctx->num_so_targets;
if (have_streamout) {
if (ctx->xfb_barrier)
zink_emit_xfb_counter_barrier(ctx);
zink_emit_xfb_counter_barrier(ctx);
if (ctx->dirty_so_targets) {
/* have to loop here and below because barriers must be emitted out of renderpass,
* but xfb buffers can't be bound before the renderpass is active to avoid
@@ -568,8 +530,13 @@ zink_draw(struct pipe_context *pctx,
}
}
if (so_target)
zink_emit_xfb_vertex_input_barrier(ctx, zink_resource(so_target->base.buffer));
/* ensure synchronization between doing streamout with counter buffer
* and using counter buffer for indirect draw
*/
if (so_target && so_target->counter_buffer_valid)
zink_resource_buffer_barrier(ctx, zink_resource(so_target->counter_buffer),
VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT,
VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT);
barrier_draw_buffers(ctx, dinfo, dindirect, index_buffer);
@@ -745,12 +712,7 @@ zink_draw(struct pipe_context *pctx,
unreachable("unexpected reduced prim");
}
if (line_width_needed(reduced_prim, rast_state->hw_state.polygon_mode)) {
if (screen->info.feats.features.wideLines || rast_state->line_width == 1.0f)
VKCTX(CmdSetLineWidth)(batch->state->cmdbuf, rast_state->line_width);
else
debug_printf("BUG: wide lines not supported, needs fallback!");
}
VKCTX(CmdSetLineWidth)(batch->state->cmdbuf, rast_state->line_width);
if (depth_bias)
VKCTX(CmdSetDepthBias)(batch->state->cmdbuf, rast_state->offset_units, rast_state->offset_clamp, rast_state->offset_scale);
else

View File

@@ -681,7 +681,9 @@ zink_kopper_update(struct pipe_screen *pscreen, struct pipe_resource *pres, int
{
struct zink_resource *res = zink_resource(pres);
struct zink_screen *screen = zink_screen(pscreen);
assert(res->obj->dt);
assert(pres->bind & PIPE_BIND_DISPLAY_TARGET);
if (!res->obj->dt)
return false;
struct kopper_displaytarget *cdt = kopper_displaytarget(res->obj->dt);
if (cdt->type != KOPPER_X11) {
*w = res->base.b.width0;
@@ -689,7 +691,7 @@ zink_kopper_update(struct pipe_screen *pscreen, struct pipe_resource *pres, int
return true;
}
if (update_caps(screen, cdt) != VK_SUCCESS) {
debug_printf("zink: failed to update swapchain capabilities");
mesa_loge("zink: failed to update swapchain capabilities");
return false;
}
*w = cdt->caps.currentExtent.width;

View File

@@ -86,12 +86,17 @@ zink_create_gfx_pipeline(struct zink_screen *screen,
switch (primitive_topology) {
case VK_PRIMITIVE_TOPOLOGY_POINT_LIST:
case VK_PRIMITIVE_TOPOLOGY_LINE_LIST:
case VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST:
case VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY:
case VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST:
case VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY:
if (screen->info.have_EXT_primitive_topology_list_restart) {
primitive_state.primitiveRestartEnable = state->dyn_state2.primitive_restart ? VK_TRUE : VK_FALSE;
break;
}
FALLTHROUGH;
case VK_PRIMITIVE_TOPOLOGY_PATCH_LIST:
if (state->dyn_state2.primitive_restart)
debug_printf("restart_index set with unsupported primitive topology %u\n", primitive_topology);
mesa_loge("zink: restart_index set with unsupported primitive topology %u\n", primitive_topology);
primitive_state.primitiveRestartEnable = VK_FALSE;
break;
default:

View File

@@ -768,7 +768,17 @@ update_qbo(struct zink_context *ctx, struct zink_query *q)
copy_pool_results_to_buffer(ctx, q, start->vkq[i]->pool->query_pool, start->vkq[i]->query_id,
zink_resource(qbo->buffers[i]),
offset,
1, VK_QUERY_RESULT_64_BIT);
1,
/*
there is an implicit execution dependency from
each such query command to all query commands previously submitted to the same queue. There
is one significant exception to this; if the flags parameter of vkCmdCopyQueryPoolResults does not
include VK_QUERY_RESULT_WAIT_BIT, execution of vkCmdCopyQueryPoolResults may happen-before
the results of vkCmdEndQuery are available.
* - Chapter 18. Queries
*/
VK_QUERY_RESULT_64_BIT | VK_QUERY_RESULT_WAIT_BIT);
}
if (!is_timestamp)
@@ -1230,6 +1240,16 @@ zink_get_query_result_resource(struct pipe_context *pctx,
return;
}
/*
there is an implicit execution dependency from
each such query command to all query commands previously submitted to the same queue. There
is one significant exception to this; if the flags parameter of vkCmdCopyQueryPoolResults does not
include VK_QUERY_RESULT_WAIT_BIT, execution of vkCmdCopyQueryPoolResults may happen-before
the results of vkCmdEndQuery are available.
* - Chapter 18. Queries
*/
size_flags |= VK_QUERY_RESULT_WAIT_BIT;
if (!is_time_query(query) && !is_bool_query(query)) {
if (num_queries == 1 && query->type != PIPE_QUERY_PRIMITIVES_GENERATED &&
query->type != PIPE_QUERY_PRIMITIVES_EMITTED &&

View File

@@ -260,7 +260,7 @@ get_image_usage_for_feats(struct zink_screen *screen, VkFormatFeatureFlags feats
usage |= VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;
if ((bind & (PIPE_BIND_LINEAR | PIPE_BIND_SHARED)) != (PIPE_BIND_LINEAR | PIPE_BIND_SHARED))
usage |= VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT;
} else if (templ->nr_samples)
} else if (templ->nr_samples || !(feats & VK_FORMAT_FEATURE_BLIT_DST_BIT))
/* this can't be populated, so we can't do it */
return 0;
}

View File

@@ -347,6 +347,7 @@ zink_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
if (screen->info.have_EXT_primitive_topology_list_restart) {
modes |= BITFIELD_BIT(PIPE_PRIM_POINTS) |
BITFIELD_BIT(PIPE_PRIM_LINES) |
BITFIELD_BIT(PIPE_PRIM_LINES_ADJACENCY) |
BITFIELD_BIT(PIPE_PRIM_TRIANGLES) |
BITFIELD_BIT(PIPE_PRIM_TRIANGLES_ADJACENCY);
if (screen->info.list_restart_feats.primitiveTopologyPatchListRestart)

View File

@@ -225,14 +225,32 @@ intel_get_urb_config(const struct intel_device_info *devinfo,
}
/* Lay out the URB in pipeline order: push constants, VS, HS, DS, GS. */
int next = push_constant_chunks;
int first_urb = push_constant_chunks;
/* From the BDW PRM: for 3DSTATE_URB_*: VS URB Starting Address
*
* "Value: [4,48] Device [SliceCount] GT 1"
*
* From the ICL PRMs and above :
*
* "If CTXT_SR_CTL::POSH_Enable is clear and Push Constants are required
* or Device[SliceCount] GT 1, the lower limit is 4."
*
* "If Push Constants are not required andDevice[SliceCount] == 1, the
* lower limit is 0."
*/
if ((devinfo->ver == 8 && devinfo->num_slices == 1) ||
(devinfo->ver >= 11 && push_constant_chunks > 0 && devinfo->num_slices == 1))
first_urb = MAX2(first_urb, 4);
int next_urb = first_urb;
for (int i = MESA_SHADER_VERTEX; i <= MESA_SHADER_GEOMETRY; i++) {
if (entries[i]) {
start[i] = next;
next += chunks[i];
start[i] = next_urb;
next_urb += chunks[i];
} else {
/* Just put disabled stages at the beginning. */
start[i] = 0;
/* Put disabled stages at the beginning of the valid range */
start[i] = first_urb;
}
}
@@ -359,4 +377,3 @@ intel_get_mesh_urb_config(const struct intel_device_info *devinfo,
return r;
}

View File

@@ -584,6 +584,13 @@ brw_nir_initialize_mue(nir_shader *nir,
nir_scoped_barrier(&b, NIR_SCOPE_WORKGROUP, NIR_SCOPE_WORKGROUP,
NIR_MEMORY_ACQ_REL, nir_var_shader_out);
}
if (remaining) {
nir_metadata_preserve(entrypoint, nir_metadata_none);
} else {
nir_metadata_preserve(entrypoint, nir_metadata_block_index |
nir_metadata_dominance);
}
}
static bool

View File

@@ -246,6 +246,7 @@ brw_nir_lower_intersection_shader(nir_shader *intersection,
}
}
}
nir_metadata_preserve(impl, nir_metadata_none);
/* We did some inlining; have to re-index SSA defs */
nir_index_ssa_defs(impl);

View File

@@ -298,7 +298,7 @@ anv_batch_emit_dwords(struct anv_batch *batch, int num_dwords)
struct anv_address
anv_batch_address(struct anv_batch *batch, void *batch_location)
{
assert(batch->start < batch_location);
assert(batch->start <= batch_location);
/* Allow a jump at the current location of the batch. */
assert(batch->next >= batch_location);

View File

@@ -119,7 +119,6 @@ bool
anv_nir_lower_ubo_loads(nir_shader *shader)
{
return nir_shader_instructions_pass(shader, lower_ubo_load_instr,
nir_metadata_block_index |
nir_metadata_dominance,
nir_metadata_none,
NULL);
}

View File

@@ -45,6 +45,7 @@
#include "varray.h"
#include "api_exec_decl.h"
#include "state_tracker/st_cb_bitmap.h"
#include "state_tracker/st_context.h"
void
@@ -865,6 +866,8 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
GLbitfield newEnabled =
state * ((1 << ctx->Const.MaxViewports) - 1);
if (newEnabled != ctx->Scissor.EnableFlags) {
st_flush_bitmap_cache(st_context(ctx));
FLUSH_VERTICES(ctx, 0,
GL_SCISSOR_BIT | GL_ENABLE_BIT);
ctx->NewDriverState |= ST_NEW_SCISSOR | ST_NEW_RASTERIZER;
@@ -1390,6 +1393,8 @@ _mesa_set_enablei(struct gl_context *ctx, GLenum cap,
return;
}
if (((ctx->Scissor.EnableFlags >> index) & 1) != state) {
st_flush_bitmap_cache(st_context(ctx));
FLUSH_VERTICES(ctx, 0,
GL_SCISSOR_BIT | GL_ENABLE_BIT);
ctx->NewDriverState |= ST_NEW_SCISSOR | ST_NEW_RASTERIZER;

View File

@@ -30,6 +30,7 @@
#include "main/scissor.h"
#include "api_exec_decl.h"
#include "state_tracker/st_cb_bitmap.h"
#include "state_tracker/st_context.h"
/**
@@ -50,6 +51,9 @@ set_scissor_no_notify(struct gl_context *ctx, unsigned idx,
height == ctx->Scissor.ScissorArray[idx].Height)
return;
if (ctx->Scissor.EnableFlags)
st_flush_bitmap_cache(st_context(ctx));
FLUSH_VERTICES(ctx, 0, GL_SCISSOR_BIT);
ctx->NewDriverState |= ST_NEW_SCISSOR;
@@ -294,6 +298,8 @@ _mesa_WindowRectanglesEXT(GLenum mode, GLsizei count, const GLint *box)
box += 4;
}
st_flush_bitmap_cache(st_context(ctx));
FLUSH_VERTICES(ctx, 0, GL_SCISSOR_BIT);
ctx->NewDriverState |= ST_NEW_WINDOW_RECTANGLES;

View File

@@ -72,7 +72,7 @@ st_convert_sampler(const struct st_context *st,
sampler->mag_img_filter = PIPE_TEX_FILTER_NEAREST;
}
if (texobj->Target != GL_TEXTURE_RECTANGLE_ARB)
if (texobj->Target != GL_TEXTURE_RECTANGLE_ARB || st->lower_rect_tex)
sampler->normalized_coords = 1;
sampler->lod_bias += tex_unit_lod_bias;

View File

@@ -207,6 +207,9 @@ static VkResult
dzn_cmd_buffer_reset(dzn_cmd_buffer *cmdbuf)
{
dzn_device *device = container_of(cmdbuf->vk.base.device, dzn_device, vk);
const struct dzn_physical_device *pdev =
container_of(device->vk.physical, dzn_physical_device, vk);
const struct vk_command_pool *pool = cmdbuf->vk.pool;
/* Reset the state */
memset(&cmdbuf->state, 0, sizeof(cmdbuf->state));
@@ -255,7 +258,9 @@ dzn_cmd_buffer_reset(dzn_cmd_buffer *cmdbuf)
cmdbuf->cmdlist->Release();
cmdbuf->cmdlist = NULL;
cmdbuf->cmdalloc->Reset();
if (FAILED(device->dev->CreateCommandList(0, D3D12_COMMAND_LIST_TYPE_DIRECT,
D3D12_COMMAND_LIST_TYPE type =
pdev->queue_families[pool->queue_family_index].desc.Type;
if (FAILED(device->dev->CreateCommandList(0, type,
cmdbuf->cmdalloc, NULL,
IID_PPV_ARGS(&cmdbuf->cmdlist)))) {
cmdbuf->error = vk_error(device, VK_ERROR_OUT_OF_HOST_MEMORY);

View File

@@ -202,7 +202,7 @@ pan_image_layout_init(const struct panfrost_device *dev,
if (should_align) {
effective_width = ALIGN_POT(effective_width, tile_w) >> tile_shift;
effective_height = ALIGN_POT(effective_height, tile_h);
effective_height = ALIGN_POT(effective_height, tile_h) >> tile_shift;
/* We don't need to align depth */
}

View File

@@ -150,8 +150,9 @@ vk_debug_report(struct vk_instance *instance,
const char* pLayerPrefix,
const char *pMessage)
{
VkDebugReportObjectTypeEXT object_type =
VkObjectType object_type =
object ? object->type : VK_OBJECT_TYPE_UNKNOWN;
debug_report(instance, flags, object_type, (uint64_t)(uintptr_t)object,
location, messageCode, pLayerPrefix, pMessage);
debug_report(instance, flags, (VkDebugReportObjectTypeEXT)object_type,
(uint64_t)(uintptr_t)object, location, messageCode,
pLayerPrefix, pMessage);
}