/**************************************************************************
- *
+ *
* Copyright 2008 VMware, Inc.
* All Rights Reserved.
*
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
static inline struct pstip_stage *
-pstip_stage( struct draw_stage *stage )
+pstip_stage(struct draw_stage *stage)
{
return (struct pstip_stage *) stage;
}
struct pipe_context *pipe = pstip->pipe;
stage->tri = pstip_first_tri;
- stage->next->flush( stage->next, flags );
+ stage->next->flush(stage->next, flags);
/* restore original frag shader, texture, sampler state */
draw->suspend_flushing = TRUE;
static void
pstip_reset_stipple_counter(struct draw_stage *stage)
{
- stage->next->reset_stipple_counter( stage->next );
+ stage->next->reset_stipple_counter(stage->next);
}
pstip_destroy(struct draw_stage *stage)
{
struct pstip_stage *pstip = pstip_stage(stage);
- uint i;
- for (i = 0; i < PIPE_MAX_SHADER_SAMPLER_VIEWS; i++) {
+ for (unsigned i = 0; i < PIPE_MAX_SHADER_SAMPLER_VIEWS; i++) {
pipe_sampler_view_reference(&pstip->state.sampler_views[i], NULL);
}
pipe_sampler_view_reference(&pstip->sampler_view, NULL);
}
- draw_free_temp_verts( stage );
- FREE( stage );
+ draw_free_temp_verts(stage);
+ FREE(stage);
}
pstip->stage.reset_stipple_counter = pstip_reset_stipple_counter;
pstip->stage.destroy = pstip_destroy;
- if (!draw_alloc_temp_verts( &pstip->stage, 8 ))
+ if (!draw_alloc_temp_verts(&pstip->stage, 8))
goto fail;
return pstip;
fail:
if (pstip)
- pstip->stage.destroy( &pstip->stage );
+ pstip->stage.destroy(&pstip->stage);
return NULL;
}
unsigned start, unsigned num, void **sampler)
{
struct pstip_stage *pstip = pstip_stage_from_pipe(pipe);
- uint i;
assert(start == 0);
if (shader == PIPE_SHADER_FRAGMENT) {
/* save current */
memcpy(pstip->state.samplers, sampler, num * sizeof(void *));
- for (i = num; i < PIPE_MAX_SAMPLERS; i++) {
+ for (unsigned i = num; i < PIPE_MAX_SAMPLERS; i++) {
pstip->state.samplers[i] = NULL;
}
pstip->num_samplers = num;
struct pipe_sampler_view **views)
{
struct pstip_stage *pstip = pstip_stage_from_pipe(pipe);
- uint i;
if (shader == PIPE_SHADER_FRAGMENT) {
/* save current */
+ unsigned i;
for (i = 0; i < num; i++) {
pipe_sampler_view_reference(&pstip->state.sampler_views[start + i],
views[i]);
draw_install_pstipple_stage(struct draw_context *draw,
struct pipe_context *pipe)
{
- struct pstip_stage *pstip;
-
pipe->draw = (void *) draw;
/*
* Create / install pgon stipple drawing / prim stage
*/
- pstip = draw_pstip_stage( draw, pipe );
+ struct pstip_stage *pstip = draw_pstip_stage(draw, pipe);
if (!pstip)
goto fail;
fail:
if (pstip)
- pstip->stage.destroy( &pstip->stage );
+ pstip->stage.destroy(&pstip->stage);
return FALSE;
}