Commit e9d66281 authored by Emma Anholt's avatar Emma Anholt Committed by Mike Blumenkrantz
Browse files

zink: Enable PIPE_CAP_PACKED_UNIFORMS.

We already support everything necessary and just need to ask the frontend
to DTRT.  This makes UBO0 get more tightly packed, saving upload space,
and allows for _mesa_optimize_state_parameters() as well.
parent 5458a3cb
Pipeline #298861 waiting for manual action with stages
......@@ -387,6 +387,7 @@ zink_screen_init_compiler(struct zink_screen *screen)
.lower_vector_cmp = true,
.lower_int64_options = 0,
.lower_doubles_options = ~nir_lower_fp64_full_software,
.lower_uniforms_to_ubo = true,
.has_fsub = true,
.has_isub = true,
.lower_mul_2x32_64 = true,
......@@ -931,7 +932,6 @@ zink_shader_finalize(struct pipe_screen *pscreen, void *nirptr, bool optimize)
tex_opts.lower_tg4_offsets = true;
NIR_PASS_V(nir, nir_lower_tex, &tex_opts);
}
NIR_PASS_V(nir, nir_lower_uniforms_to_ubo, 16);
if (nir->info.stage == MESA_SHADER_GEOMETRY)
NIR_PASS_V(nir, nir_lower_gs_intrinsics, nir_lower_gs_intrinsics_per_stream);
optimize_nir(nir);
......
......@@ -267,6 +267,7 @@ zink_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
case PIPE_CAP_CLEAR_SCISSORED:
case PIPE_CAP_INVALIDATE_BUFFER:
case PIPE_CAP_PREFER_REAL_BUFFER_IN_CONSTBUF0:
case PIPE_CAP_PACKED_UNIFORMS:
return 1;
case PIPE_CAP_TEXTURE_MIRROR_CLAMP_TO_EDGE:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment