radv: Implement bc optimize.

Seems like we actually enabled it already, but did not implement
the shader part. With this patch we do.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Bas Nieuwenhuizen
2017-08-15 18:09:21 +02:00
parent a7f5545ede
commit 6bafb56df6
3 changed files with 33 additions and 0 deletions

View File

@@ -2069,6 +2069,9 @@ radv_pipeline_init(struct radv_pipeline *pipeline,
if (modules[MESA_SHADER_FRAGMENT]) {
union ac_shader_variant_key key = {0};
key.fs.col_format = pipeline->graphics.blend.spi_shader_col_format;
if (pCreateInfo->pMultisampleState &&
pCreateInfo->pMultisampleState->rasterizationSamples > 1)
key.fs.multisample = true;
if (pipeline->device->physical_device->rad_info.chip_class < VI)
radv_pipeline_compute_get_int_clamp(pCreateInfo, &key.fs.is_int8, &key.fs.is_int10);