diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2020-09-03 06:45:04 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2020-09-03 06:45:04 +0000 |
commit | 503988bc5f236336c432bb16698c4687e482ce16 (patch) | |
tree | 23734db9fb1a7017821b1491d76138b635687252 /lib/mesa/src/gallium/drivers | |
parent | 526c85132de0a63a11dddc6e59ac67c94d2e0959 (diff) |
Import Mesa 20.1.7
Diffstat (limited to 'lib/mesa/src/gallium/drivers')
7 files changed, 20 insertions, 2 deletions
diff --git a/lib/mesa/src/gallium/drivers/panfrost/pan_blend_cso.c b/lib/mesa/src/gallium/drivers/panfrost/pan_blend_cso.c index d0824ed48..52575cb03 100644 --- a/lib/mesa/src/gallium/drivers/panfrost/pan_blend_cso.c +++ b/lib/mesa/src/gallium/drivers/panfrost/pan_blend_cso.c @@ -166,7 +166,7 @@ panfrost_delete_blend_state(struct pipe_context *pipe, { struct panfrost_blend_state *blend = (struct panfrost_blend_state *) cso; - for (unsigned c = 0; c < 4; ++c) { + for (unsigned c = 0; c < PIPE_MAX_COLOR_BUFS; ++c) { struct panfrost_blend_rt *rt = &blend->rt[c]; _mesa_hash_table_u64_clear(rt->shaders, panfrost_delete_blend_shader); } diff --git a/lib/mesa/src/gallium/drivers/panfrost/pan_job.c b/lib/mesa/src/gallium/drivers/panfrost/pan_job.c index 27745c742..1ef4de1bb 100644 --- a/lib/mesa/src/gallium/drivers/panfrost/pan_job.c +++ b/lib/mesa/src/gallium/drivers/panfrost/pan_job.c @@ -178,6 +178,8 @@ panfrost_free_batch(struct panfrost_batch *batch) panfrost_batch_fence_unreference(*dep); } + util_dynarray_fini(&batch->dependencies); + /* The out_sync fence lifetime is different from the the batch one * since other batches might want to wait on a fence of already * submitted/signaled batch. All we need to do here is make sure the diff --git a/lib/mesa/src/gallium/drivers/radeonsi/si_debug_options.h b/lib/mesa/src/gallium/drivers/radeonsi/si_debug_options.h index 83c7425e0..febb31357 100644 --- a/lib/mesa/src/gallium/drivers/radeonsi/si_debug_options.h +++ b/lib/mesa/src/gallium/drivers/radeonsi/si_debug_options.h @@ -7,5 +7,6 @@ OPT_BOOL(halt_shaders, false, "Halt shaders at the start (will hang)") OPT_BOOL(vs_fetch_always_opencode, false, "Always open code vertex fetches (less efficient, purely for testing)") OPT_BOOL(prim_restart_tri_strips_only, false, "Only enable primitive restart for triangle strips") +OPT_BOOL(clamp_div_by_zero, false, "Clamp div by zero (x / 0 becomes FLT_MAX instead of NaN)") #undef OPT_BOOL diff --git a/lib/mesa/src/gallium/drivers/radeonsi/si_get.c b/lib/mesa/src/gallium/drivers/radeonsi/si_get.c index 9a10a82e0..9b47fe236 100644 --- a/lib/mesa/src/gallium/drivers/radeonsi/si_get.c +++ b/lib/mesa/src/gallium/drivers/radeonsi/si_get.c @@ -162,6 +162,7 @@ static int si_get_param(struct pipe_screen *pscreen, enum pipe_cap param) case PIPE_CAP_DRAW_INFO_START_WITH_USER_INDICES: case PIPE_CAP_ALPHA_TO_COVERAGE_DITHER_CONTROL: case PIPE_CAP_MAP_UNSYNCHRONIZED_THREAD_SAFE: + case PIPE_CAP_NO_CLIP_ON_COPY_TEX: return 1; case PIPE_CAP_QUERY_SO_OVERFLOW: diff --git a/lib/mesa/src/gallium/drivers/radeonsi/si_shader_llvm.c b/lib/mesa/src/gallium/drivers/radeonsi/si_shader_llvm.c index 63c9c033a..e200114ef 100644 --- a/lib/mesa/src/gallium/drivers/radeonsi/si_shader_llvm.c +++ b/lib/mesa/src/gallium/drivers/radeonsi/si_shader_llvm.c @@ -452,6 +452,7 @@ bool si_nir_build_llvm(struct si_shader_context *ctx, struct nir_shader *nir) ctx->abi.inputs = &ctx->inputs[0]; ctx->abi.clamp_shadow_reference = true; ctx->abi.robust_buffer_access = true; + ctx->abi.clamp_div_by_zero = ctx->screen->options.clamp_div_by_zero; if (ctx->shader->selector->info.properties[TGSI_PROPERTY_CS_LOCAL_SIZE]) { assert(gl_shader_stage_is_compute(nir->info.stage)); diff --git a/lib/mesa/src/gallium/drivers/radeonsi/si_shader_llvm_tess.c b/lib/mesa/src/gallium/drivers/radeonsi/si_shader_llvm_tess.c index 5dba98599..26b0d0cb5 100644 --- a/lib/mesa/src/gallium/drivers/radeonsi/si_shader_llvm_tess.c +++ b/lib/mesa/src/gallium/drivers/radeonsi/si_shader_llvm_tess.c @@ -513,7 +513,7 @@ static void si_nir_store_output_tcs(struct ac_shader_abi *abi, const struct nir_ { struct si_shader_context *ctx = si_shader_context_from_abi(abi); struct si_shader_info *info = &ctx->shader->selector->info; - const unsigned component = var->data.location_frac; + unsigned component = var->data.location_frac; unsigned driver_location = var->data.driver_location; LLVMValueRef dw_addr, stride; LLVMValueRef buffer, base, addr; @@ -521,6 +521,12 @@ static void si_nir_store_output_tcs(struct ac_shader_abi *abi, const struct nir_ bool skip_lds_store; bool is_tess_factor = false, is_tess_inner = false; + if (var->data.compact) { + component += const_index; + writemask <<= const_index; + const_index = 0; + } + driver_location = driver_location / 4; ubyte name = info->output_semantic_name[driver_location]; ubyte index = info->output_semantic_index[driver_location]; diff --git a/lib/mesa/src/gallium/drivers/v3d/v3dx_rcl.c b/lib/mesa/src/gallium/drivers/v3d/v3dx_rcl.c index 0582e9aba..739088ec3 100644 --- a/lib/mesa/src/gallium/drivers/v3d/v3dx_rcl.c +++ b/lib/mesa/src/gallium/drivers/v3d/v3dx_rcl.c @@ -440,6 +440,13 @@ v3d_rcl_emit_generic_per_tile_list(struct v3d_job *job, int layer) fmt.primitive_type = LIST_TRIANGLES; } +#if V3D_VERSION >= 41 + /* PTB assumes that value to be 0, but hw will not set it. */ + cl_emit(cl, SET_INSTANCEID, set) { + set.instance_id = 0; + } +#endif + cl_emit(cl, BRANCH_TO_IMPLICIT_TILE_LIST, branch); v3d_rcl_emit_stores(job, cl, layer); |