[Mesa-dev] [PATCH 1/2] radeonsi: fix SPI_PS_INPUT_ENA handling
Michel Dänzer
michel at daenzer.net
Thu Aug 23 07:37:01 PDT 2012
On Mit, 2012-08-22 at 12:54 +0200, Christian König wrote:
>
> + /* we need to enable at least one of them, otherwise we hang the GPU */
> + if (!spi_ps_input_ena & (C_0286CC_PERSP_SAMPLE_ENA |
> + C_0286CC_PERSP_CENTROID_ENA |
> + C_0286CC_PERSP_PULL_MODEL_ENA |
> + C_0286CC_LINEAR_SAMPLE_ENA |
> + C_0286CC_LINEAR_CENTER_ENA |
> + C_0286CC_LINEAR_CENTROID_ENA |
> + C_0286CC_LINE_STIPPLE_TEX_ENA)) {
> + spi_ps_input_ena |= S_0286CC_PERSP_SAMPLE_ENA(1);
> + }
I just noticed that this causes a warning:
si_state_draw.c: In function ‘si_pipe_shader_ps’:
si_state_draw.c:179:6: warning: suggest parentheses around operand of ‘!’ or change ‘&’ to ‘&&’ or ‘!’ to ‘~’ [-Wparentheses]
Did you mean the following?
if (!(spi_ps_input_ena & (~C_0286CC_PERSP_SAMPLE_ENA |
~C_0286CC_PERSP_CENTROID_ENA |
~C_0286CC_PERSP_PULL_MODEL_ENA |
~C_0286CC_LINEAR_SAMPLE_ENA |
~C_0286CC_LINEAR_CENTER_ENA |
~C_0286CC_LINEAR_CENTROID_ENA |
~C_0286CC_LINE_STIPPLE_TEX_ENA)) {
spi_ps_input_ena |= S_0286CC_PERSP_SAMPLE_ENA(1);
}
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Debian, X and DRI developer
More information about the mesa-dev
mailing list