radeonsi/compute: Use value from compiler for COMPUTE_PGM_RSRC1.FLOAT_MODE
authorTom Stellard <thomas.stellard@amd.com>
Fri, 6 Mar 2015 14:53:00 +0000 (14:53 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Mon, 9 Mar 2015 13:53:33 +0000 (13:53 +0000)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_compute.c
src/gallium/drivers/radeonsi/si_shader.c
src/gallium/drivers/radeonsi/si_shader.h

index 5009f6994430cd17c860752f65876d4fbd2e2b17..8609b894108ae80539309294408c6c5dcdb0d701 100644 (file)
@@ -377,7 +377,8 @@ static void si_launch_grid(
                 * XXX: The compiler should account for this.
                 */
                |  S_00B848_SGPRS(((MAX2(4 + arg_user_sgpr_count,
-                                       shader->num_sgprs)) - 1) / 8))
+                                       shader->num_sgprs)) - 1) / 8)
+               |  S_00B028_FLOAT_MODE(shader->float_mode))
                ;
 
        lds_blocks = shader->lds_size;
index b0417edf33e1e8f13b03b52bde108297a5d90ef6..87aef4d77a78508b2261e954a6e62c2ebfcaa69b 100644 (file)
@@ -2546,6 +2546,7 @@ void si_shader_binary_read_config(const struct si_screen *sscreen,
                case R_00B848_COMPUTE_PGM_RSRC1:
                        shader->num_sgprs = MAX2(shader->num_sgprs, (G_00B028_SGPRS(value) + 1) * 8);
                        shader->num_vgprs = MAX2(shader->num_vgprs, (G_00B028_VGPRS(value) + 1) * 4);
+                       shader->float_mode =  G_00B028_FLOAT_MODE(value);
                        break;
                case R_00B02C_SPI_SHADER_PGM_RSRC2_PS:
                        shader->lds_size = MAX2(shader->lds_size, G_00B02C_EXTRA_LDS_SIZE(value));
index 551c7dc9f23e01aa0629ae13ee2c5ce4e1e99b5d..4f2bb9111600be556167fd5d00bb2fd9136a93ab 100644 (file)
@@ -149,6 +149,7 @@ struct si_shader {
        unsigned                        num_vgprs;
        unsigned                        lds_size;
        unsigned                        spi_ps_input_ena;
+       unsigned                        float_mode;
        unsigned                        scratch_bytes_per_wave;
        unsigned                        spi_shader_col_format;
        unsigned                        spi_shader_z_format;