/**************************************************************************
- *
+ *
* Copyright 2007 VMware, Inc.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* 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.
- *
+ *
**************************************************************************/
/*
* Pass the given program parameters to the graphics pipe as a
* constant buffer.
*/
-void st_upload_constants(struct st_context *st, struct gl_program *prog)
+void
+st_upload_constants(struct st_context *st, struct gl_program *prog)
{
gl_shader_stage stage = prog->info.stage;
struct gl_program_parameter_list *params = prog->Parameters;
ati_fs->Constants[c], sizeof(GLfloat) * 4);
else
memcpy(params->ParameterValues + offset,
- st->ctx->ATIFragmentShader.GlobalConstants[c], sizeof(GLfloat) * 4);
+ st->ctx->ATIFragmentShader.GlobalConstants[c],
+ sizeof(GLfloat) * 4);
}
}
/**
* Vertex shader:
*/
-void st_update_vs_constants(struct st_context *st )
+void
+st_update_vs_constants(struct st_context *st)
{
st_upload_constants(st, &st->vp->Base);
}
/**
* Fragment shader:
*/
-void st_update_fs_constants(struct st_context *st )
+void
+st_update_fs_constants(struct st_context *st)
{
st_upload_constants(st, &st->fp->Base);
}
/* Geometry shader:
*/
-void st_update_gs_constants(struct st_context *st )
+void
+st_update_gs_constants(struct st_context *st)
{
struct st_common_program *gp = st->gp;
/* Tessellation control shader:
*/
-void st_update_tcs_constants(struct st_context *st )
+void
+st_update_tcs_constants(struct st_context *st)
{
struct st_common_program *tcp = st->tcp;
/* Tessellation evaluation shader:
*/
-void st_update_tes_constants(struct st_context *st )
+void
+st_update_tes_constants(struct st_context *st)
{
struct st_common_program *tep = st->tep;
/* Compute shader:
*/
-void st_update_cs_constants(struct st_context *st )
+void
+st_update_cs_constants(struct st_context *st)
{
struct st_compute_program *cp = st->cp;
st_upload_constants(st, &cp->Base);
}
-static void st_bind_ubos(struct st_context *st, struct gl_program *prog,
- unsigned shader_type)
+static void
+st_bind_ubos(struct st_context *st, struct gl_program *prog,
+ unsigned shader_type)
{
unsigned i;
struct pipe_constant_buffer cb = { 0 };
}
}
-void st_bind_vs_ubos(struct st_context *st)
+void
+st_bind_vs_ubos(struct st_context *st)
{
struct gl_program *prog =
st->ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX];
st_bind_ubos(st, prog, PIPE_SHADER_VERTEX);
}
-void st_bind_fs_ubos(struct st_context *st)
+void
+st_bind_fs_ubos(struct st_context *st)
{
struct gl_program *prog =
st->ctx->_Shader->CurrentProgram[MESA_SHADER_FRAGMENT];
st_bind_ubos(st, prog, PIPE_SHADER_FRAGMENT);
}
-void st_bind_gs_ubos(struct st_context *st)
+void
+st_bind_gs_ubos(struct st_context *st)
{
struct gl_program *prog =
st->ctx->_Shader->CurrentProgram[MESA_SHADER_GEOMETRY];
st_bind_ubos(st, prog, PIPE_SHADER_GEOMETRY);
}
-void st_bind_tcs_ubos(struct st_context *st)
+void
+st_bind_tcs_ubos(struct st_context *st)
{
struct gl_program *prog =
st->ctx->_Shader->CurrentProgram[MESA_SHADER_TESS_CTRL];
st_bind_ubos(st, prog, PIPE_SHADER_TESS_CTRL);
}
-void st_bind_tes_ubos(struct st_context *st)
+void
+st_bind_tes_ubos(struct st_context *st)
{
struct gl_program *prog =
st->ctx->_Shader->CurrentProgram[MESA_SHADER_TESS_EVAL];
st_bind_ubos(st, prog, PIPE_SHADER_TESS_EVAL);
}
-void st_bind_cs_ubos(struct st_context *st)
+void
+st_bind_cs_ubos(struct st_context *st)
{
struct gl_program *prog =
st->ctx->_Shader->CurrentProgram[MESA_SHADER_COMPUTE];