diff options
author | Vadim Girlin <[email protected]> | 2012-06-26 22:47:27 +0400 |
---|---|---|
committer | Vadim Girlin <[email protected]> | 2012-06-27 02:06:55 +0400 |
commit | 0c47d9dcab80923c61b3f5375128e9b511b842fb (patch) | |
tree | a604add9f750a3a089f9924d2a9e466102887c3b /src/gallium/drivers/r600/r600_shader.h | |
parent | 4acf71f01ea1edb253cd38cc059d4af1a2a40bf4 (diff) |
r600g: avoid unnecessary shader exports v2
In some cases TGSI shader has more color outputs than the number of CBs,
so it seems we need to limit the number of color exports. This requires
different shader variants depending on the nr_cbufs, but on the other hand
we are doing less exports, which are very costly.
v2: fix various piglit regressions
Signed-off-by: Vadim Girlin <[email protected]>
Signed-off-by: Jerome Glisse <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_shader.h')
-rw-r--r-- | src/gallium/drivers/r600/r600_shader.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/r600_shader.h b/src/gallium/drivers/r600/r600_shader.h index 2d35e770070..eb0bbf6ebb7 100644 --- a/src/gallium/drivers/r600/r600_shader.h +++ b/src/gallium/drivers/r600/r600_shader.h @@ -49,7 +49,12 @@ struct r600_shader { boolean fs_write_all; boolean vs_prohibit_ucps; boolean two_side; - unsigned nr_cbufs; + /* Number of color outputs in the TGSI shader, + * sometimes it could be higher than nr_cbufs (bug?). + * Also with writes_all property on eg+ it will be set to max CB number */ + unsigned nr_ps_max_color_exports; + /* Real number of ps color exports compiled in the bytecode */ + unsigned nr_ps_color_exports; /* bit n is set if the shader writes gl_ClipDistance[n] */ unsigned clip_dist_write; /* flag is set if the shader writes VS_OUT_MISC_VEC (e.g. for PSIZE) */ |