mirror of
https://gitee.com/openharmony/third_party_mesa3d
synced 2024-11-24 07:50:26 +00:00
mesa: Make numSamples an unsigned int
As a followup to the previous patch propagate the change of numSamples from int to unsigned to gl_config::samples and consequently fix some -Wsign-compare warnings. Signed-off-by: Gert Wollny <gw.fossdev@gmail.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
parent
d0e37599ab
commit
fef4b16523
@ -227,7 +227,7 @@ _mesa_create_visual( GLboolean dbFlag,
|
||||
GLint accumGreenBits,
|
||||
GLint accumBlueBits,
|
||||
GLint accumAlphaBits,
|
||||
GLint numSamples )
|
||||
GLuint numSamples )
|
||||
{
|
||||
struct gl_config *vis = CALLOC_STRUCT(gl_config);
|
||||
if (vis) {
|
||||
@ -269,7 +269,7 @@ _mesa_initialize_visual( struct gl_config *vis,
|
||||
GLint accumGreenBits,
|
||||
GLint accumBlueBits,
|
||||
GLint accumAlphaBits,
|
||||
GLint numSamples )
|
||||
GLuint numSamples )
|
||||
{
|
||||
assert(vis);
|
||||
|
||||
|
@ -79,7 +79,7 @@ _mesa_create_visual( GLboolean dbFlag,
|
||||
GLint accumGreenBits,
|
||||
GLint accumBlueBits,
|
||||
GLint accumAlphaBits,
|
||||
GLint numSamples );
|
||||
GLuint numSamples );
|
||||
|
||||
extern GLboolean
|
||||
_mesa_initialize_visual( struct gl_config *v,
|
||||
@ -95,7 +95,7 @@ _mesa_initialize_visual( struct gl_config *v,
|
||||
GLint accumGreenBits,
|
||||
GLint accumBlueBits,
|
||||
GLint accumAlphaBits,
|
||||
GLint numSamples );
|
||||
GLuint numSamples );
|
||||
|
||||
extern void
|
||||
_mesa_destroy_visual( struct gl_config *vis );
|
||||
|
@ -242,7 +242,7 @@ struct gl_config
|
||||
|
||||
/* ARB_multisample / SGIS_multisample */
|
||||
GLint sampleBuffers;
|
||||
GLint samples;
|
||||
GLuint samples;
|
||||
|
||||
/* SGIX_pbuffer / GLX 1.3 */
|
||||
GLint maxPbufferWidth;
|
||||
|
@ -87,7 +87,7 @@ _mesa_GetMultisamplefv(GLenum pname, GLuint index, GLfloat * val)
|
||||
|
||||
switch (pname) {
|
||||
case GL_SAMPLE_POSITION: {
|
||||
if ((int) index >= ctx->DrawBuffer->Visual.samples) {
|
||||
if (index >= ctx->DrawBuffer->Visual.samples) {
|
||||
_mesa_error( ctx, GL_INVALID_VALUE, "glGetMultisamplefv(index)" );
|
||||
return;
|
||||
}
|
||||
|
@ -268,7 +268,7 @@ st_new_renderbuffer(struct gl_context *ctx, GLuint name)
|
||||
* renderbuffer). The window system code determines the format.
|
||||
*/
|
||||
struct gl_renderbuffer *
|
||||
st_new_renderbuffer_fb(enum pipe_format format, int samples, boolean sw)
|
||||
st_new_renderbuffer_fb(enum pipe_format format, unsigned samples, boolean sw)
|
||||
{
|
||||
struct st_renderbuffer *strb;
|
||||
|
||||
|
@ -102,7 +102,7 @@ st_ws_framebuffer(struct gl_framebuffer *fb)
|
||||
|
||||
|
||||
extern struct gl_renderbuffer *
|
||||
st_new_renderbuffer_fb(enum pipe_format format, int samples, boolean sw);
|
||||
st_new_renderbuffer_fb(enum pipe_format format, unsigned samples, boolean sw);
|
||||
|
||||
extern void
|
||||
st_update_renderbuffer_surface(struct st_context *st,
|
||||
|
Loading…
Reference in New Issue
Block a user