diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2022-04-21 04:23:05 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2022-04-21 04:23:05 +0000 |
commit | a09152815d99b8a68f7f5ed0e44bab39dd14a1e5 (patch) | |
tree | 2d0fdc70c25e62ac40fe0512a56b269564afb8f8 /lib/mesa/src/gallium | |
parent | 5141f851e7304b6ee32a98117c378cb814079903 (diff) |
Import Mesa 21.3.8
Diffstat (limited to 'lib/mesa/src/gallium')
25 files changed, 213 insertions, 165 deletions
diff --git a/lib/mesa/src/gallium/auxiliary/driver_trace/tr_context.c b/lib/mesa/src/gallium/auxiliary/driver_trace/tr_context.c index 7e28a4028..b3a367a5e 100644 --- a/lib/mesa/src/gallium/auxiliary/driver_trace/tr_context.c +++ b/lib/mesa/src/gallium/auxiliary/driver_trace/tr_context.c @@ -2191,7 +2191,7 @@ trace_context_create(struct trace_screen *tr_scr, if (!trace_enabled()) goto error1; - tr_ctx = ralloc(NULL, struct trace_context); + tr_ctx = rzalloc(NULL, struct trace_context); if (!tr_ctx) goto error1; diff --git a/lib/mesa/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c b/lib/mesa/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c index b771b7cc7..daed647ba 100644 --- a/lib/mesa/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c +++ b/lib/mesa/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c @@ -1438,6 +1438,7 @@ static void emit_tex(struct lp_build_nir_context *bld_base, { struct lp_build_nir_soa_context *bld = (struct lp_build_nir_soa_context *)bld_base; struct gallivm_state *gallivm = bld_base->base.gallivm; + LLVMBuilderRef builder = bld_base->base.gallivm->builder; params->type = bld_base->base.type; params->context_ptr = bld->context_ptr; @@ -1491,10 +1492,25 @@ static void emit_tex(struct lp_build_nir_context *bld_base, return; } - if (params->texture_index_offset) - params->texture_index_offset = LLVMBuildExtractElement(bld_base->base.gallivm->builder, - params->texture_index_offset, - lp_build_const_int32(bld_base->base.gallivm, 0), ""); + if (params->texture_index_offset) { + struct lp_build_loop_state loop_state; + LLVMValueRef exec_mask = mask_vec(bld_base); + LLVMValueRef outer_cond = LLVMBuildICmp(builder, LLVMIntNE, exec_mask, bld_base->uint_bld.zero, ""); + LLVMValueRef res_store = lp_build_alloca(gallivm, bld_base->uint_bld.elem_type, ""); + lp_build_loop_begin(&loop_state, gallivm, lp_build_const_int32(gallivm, 0)); + LLVMValueRef if_cond = LLVMBuildExtractElement(gallivm->builder, outer_cond, loop_state.counter, ""); + + struct lp_build_if_state ifthen; + lp_build_if(&ifthen, gallivm, if_cond); + LLVMValueRef value_ptr = LLVMBuildExtractElement(gallivm->builder, params->texture_index_offset, + loop_state.counter, ""); + LLVMBuildStore(builder, value_ptr, res_store); + lp_build_endif(&ifthen); + lp_build_loop_end_cond(&loop_state, lp_build_const_int32(gallivm, bld_base->uint_bld.type.length), + NULL, LLVMIntUGE); + LLVMValueRef idx_val = LLVMBuildLoad(builder, res_store, ""); + params->texture_index_offset = idx_val; + } params->type = bld_base->base.type; bld->sampler->emit_tex_sample(bld->sampler, diff --git a/lib/mesa/src/gallium/drivers/crocus/crocus_state.c b/lib/mesa/src/gallium/drivers/crocus/crocus_state.c index 4c3574216..61820ed22 100644 --- a/lib/mesa/src/gallium/drivers/crocus/crocus_state.c +++ b/lib/mesa/src/gallium/drivers/crocus/crocus_state.c @@ -1983,9 +1983,9 @@ get_line_width(const struct pipe_rasterizer_state *state) * "Grid Intersection Quantization" rules as specified by the * "Zero-Width (Cosmetic) Line Rasterization" section of the docs. */ - line_width = 0.0f; + /* hack around this for gfx4/5 fps counters in hud. */ + line_width = GFX_VER < 6 ? 1.5f : 0.0f; } - return line_width; } diff --git a/lib/mesa/src/gallium/drivers/iris/iris_program.c b/lib/mesa/src/gallium/drivers/iris/iris_program.c index a5e1dc137..973999bcc 100644 --- a/lib/mesa/src/gallium/drivers/iris/iris_program.c +++ b/lib/mesa/src/gallium/drivers/iris/iris_program.c @@ -2820,7 +2820,8 @@ iris_bind_vs_state(struct pipe_context *ctx, void *state) if (ice->state.vs_uses_draw_params != uses_draw_params || ice->state.vs_uses_derived_draw_params != uses_derived_draw_params || - ice->state.vs_needs_edge_flag != info->vs.needs_edge_flag) { + ice->state.vs_needs_edge_flag != info->vs.needs_edge_flag || + ice->state.vs_needs_sgvs_element != needs_sgvs_element) { ice->state.dirty |= IRIS_DIRTY_VERTEX_BUFFERS | IRIS_DIRTY_VERTEX_ELEMENTS; } diff --git a/lib/mesa/src/gallium/drivers/iris/iris_state.c b/lib/mesa/src/gallium/drivers/iris/iris_state.c index 40dc2d062..de553f320 100644 --- a/lib/mesa/src/gallium/drivers/iris/iris_state.c +++ b/lib/mesa/src/gallium/drivers/iris/iris_state.c @@ -6922,10 +6922,9 @@ iris_upload_compute_walker(struct iris_context *ice, iris_emit_cmd(batch, GENX(CFE_STATE), cfe) { cfe.MaximumNumberofThreads = devinfo->max_cs_threads * devinfo->subslice_total - 1; - if (prog_data->total_scratch > 0) { - cfe.ScratchSpaceBuffer = - iris_get_scratch_surf(ice, prog_data->total_scratch)->offset >> 4; - } + uint32_t scratch_addr = pin_scratch_space(ice, batch, prog_data, + MESA_SHADER_COMPUTE); + cfe.ScratchSpaceBuffer = scratch_addr >> 4; } } diff --git a/lib/mesa/src/gallium/drivers/llvmpipe/lp_state_surface.c b/lib/mesa/src/gallium/drivers/llvmpipe/lp_state_surface.c index 9c698383e..58aea7bed 100644 --- a/lib/mesa/src/gallium/drivers/llvmpipe/lp_state_surface.c +++ b/lib/mesa/src/gallium/drivers/llvmpipe/lp_state_surface.c @@ -67,13 +67,13 @@ llvmpipe_set_framebuffer_state(struct pipe_context *pipe, const struct util_format_description *depth_desc = util_format_description(depth_format); - if (lp->framebuffer.zsbuf && lp->framebuffer.zsbuf->context != pipe) { + if (fb->zsbuf && fb->zsbuf->context != pipe) { debug_printf("Illegal setting of fb state with zsbuf created in " "another context\n"); } for (i = 0; i < fb->nr_cbufs; i++) { - if (lp->framebuffer.cbufs[i] && - lp->framebuffer.cbufs[i]->context != pipe) { + if (fb->cbufs[i] && + fb->cbufs[i]->context != pipe) { debug_printf("Illegal setting of fb state with cbuf %d created in " "another context\n", i); } diff --git a/lib/mesa/src/gallium/drivers/panfrost/pan_context.c b/lib/mesa/src/gallium/drivers/panfrost/pan_context.c index 69bbc43f8..81722f05c 100644 --- a/lib/mesa/src/gallium/drivers/panfrost/pan_context.c +++ b/lib/mesa/src/gallium/drivers/panfrost/pan_context.c @@ -628,32 +628,35 @@ panfrost_set_sampler_views( struct panfrost_context *ctx = pan_context(pctx); ctx->dirty_shader[shader] |= PAN_DIRTY_STAGE_TEXTURE; - unsigned new_nr = 0; unsigned i; - assert(start_slot == 0); - - if (!views) - num_views = 0; - for (i = 0; i < num_views; ++i) { - if (views[i]) - new_nr = i + 1; + struct pipe_sampler_view *view = views ? views[i] : NULL; + unsigned p = i + start_slot; + if (take_ownership) { - pipe_sampler_view_reference((struct pipe_sampler_view **)&ctx->sampler_views[shader][i], + pipe_sampler_view_reference((struct pipe_sampler_view **)&ctx->sampler_views[shader][p], NULL); - ctx->sampler_views[shader][i] = (struct panfrost_sampler_view *)views[i]; + ctx->sampler_views[shader][i] = (struct panfrost_sampler_view *)view; } else { - pipe_sampler_view_reference((struct pipe_sampler_view **)&ctx->sampler_views[shader][i], - views[i]); + pipe_sampler_view_reference((struct pipe_sampler_view **)&ctx->sampler_views[shader][p], + view); } } - for (; i < ctx->sampler_view_count[shader]; i++) { - pipe_sampler_view_reference((struct pipe_sampler_view **)&ctx->sampler_views[shader][i], + for (; i < num_views + unbind_num_trailing_slots; i++) { + unsigned p = i + start_slot; + pipe_sampler_view_reference((struct pipe_sampler_view **)&ctx->sampler_views[shader][p], NULL); } - ctx->sampler_view_count[shader] = new_nr; + + /* Recalculate sampler view count */ + ctx->sampler_view_count[shader] = 0; + + for (i = 0; i < ARRAY_SIZE(ctx->sampler_views[shader]); ++i) { + if (ctx->sampler_views[shader][i]) + ctx->sampler_view_count[shader] = i + 1; + } } static void @@ -668,6 +671,8 @@ panfrost_set_shader_buffers( util_set_shader_buffers_mask(ctx->ssbo[shader], &ctx->ssbo_mask[shader], buffers, start, count); + + ctx->dirty_shader[shader] |= PAN_DIRTY_STAGE_SSBO; } static void diff --git a/lib/mesa/src/gallium/drivers/panfrost/pan_resource.c b/lib/mesa/src/gallium/drivers/panfrost/pan_resource.c index 5cf783945..f12f1c19c 100644 --- a/lib/mesa/src/gallium/drivers/panfrost/pan_resource.c +++ b/lib/mesa/src/gallium/drivers/panfrost/pan_resource.c @@ -153,31 +153,15 @@ panfrost_resource_get_handle(struct pipe_screen *pscreen, return true; } } else if (handle->type == WINSYS_HANDLE_TYPE_FD) { - if (scanout) { - struct drm_prime_handle args = { - .handle = scanout->handle, - .flags = DRM_CLOEXEC, - }; + int fd = panfrost_bo_export(rsrc->image.data.bo); - int ret = drmIoctl(dev->ro->kms_fd, DRM_IOCTL_PRIME_HANDLE_TO_FD, &args); - if (ret == -1) - return false; - - handle->stride = scanout->stride; - handle->handle = args.fd; - - return true; - } else { - int fd = panfrost_bo_export(rsrc->image.data.bo); - - if (fd < 0) - return false; + if (fd < 0) + return false; - handle->handle = fd; - handle->stride = rsrc->image.layout.slices[0].line_stride; - handle->offset = rsrc->image.layout.slices[0].offset; - return true; - } + handle->handle = fd; + handle->stride = rsrc->image.layout.slices[0].line_stride; + handle->offset = rsrc->image.layout.slices[0].offset; + return true; } return false; @@ -917,6 +901,9 @@ panfrost_ptr_map(struct pipe_context *pctx, } if (create_new_bo) { + /* Make sure we re-emit any descriptors using this resource */ + panfrost_dirty_state_all(ctx); + /* If the BO is used by one of the pending batches or if it's * not ready yet (still accessed by one of the already flushed * batches), we try to allocate a new one to avoid waiting. @@ -943,6 +930,12 @@ panfrost_ptr_map(struct pipe_context *pctx, panfrost_bo_unreference(bo); rsrc->image.data.bo = newbo; + /* Swapping out the BO will invalidate batches + * accessing this resource, flush them but do + * not wait for them. + */ + panfrost_flush_batches_accessing_rsrc(ctx, rsrc, "Resource shadowing"); + if (!copy_resource && drm_is_afbc(rsrc->image.layout.modifier)) panfrost_resource_init_afbc_headers(rsrc); diff --git a/lib/mesa/src/gallium/drivers/panfrost/pan_screen.c b/lib/mesa/src/gallium/drivers/panfrost/pan_screen.c index 3633ad366..8d39cac21 100644 --- a/lib/mesa/src/gallium/drivers/panfrost/pan_screen.c +++ b/lib/mesa/src/gallium/drivers/panfrost/pan_screen.c @@ -121,6 +121,7 @@ panfrost_get_param(struct pipe_screen *screen, enum pipe_cap param) case PIPE_CAP_SAMPLE_SHADING: case PIPE_CAP_FRAGMENT_SHADER_DERIVATIVES: case PIPE_CAP_FRAMEBUFFER_NO_ATTACHMENT: + case PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION: return 1; case PIPE_CAP_MAX_RENDER_TARGETS: diff --git a/lib/mesa/src/gallium/drivers/radeonsi/ci/navi10-piglit-quick-fail.csv b/lib/mesa/src/gallium/drivers/radeonsi/ci/navi10-piglit-quick-fail.csv index b937a49fa..d560732b6 100644 --- a/lib/mesa/src/gallium/drivers/radeonsi/ci/navi10-piglit-quick-fail.csv +++ b/lib/mesa/src/gallium/drivers/radeonsi/ci/navi10-piglit-quick-fail.csv @@ -115,10 +115,6 @@ spec@egl_chromium_sync_control@conformance,Fail spec@egl_chromium_sync_control@conformance@eglGetSyncValuesCHROMIUM_msc_and_sbc_test,Fail spec@egl_ext_protected_content@conformance,Fail spec@ext_framebuffer_blit@fbo-blit-check-limits,Fail -spec@ext_framebuffer_multisample@turn-on-off 2,Fail -spec@ext_framebuffer_multisample@turn-on-off 4,Fail -spec@ext_framebuffer_multisample@turn-on-off 6,Fail -spec@ext_framebuffer_multisample@turn-on-off 8,Fail spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_uyvy,Fail spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_yuyv,Fail spec@ext_texture_integer@fbo-integer,Fail diff --git a/lib/mesa/src/gallium/drivers/radeonsi/ci/radeonsi-stoney-fails.txt b/lib/mesa/src/gallium/drivers/radeonsi/ci/radeonsi-stoney-fails.txt index f56ce121a..6311e2f78 100644 --- a/lib/mesa/src/gallium/drivers/radeonsi/ci/radeonsi-stoney-fails.txt +++ b/lib/mesa/src/gallium/drivers/radeonsi/ci/radeonsi-stoney-fails.txt @@ -54,10 +54,6 @@ spec@egl_ext_protected_content@conformance,Fail spec@egl_khr_surfaceless_context@viewport,Fail spec@egl_mesa_configless_context@basic,Fail spec@ext_framebuffer_blit@fbo-blit-check-limits,Fail -spec@ext_framebuffer_multisample@turn-on-off 2,Fail -spec@ext_framebuffer_multisample@turn-on-off 4,Fail -spec@ext_framebuffer_multisample@turn-on-off 6,Fail -spec@ext_framebuffer_multisample@turn-on-off 8,Fail spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_y216,Fail spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_yuyv,Fail spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_uyvy,Fail diff --git a/lib/mesa/src/gallium/drivers/radeonsi/ci/raven-piglit-quick-fail.csv b/lib/mesa/src/gallium/drivers/radeonsi/ci/raven-piglit-quick-fail.csv index fe4bde09b..03d97002b 100644 --- a/lib/mesa/src/gallium/drivers/radeonsi/ci/raven-piglit-quick-fail.csv +++ b/lib/mesa/src/gallium/drivers/radeonsi/ci/raven-piglit-quick-fail.csv @@ -201,10 +201,6 @@ spec@egl_chromium_sync_control@conformance,Fail spec@egl_chromium_sync_control@conformance@eglGetSyncValuesCHROMIUM_msc_and_sbc_test,Fail spec@egl_ext_protected_content@conformance,Fail spec@ext_framebuffer_blit@fbo-blit-check-limits,Fail -spec@ext_framebuffer_multisample@turn-on-off 2,Fail -spec@ext_framebuffer_multisample@turn-on-off 4,Fail -spec@ext_framebuffer_multisample@turn-on-off 6,Fail -spec@ext_framebuffer_multisample@turn-on-off 8,Fail spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_uyvy,Fail spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_yuyv,Fail spec@ext_texture_integer@fbo-integer,Fail diff --git a/lib/mesa/src/gallium/drivers/radeonsi/ci/sienna_cichlid-piglit-quick-fail.csv b/lib/mesa/src/gallium/drivers/radeonsi/ci/sienna_cichlid-piglit-quick-fail.csv index 6a8e45a45..b35f7db44 100644 --- a/lib/mesa/src/gallium/drivers/radeonsi/ci/sienna_cichlid-piglit-quick-fail.csv +++ b/lib/mesa/src/gallium/drivers/radeonsi/ci/sienna_cichlid-piglit-quick-fail.csv @@ -116,10 +116,6 @@ spec@egl_chromium_sync_control@conformance,Fail spec@egl_chromium_sync_control@conformance@eglGetSyncValuesCHROMIUM_msc_and_sbc_test,Fail spec@egl_ext_protected_content@conformance,Fail spec@ext_framebuffer_blit@fbo-blit-check-limits,Fail -spec@ext_framebuffer_multisample@turn-on-off 2,Fail -spec@ext_framebuffer_multisample@turn-on-off 4,Fail -spec@ext_framebuffer_multisample@turn-on-off 6,Fail -spec@ext_framebuffer_multisample@turn-on-off 8,Fail spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_uyvy,Fail spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_yuyv,Fail spec@ext_texture_integer@fbo-integer,Fail diff --git a/lib/mesa/src/gallium/drivers/radeonsi/ci/traces-radeonsi.yml b/lib/mesa/src/gallium/drivers/radeonsi/ci/traces-radeonsi.yml index cbf5d0974..a9b47090e 100644 --- a/lib/mesa/src/gallium/drivers/radeonsi/ci/traces-radeonsi.yml +++ b/lib/mesa/src/gallium/drivers/radeonsi/ci/traces-radeonsi.yml @@ -5,19 +5,19 @@ traces: - path: glmark2/desktop:windows=4:effect=blur:blur-radius=5:passes=1:separable=true.trace expectations: - device: gl-radeonsi-stoney - checksum: d8c9bf6295525e65e318adeff02520e2 + checksum: 740fa8f8e9a9d815cf160b1893370755 - path: glmark2/jellyfish.trace expectations: - device: gl-radeonsi-stoney - checksum: f68bf374e535ad4a43a08786b0d536d8 + checksum: 5bc7d5c250b7d568313c4afd064082f6 - path: glxgears/glxgears-2.trace expectations: - device: gl-radeonsi-stoney - checksum: eb9b3d497be567f02a6e039fa32f2b13 + checksum: ef3653f50d4853d3e9cb3244c799565a - path: 0ad/0ad.trace expectations: - device: gl-radeonsi-stoney - checksum: 8fb8cd54f1ff908952fe0b6dd9f28999 + checksum: 1a089d8584a9e68e7ab08eada954741b - path: pathfinder/demo.trace expectations: - device: gl-radeonsi-stoney @@ -33,7 +33,7 @@ traces: - path: gputest/furmark.trace expectations: - device: gl-radeonsi-stoney - checksum: 84c499203944cdc59e70450c324bb8df + checksum: 4ceea12000bb5995b915228d2d4b49c7 - path: gputest/pixmark-piano.trace expectations: - device: gl-radeonsi-stoney @@ -45,47 +45,47 @@ traces: - path: humus/Portals.trace expectations: - device: gl-radeonsi-stoney - checksum: fc7d00efe380cacbd4e9ef9b231aea2f + checksum: 5b96333495b794691e4ed071ae92ff19 - path: glmark2/buffer:update-fraction=0.5:update-dispersion=0.9:columns=200:update-method=map:interleave=false.trace expectations: - device: gl-radeonsi-stoney - checksum: 5af6e31cc78320cb3f9db483c7a426e0 + checksum: 5db05161041946e8971f39f12bbd847c - path: glmark2/buffer:update-fraction=0.5:update-dispersion=0.9:columns=200:update-method=map:interleave=true.trace expectations: - device: gl-radeonsi-stoney - checksum: 6e9dc5a7dc5a9cbb2b396bfce88a2084 + checksum: e2154c522fcdb4f43b31b31c17adda74 - path: glmark2/buffer:update-fraction=0.5:update-dispersion=0.9:columns=200:update-method=subdata:interleave=false.trace expectations: - device: gl-radeonsi-stoney - checksum: 35e384f833f37411f15bf8ef80ca1914 + checksum: 70298e48479147af2d848a5441fb5f47 - path: glmark2/bump:bump-render=height.trace expectations: - device: gl-radeonsi-stoney - checksum: 526cf3805b9b64bb8edea1b7d86b9cae + checksum: f5129b06e401a5fefa18a9895b18deec - path: glmark2/bump:bump-render=high-poly.trace expectations: - device: gl-radeonsi-stoney - checksum: e026d36eaa71ecd957b47c7e6a5a100b + checksum: 3fc1adf0caa289b3296a80c2c13834ca - path: glmark2/bump:bump-render=normals.trace expectations: - device: gl-radeonsi-stoney - checksum: 4508a1be8c33a63fbfa695b141edf48b + checksum: 596fd7a084d3a7a6b61b322593385f45 - path: glmark2/conditionals:vertex-steps=0:fragment-steps=0.trace expectations: - device: gl-radeonsi-stoney - checksum: d12ecac5894705295e4fa076d77a72ab + checksum: fb2eda378ace8ca8b81d73d20cbfbbf7 - path: glmark2/conditionals:vertex-steps=0:fragment-steps=5.trace expectations: - device: gl-radeonsi-stoney - checksum: 8999ff7eda7d7cf25440b96ab0efd4ee + checksum: b8575de0e043f540b12f13209054d000 - path: glmark2/conditionals:vertex-steps=5:fragment-steps=0.trace expectations: - device: gl-radeonsi-stoney - checksum: e65fdae9fe7bbd95c5cc0fb0c3eb7bf4 + checksum: f70625a1f9bd9d2c211e330032b86f85 - path: glmark2/desktop:windows=4:effect=shadow.trace expectations: - device: gl-radeonsi-stoney - checksum: 2aff87605464dd3f61aefd4e1dc0bffd + checksum: 384015de55daf7dd406c9463576018e9 - path: glmark2/effect2d:kernel=0,1,0;1,-4,1;0,1,0;.trace expectations: - device: gl-radeonsi-stoney @@ -97,87 +97,87 @@ traces: - path: glmark2/function:fragment-steps=5:fragment-complexity=low.trace expectations: - device: gl-radeonsi-stoney - checksum: 13149880306d2183703a5c327f4d750a + checksum: 9efd8bb5df15f9483a18a00f9650caa9 - path: glmark2/function:fragment-steps=5:fragment-complexity=medium.trace expectations: - device: gl-radeonsi-stoney - checksum: c6983ffb3a74e234f84e5d817f876f54 + checksum: 9bdd506c0404cb11a7148cb08b429d1b - path: glmark2/build:use-vbo=false.trace expectations: - device: gl-radeonsi-stoney - checksum: 203a0205580b2c39ed8dcbed57b18f3c + checksum: 506b1910317b04e5d32aacf2bd70bd0d - path: glmark2/build:use-vbo=true.trace expectations: - device: gl-radeonsi-stoney - checksum: 437034f264c469757683e51e3e25beca + checksum: 793dc29115ae442b279276adb89d0999 - path: glmark2/ideas:speed=10000.trace expectations: - device: gl-radeonsi-stoney - checksum: 381d973b00b46fcc15f72808eabb6237 + checksum: 1ae057093620f868aad846167f04c6e0 - path: glmark2/loop:vertex-steps=5:fragment-steps=5:fragment-loop=false.trace expectations: - device: gl-radeonsi-stoney - checksum: 5a32f7917c130581fae23e58b71fd740 + checksum: 6fb2f9bce414879e3751bb51d1a8d481 - path: glmark2/loop:vertex-steps=5:fragment-steps=5:fragment-uniform=false.trace expectations: - device: gl-radeonsi-stoney - checksum: 20586c936a7051ce63503df6f9785d01 + checksum: 27fabda45ca2a989c21b4ec386a2e8f6 - path: glmark2/loop:vertex-steps=5:fragment-steps=5:fragment-uniform=true.trace expectations: - device: gl-radeonsi-stoney - checksum: 255e412701afdc4a7b62654e93b92cc9 + checksum: 05ac8be6e2e0c03ea1caec85f037cddd - path: glmark2/pulsar:quads=5:texture=false:light=false.trace expectations: - device: gl-radeonsi-stoney - checksum: 42f913c6119a685da4450ea116060614 + checksum: 0b62b9c04e4c00f44eba64b366c47783 - path: glmark2/refract.trace expectations: - device: gl-radeonsi-stoney - checksum: 9d0a2d2fce0b80a265fbcee5107c9e82 + checksum: c711f3a07f6aa9e0f19c544c6d7c2000 - path: glmark2/shading:shading=blinn-phong-inf.trace expectations: - device: gl-radeonsi-stoney - checksum: 4a2cf8a13b248f470e58f785d0a9207d + checksum: 429c6bbdf99d573cc4eaaee3c0471257 - path: glmark2/shading:shading=cel.trace expectations: - device: gl-radeonsi-stoney - checksum: 8325ce4073135c03eec241087e51a584 + checksum: 330d9a8375970e42ba5ddc3142dc6477 - path: glmark2/shading:shading=gouraud.trace expectations: - device: gl-radeonsi-stoney - checksum: fbe5b7d038866f6cd4fc801b062e4ce5 + checksum: e22908309d41af8c9753c5c7cae73b29 - path: glmark2/shading:shading=phong.trace expectations: - device: gl-radeonsi-stoney - checksum: 65f9468a37d683b4c1f38d34f09a97db + checksum: 2ac9f1b6ba39f8924b374d18181edeeb - path: glmark2/shadow.trace expectations: - device: gl-radeonsi-stoney - checksum: abd705b0ae76cf6f19905bfea1d3db76 + checksum: 9215a1525dfe5b12999652b3a3ba05d8 - path: glmark2/terrain.trace expectations: - device: gl-radeonsi-stoney - checksum: 59690f1438a1e44fc655d16ce8bb348b + checksum: 80a1bba6ff969c9a82c68de0306f2b61 - path: glmark2/texture:texture-filter=linear.trace expectations: - device: gl-radeonsi-stoney - checksum: 54bf32b499f3ebfe0e727e5716e54b1a + checksum: 928479421abda4823a673393cd59ff81 - path: glmark2/texture:texture-filter=mipmap.trace expectations: - device: gl-radeonsi-stoney - checksum: 3a3abce164eef2be10f58604b22583f2 + checksum: cb94bca58ed8f41c5f6f6dda3fb15600 - path: glmark2/texture:texture-filter=nearest.trace expectations: - device: gl-radeonsi-stoney - checksum: 311c394eb4afd48bd8330d0e69470b87 + checksum: 63762536d93048c0dadb19b22381cb90 - path: godot/Material Testers.x86_64_2020.04.08_13.38_frame799.rdc expectations: - device: gl-radeonsi-stoney - checksum: 02f654ad77c0c1106e1b31e1c86c93bb + checksum: 0e7441a7f2c86c75eeac72269786e7a1 - path: gputest/gimark.trace expectations: - device: gl-radeonsi-stoney - checksum: 4442dbd44a9704c499da4817fffce306 + checksum: 3e021c1c5f2900e53c3375e0366eeda9 - path: gputest/pixmark-julia-fp32.trace expectations: - device: gl-radeonsi-stoney @@ -193,44 +193,44 @@ traces: - path: gputest/plot3d.trace expectations: - device: gl-radeonsi-stoney - checksum: 667078b0f51ac8e0469ef9a20326c616 + checksum: 2832d2190df232bcbde71a4b720303e1 - path: gputest/tessmark.trace expectations: - device: gl-radeonsi-stoney - checksum: cdcf984e81f2cda9ca7f56e3a4addaa7 + checksum: b4bc7998ff804bf25aac9f9609b8acbf - path: humus/AmbientAperture.trace expectations: - device: gl-radeonsi-stoney - checksum: 664ea58a62b27737b7d0ae9e86ab85c0 + checksum: 679dc88e5f0d3b3608e0490b4b39fbea - path: humus/CelShading.trace expectations: - device: gl-radeonsi-stoney - checksum: 7d30dbe3470873c327464ea7ebe6bcf0 + checksum: ebd3f460386b9461aab6adef04dc0547 - path: humus/DynamicBranching3.trace expectations: - device: gl-radeonsi-stoney - checksum: 5a5addfb1c7acc22104c0ecb29f45174 + checksum: 9f932808ccce10a2bf7568ddafe1a1cf - path: humus/HDR.trace expectations: - device: gl-radeonsi-stoney - checksum: b44ce4cb377321f6423a5a62a9083794 + checksum: fddf642f7a4e3946f1975e33cf773220 - path: humus/RaytracedShadows.trace expectations: - device: gl-radeonsi-stoney - checksum: 2e2e58e0b32329d6cf90ab0ec71108fd + checksum: 743ce9c218b87404cfe615ed7951d5b8 - path: humus/VolumetricFogging2.trace expectations: - device: gl-radeonsi-stoney - checksum: 1a9b3aa90d2c4a0d3937ecacca2da052 + checksum: e3eb8d6934c23cbef7133ba501821698 - path: supertuxkart/supertuxkart-antediluvian-abyss.rdc expectations: - device: gl-radeonsi-stoney - checksum: fd717f0214c2e5d08538d2de30bfe180 + checksum: 112f203971d0f1ae46bc8268683480a2 - path: supertuxkart/supertuxkart-menu.rdc expectations: - device: gl-radeonsi-stoney - checksum: bc851bb8808b311c2df9c36a6c289e6e + checksum: e17f3125683d8b2acac8bc0b4b8e1b44 - path: supertuxkart/supertuxkart-ravenbridge-mansion.rdc expectations: - device: gl-radeonsi-stoney - checksum: f2e730f7378af65abbf82cc30e4ba64d + checksum: 60f74020451e9beaf586b4551541b763 diff --git a/lib/mesa/src/gallium/drivers/radeonsi/si_state_viewport.c b/lib/mesa/src/gallium/drivers/radeonsi/si_state_viewport.c index 3c753c618..3a7df5d95 100644 --- a/lib/mesa/src/gallium/drivers/radeonsi/si_state_viewport.c +++ b/lib/mesa/src/gallium/drivers/radeonsi/si_state_viewport.c @@ -366,7 +366,7 @@ static void si_emit_guardband(struct si_context *ctx) S_028234_HW_SCREEN_OFFSET_Y(hw_screen_offset_y >> 4)); radeon_opt_set_context_reg( ctx, R_028BE4_PA_SU_VTX_CNTL, SI_TRACKED_PA_SU_VTX_CNTL, - S_028BE4_PIX_CENTER(rs->half_pixel_center) | + S_028BE4_PIX_CENTER(rs->half_pixel_center) | S_028BE4_ROUND_MODE(V_028BE4_X_ROUND_TO_EVEN) | S_028BE4_QUANT_MODE(V_028BE4_X_16_8_FIXED_POINT_1_256TH + vp_as_scissor.quant_mode)); radeon_end_update_context_roll(ctx); } diff --git a/lib/mesa/src/gallium/drivers/zink/zink_compiler.c b/lib/mesa/src/gallium/drivers/zink/zink_compiler.c index d34c7a47a..bbb7bde24 100644 --- a/lib/mesa/src/gallium/drivers/zink/zink_compiler.c +++ b/lib/mesa/src/gallium/drivers/zink/zink_compiler.c @@ -379,7 +379,7 @@ zink_screen_init_compiler(struct zink_screen *screen) .lower_unpack_32_2x16_split = true, .lower_vector_cmp = true, .lower_int64_options = 0, - .lower_doubles_options = ~nir_lower_fp64_full_software, + .lower_doubles_options = 0, .lower_uniforms_to_ubo = true, .has_fsub = true, .has_isub = true, @@ -397,6 +397,21 @@ zink_screen_init_compiler(struct zink_screen *screen) screen->nir_options.lower_flrp64 = true; screen->nir_options.lower_ffma64 = true; } + + /* + The OpFRem and OpFMod instructions use cheap approximations of remainder, + and the error can be large due to the discontinuity in trunc() and floor(). + This can produce mathematically unexpected results in some cases, such as + FMod(x,x) computing x rather than 0, and can also cause the result to have + a different sign than the infinitely precise result. + + -Table 84. Precision of core SPIR-V Instructions + * for drivers that are known to have imprecise fmod for doubles, lower dmod + */ + if (screen->info.driver_props.driverID == VK_DRIVER_ID_MESA_RADV || + screen->info.driver_props.driverID == VK_DRIVER_ID_AMD_OPEN_SOURCE || + screen->info.driver_props.driverID == VK_DRIVER_ID_AMD_PROPRIETARY) + screen->nir_options.lower_doubles_options = nir_lower_dmod; } const void * diff --git a/lib/mesa/src/gallium/drivers/zink/zink_context.c b/lib/mesa/src/gallium/drivers/zink/zink_context.c index 2babcf3b2..e29d2c810 100644 --- a/lib/mesa/src/gallium/drivers/zink/zink_context.c +++ b/lib/mesa/src/gallium/drivers/zink/zink_context.c @@ -745,10 +745,24 @@ zink_create_sampler_view(struct pipe_context *pctx, struct pipe_resource *pres, ivci.subresourceRange.aspectMask = sampler_aspect_from_format(state->format); /* samplers for stencil aspects of packed formats need to always use stencil swizzle */ if (ivci.subresourceRange.aspectMask & (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT)) { - ivci.components.r = zink_component_mapping(clamp_zs_swizzle(sampler_view->base.swizzle_r)); - ivci.components.g = zink_component_mapping(clamp_zs_swizzle(sampler_view->base.swizzle_g)); - ivci.components.b = zink_component_mapping(clamp_zs_swizzle(sampler_view->base.swizzle_b)); - ivci.components.a = zink_component_mapping(clamp_zs_swizzle(sampler_view->base.swizzle_a)); + if (sampler_view->base.swizzle_r == PIPE_SWIZZLE_0 && + sampler_view->base.swizzle_g == PIPE_SWIZZLE_0 && + sampler_view->base.swizzle_b == PIPE_SWIZZLE_0 && + sampler_view->base.swizzle_a == PIPE_SWIZZLE_X) { + /* + * When the state tracker asks for 000x swizzles, this is depth mode GL_ALPHA, + * however with the single dref fetch this will fail, so just spam all the channels. + */ + ivci.components.r = VK_COMPONENT_SWIZZLE_R; + ivci.components.g = VK_COMPONENT_SWIZZLE_R; + ivci.components.b = VK_COMPONENT_SWIZZLE_R; + ivci.components.a = VK_COMPONENT_SWIZZLE_R; + } else { + ivci.components.r = zink_component_mapping(clamp_zs_swizzle(sampler_view->base.swizzle_r)); + ivci.components.g = zink_component_mapping(clamp_zs_swizzle(sampler_view->base.swizzle_g)); + ivci.components.b = zink_component_mapping(clamp_zs_swizzle(sampler_view->base.swizzle_b)); + ivci.components.a = zink_component_mapping(clamp_zs_swizzle(sampler_view->base.swizzle_a)); + } } else { /* if we have e.g., R8G8B8X8, then we have to ignore alpha since we're just emulating * these formats diff --git a/lib/mesa/src/gallium/drivers/zink/zink_descriptors.c b/lib/mesa/src/gallium/drivers/zink/zink_descriptors.c index 6fd529009..0ec3a73ca 100644 --- a/lib/mesa/src/gallium/drivers/zink/zink_descriptors.c +++ b/lib/mesa/src/gallium/drivers/zink/zink_descriptors.c @@ -696,13 +696,13 @@ allocate_desc_set(struct zink_context *ctx, struct zink_program *pg, enum zink_d #endif switch (type) { case ZINK_DESCRIPTOR_TYPE_SAMPLER_VIEW: - zds->sampler_states = (struct zink_sampler_state**)&samplers[i * pool->key.layout->num_descriptors]; + zds->sampler_states = (struct zink_sampler_state**)&samplers[i * num_resources]; FALLTHROUGH; case ZINK_DESCRIPTOR_TYPE_IMAGE: - zds->surfaces = &surfaces[i * pool->key.layout->num_descriptors]; + zds->surfaces = &surfaces[i * num_resources]; break; default: - zds->res_objs = (struct zink_resource_object**)&res_objs[i * pool->key.layout->num_descriptors]; + zds->res_objs = (struct zink_resource_object**)&res_objs[i * num_resources]; break; } zds->desc_set = desc_set[i]; @@ -790,20 +790,28 @@ zink_descriptor_set_get(struct zink_context *ctx, simple_mtx_lock(&pool->mtx); if (last_set && last_set->hash == hash && desc_state_equal(&last_set->key, &key)) { + bool was_recycled = false; zds = last_set; *cache_hit = !zds->invalid; if (zds->recycled) { struct hash_entry *he = _mesa_hash_table_search_pre_hashed(pool->free_desc_sets, hash, &key); - if (he) + if (he) { + was_recycled = true; _mesa_hash_table_remove(pool->free_desc_sets, he); + } zds->recycled = false; } if (zds->invalid) { if (zink_batch_usage_exists(zds->batch_uses)) punt_invalid_set(zds, NULL); - else + else { + if (was_recycled) { + descriptor_set_invalidate(zds); + goto out; + } /* this set is guaranteed to be in pool->alloc_desc_sets */ goto skip_hash_tables; + } zds = NULL; } if (zds) @@ -828,6 +836,8 @@ zink_descriptor_set_get(struct zink_context *ctx, zds = (void*)he->data; *cache_hit = !zds->invalid; if (recycled) { + if (zds->invalid) + descriptor_set_invalidate(zds); /* need to migrate this entry back to the in-use hash */ _mesa_hash_table_remove(pool->free_desc_sets, he); goto out; @@ -1419,6 +1429,7 @@ zink_descriptors_update(struct zink_context *ctx, bool is_compute) if (pg->dd->push_usage) { if (pg->dd->fbfetch) { /* fbfetch is not cacheable: grab a lazy set because it's faster */ + cache_hit = false; desc_set = zink_descriptors_alloc_lazy_push(ctx); } else { zds = zink_descriptor_set_get(ctx, ZINK_DESCRIPTOR_TYPES, is_compute, &cache_hit); diff --git a/lib/mesa/src/gallium/drivers/zink/zink_draw.cpp b/lib/mesa/src/gallium/drivers/zink/zink_draw.cpp index e97713e99..e7c6af72a 100644 --- a/lib/mesa/src/gallium/drivers/zink/zink_draw.cpp +++ b/lib/mesa/src/gallium/drivers/zink/zink_draw.cpp @@ -193,6 +193,8 @@ update_gfx_program(struct zink_context *ctx) prog = (struct zink_gfx_program*)entry->data; u_foreach_bit(stage, prog->stages_present & ~ctx->dirty_shader_stages) ctx->gfx_pipeline_state.modules[stage] = prog->modules[stage]->shader; + /* ensure variants are always updated if keys have changed since last use */ + ctx->dirty_shader_stages |= prog->stages_present; } else { ctx->dirty_shader_stages |= bits; prog = zink_create_gfx_program(ctx, ctx->gfx_stages, ctx->gfx_pipeline_state.vertices_per_patch + 1); diff --git a/lib/mesa/src/gallium/drivers/zink/zink_program.c b/lib/mesa/src/gallium/drivers/zink/zink_program.c index 6e69c0cb4..a6c697979 100644 --- a/lib/mesa/src/gallium/drivers/zink/zink_program.c +++ b/lib/mesa/src/gallium/drivers/zink/zink_program.c @@ -557,6 +557,7 @@ void zink_destroy_gfx_program(struct zink_screen *screen, struct zink_gfx_program *prog) { + util_queue_fence_wait(&prog->base.cache_fence); if (prog->base.layout) VKSCR(DestroyPipelineLayout)(screen->dev, prog->base.layout, NULL); @@ -601,6 +602,7 @@ void zink_destroy_compute_program(struct zink_screen *screen, struct zink_compute_program *comp) { + util_queue_fence_wait(&comp->base.cache_fence); if (comp->base.layout) VKSCR(DestroyPipelineLayout)(screen->dev, comp->base.layout, NULL); diff --git a/lib/mesa/src/gallium/drivers/zink/zink_screen.c b/lib/mesa/src/gallium/drivers/zink/zink_screen.c index 042c63fd3..9530202c0 100644 --- a/lib/mesa/src/gallium/drivers/zink/zink_screen.c +++ b/lib/mesa/src/gallium/drivers/zink/zink_screen.c @@ -184,7 +184,7 @@ zink_screen_update_pipeline_cache(struct zink_screen *screen, struct zink_progra if (!screen->disk_cache) return; - util_queue_add_job(&screen->cache_put_thread, pg, NULL, cache_put_job, NULL, 0); + util_queue_add_job(&screen->cache_put_thread, pg, &pg->cache_fence, cache_put_job, NULL, 0); } static void diff --git a/lib/mesa/src/gallium/frontends/lavapipe/lvp_cmd_buffer.c b/lib/mesa/src/gallium/frontends/lavapipe/lvp_cmd_buffer.c index cb2d58226..152283ae5 100644 --- a/lib/mesa/src/gallium/frontends/lavapipe/lvp_cmd_buffer.c +++ b/lib/mesa/src/gallium/frontends/lavapipe/lvp_cmd_buffer.c @@ -265,6 +265,7 @@ VKAPI_ATTR void VKAPI_CALL lvp_TrimCommandPool( &pool->free_cmd_buffers, pool_link) { lvp_cmd_buffer_destroy(cmd_buffer); } + list_inithead(&pool->free_cmd_buffers); } VKAPI_ATTR void VKAPI_CALL lvp_CmdDrawMultiEXT( diff --git a/lib/mesa/src/gallium/frontends/lavapipe/lvp_execute.c b/lib/mesa/src/gallium/frontends/lavapipe/lvp_execute.c index 30d7bf3c0..1ca094ad8 100644 --- a/lib/mesa/src/gallium/frontends/lavapipe/lvp_execute.c +++ b/lib/mesa/src/gallium/frontends/lavapipe/lvp_execute.c @@ -573,40 +573,6 @@ static void handle_graphics_pipeline(struct vk_cmd_queue_entry *cmd, state->rs_dirty = true; } - state->disable_multisample = pipeline->disable_multisample; - if (pipeline->graphics_create_info.pMultisampleState) { - const VkPipelineMultisampleStateCreateInfo *ms = pipeline->graphics_create_info.pMultisampleState; - state->rs_state.multisample = ms->rasterizationSamples > 1; - state->sample_mask = ms->pSampleMask ? ms->pSampleMask[0] : 0xffffffff; - state->blend_state.alpha_to_coverage = ms->alphaToCoverageEnable; - state->blend_state.alpha_to_one = ms->alphaToOneEnable; - state->blend_dirty = true; - state->rs_dirty = true; - state->min_samples = 1; - state->sample_mask_dirty = true; - fb_samples = ms->rasterizationSamples; - if (ms->sampleShadingEnable) { - state->min_samples = ceil(ms->rasterizationSamples * ms->minSampleShading); - if (state->min_samples > 1) - state->min_samples = ms->rasterizationSamples; - if (state->min_samples < 1) - state->min_samples = 1; - } - if (pipeline->force_min_sample) - state->min_samples = ms->rasterizationSamples; - state->min_samples_dirty = true; - } else { - state->rs_state.multisample = false; - state->sample_mask_dirty = state->sample_mask != 0xffffffff; - state->sample_mask = 0xffffffff; - state->min_samples_dirty = state->min_samples; - state->min_samples = 0; - state->blend_dirty |= state->blend_state.alpha_to_coverage || state->blend_state.alpha_to_one; - state->blend_state.alpha_to_coverage = false; - state->blend_state.alpha_to_one = false; - state->rs_dirty = true; - } - if (pipeline->graphics_create_info.pDepthStencilState) { const VkPipelineDepthStencilStateCreateInfo *dsa = pipeline->graphics_create_info.pDepthStencilState; @@ -710,6 +676,40 @@ static void handle_graphics_pipeline(struct vk_cmd_queue_entry *cmd, state->blend_dirty = true; } + state->disable_multisample = pipeline->disable_multisample; + if (pipeline->graphics_create_info.pMultisampleState) { + const VkPipelineMultisampleStateCreateInfo *ms = pipeline->graphics_create_info.pMultisampleState; + state->rs_state.multisample = ms->rasterizationSamples > 1; + state->sample_mask = ms->pSampleMask ? ms->pSampleMask[0] : 0xffffffff; + state->blend_state.alpha_to_coverage = ms->alphaToCoverageEnable; + state->blend_state.alpha_to_one = ms->alphaToOneEnable; + state->blend_dirty = true; + state->rs_dirty = true; + state->min_samples = 1; + state->sample_mask_dirty = true; + fb_samples = ms->rasterizationSamples; + if (ms->sampleShadingEnable) { + state->min_samples = ceil(ms->rasterizationSamples * ms->minSampleShading); + if (state->min_samples > 1) + state->min_samples = ms->rasterizationSamples; + if (state->min_samples < 1) + state->min_samples = 1; + } + if (pipeline->force_min_sample) + state->min_samples = ms->rasterizationSamples; + state->min_samples_dirty = true; + } else { + state->rs_state.multisample = false; + state->sample_mask_dirty = state->sample_mask != 0xffffffff; + state->sample_mask = 0xffffffff; + state->min_samples_dirty = state->min_samples; + state->min_samples = 0; + state->blend_dirty |= state->blend_state.alpha_to_coverage || state->blend_state.alpha_to_one; + state->blend_state.alpha_to_coverage = false; + state->blend_state.alpha_to_one = false; + state->rs_dirty = true; + } + if (!dynamic_states[conv_dynamic_state_idx(VK_DYNAMIC_STATE_VERTEX_INPUT_EXT)]) { const VkPipelineVertexInputStateCreateInfo *vi = pipeline->graphics_create_info.pVertexInputState; int i; @@ -1011,8 +1011,6 @@ static void fill_sampler_view_stage(struct rendering_state *state, */ if (iv->subresourceRange.aspectMask == VK_IMAGE_ASPECT_DEPTH_BIT || iv->subresourceRange.aspectMask == VK_IMAGE_ASPECT_STENCIL_BIT) { - if (templ.swizzle_a == PIPE_SWIZZLE_X) - templ.swizzle_r = PIPE_SWIZZLE_X; fix_depth_swizzle(templ.swizzle_r); fix_depth_swizzle(templ.swizzle_g); fix_depth_swizzle(templ.swizzle_b); diff --git a/lib/mesa/src/gallium/frontends/lavapipe/lvp_formats.c b/lib/mesa/src/gallium/frontends/lavapipe/lvp_formats.c index b30853a9d..6831a6587 100644 --- a/lib/mesa/src/gallium/frontends/lavapipe/lvp_formats.c +++ b/lib/mesa/src/gallium/frontends/lavapipe/lvp_formats.c @@ -230,6 +230,9 @@ static VkResult lvp_get_image_format_properties(struct lvp_physical_device *phys break; } + if (info->flags & VK_IMAGE_CREATE_EXTENDED_USAGE_BIT) + goto skip_checks; + if (info->usage & VK_IMAGE_USAGE_SAMPLED_BIT) { if (!(format_feature_flags & VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT)) { goto unsupported; @@ -273,6 +276,7 @@ static VkResult lvp_get_image_format_properties(struct lvp_physical_device *phys } } +skip_checks: *pImageFormatProperties = (VkImageFormatProperties) { .maxExtent = maxExtent, .maxMipLevels = maxMipLevels, diff --git a/lib/mesa/src/gallium/frontends/lavapipe/lvp_pipeline.c b/lib/mesa/src/gallium/frontends/lavapipe/lvp_pipeline.c index 80551d4c4..6a4ed65a7 100644 --- a/lib/mesa/src/gallium/frontends/lavapipe/lvp_pipeline.c +++ b/lib/mesa/src/gallium/frontends/lavapipe/lvp_pipeline.c @@ -602,6 +602,8 @@ lvp_shader_compile_to_ir(struct lvp_pipeline *pipeline, NIR_PASS(progress, nir, nir_opt_deref); NIR_PASS(progress, nir, nir_lower_vars_to_ssa); + NIR_PASS(progress, nir, nir_opt_copy_prop_vars); + NIR_PASS(progress, nir, nir_copy_prop); NIR_PASS(progress, nir, nir_opt_dce); NIR_PASS(progress, nir, nir_opt_peephole_select, 8, true, true); |