Re: [Mesa-dev] [PATCH] Revert "radeonsi: only set BC_OPTIMIZE_DISABLE when necessary"

2015-01-14 Thread Marek Olšák
On Thu, Jan 15, 2015 at 3:50 AM, Michel Dänzer wrote: > On 14.01.2015 20:22, Marek Olšák wrote: >> On Wed, Jan 14, 2015 at 3:33 AM, Michel Dänzer wrote: >>> On 13.01.2015 19:11, Marek Olšák wrote: This is weird. We only enable this optimization if the shader code doesn't use CENTROID at

Re: [Mesa-dev] [PATCH] Revert "radeonsi: only set BC_OPTIMIZE_DISABLE when necessary"

2015-01-14 Thread Michel Dänzer
On 14.01.2015 20:22, Marek Olšák wrote: > On Wed, Jan 14, 2015 at 3:33 AM, Michel Dänzer wrote: >> On 13.01.2015 19:11, Marek Olšák wrote: >>> This is weird. We only enable this optimization if the shader code >>> doesn't use CENTROID at all. This is the main flag: >>> sctx->ps_shader->info.uses_c

Re: [Mesa-dev] [PATCH] Revert "radeonsi: only set BC_OPTIMIZE_DISABLE when necessary"

2015-01-14 Thread Marek Olšák
I don't know. I couldn't find any useful info about it either. Marek On Wed, Jan 14, 2015 at 3:33 AM, Michel Dänzer wrote: > On 13.01.2015 19:11, Marek Olšák wrote: >> This is weird. We only enable this optimization if the shader code >> doesn't use CENTROID at all. This is the main flag: >> sct

Re: [Mesa-dev] [PATCH] Revert "radeonsi: only set BC_OPTIMIZE_DISABLE when necessary"

2015-01-13 Thread Michel Dänzer
On 13.01.2015 19:11, Marek Olšák wrote: > This is weird. We only enable this optimization if the shader code > doesn't use CENTROID at all. This is the main flag: > sctx->ps_shader->info.uses_centroid. > > You can try to simplify the condition to: > > bc_optimize_disable = sctx->ps_shader->info.u

Re: [Mesa-dev] [PATCH] Revert "radeonsi: only set BC_OPTIMIZE_DISABLE when necessary"

2015-01-13 Thread Marek Olšák
This is weird. We only enable this optimization if the shader code doesn't use CENTROID at all. This is the main flag: sctx->ps_shader->info.uses_centroid. You can try to simplify the condition to: bc_optimize_disable = sctx->ps_shader->info.uses_centroid; That should avoid using the optimizatio

[Mesa-dev] [PATCH] Revert "radeonsi: only set BC_OPTIMIZE_DISABLE when necessary"

2015-01-12 Thread Michel Dänzer
From: Michel Dänzer This reverts commit 0543630d0b0d9d9f6eefbc14fbd3385d4de37ba0. It caused flickering artifacts in Steam games such as Team Fortress 2 or Left 4 Dead 2. We could only enable this optimization by also making sure the shader code only uses either SI_PARAM_LINEAR_CENTROID or SI_PA