diff options
Diffstat (limited to 'mesalib/src/mesa/state_tracker')
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_draw.c | 2 | ||||
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_extensions.c | 8 | ||||
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_format.c | 23 |
3 files changed, 27 insertions, 6 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_draw.c b/mesalib/src/mesa/state_tracker/st_draw.c index 61e127776..bf4fef57a 100644 --- a/mesalib/src/mesa/state_tracker/st_draw.c +++ b/mesalib/src/mesa/state_tracker/st_draw.c @@ -247,7 +247,7 @@ is_interleaved_arrays(const struct st_vertex_program *vp, const struct gl_buffer_object *firstBufObj = NULL;
GLint firstStride = -1;
const GLubyte *client_addr = NULL;
- GLboolean user_memory;
+ GLboolean user_memory = GL_FALSE;
for (attr = 0; attr < vpv->num_inputs; attr++) {
const GLuint mesaAttr = vp->index_to_input[attr];
diff --git a/mesalib/src/mesa/state_tracker/st_extensions.c b/mesalib/src/mesa/state_tracker/st_extensions.c index 1cbe618ce..8f697fa51 100644 --- a/mesalib/src/mesa/state_tracker/st_extensions.c +++ b/mesalib/src/mesa/state_tracker/st_extensions.c @@ -167,6 +167,8 @@ void st_init_limits(struct st_context *st) pc->MaxNativeAddressRegs = screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_ADDRS);
pc->MaxNativeParameters = screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_CONSTS);
pc->MaxUniformComponents = 4 * MIN2(pc->MaxNativeParameters, MAX_UNIFORMS);
+ /* raise MaxParameters if native support is higher */
+ pc->MaxParameters = MAX2(pc->MaxParameters, pc->MaxNativeParameters);
options->EmitNoNoise = TRUE;
@@ -187,7 +189,7 @@ void st_init_limits(struct st_context *st) options->EmitNoIndirectUniform = !screen->get_shader_param(screen, sh,
PIPE_SHADER_CAP_INDIRECT_CONST_ADDR);
- if(options->EmitNoLoops)
+ if (options->EmitNoLoops)
options->MaxUnrollIterations = MIN2(screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_INSTRUCTIONS), 65536);
}
@@ -539,8 +541,8 @@ void st_init_extensions(struct st_context *st) PIPE_TEXTURE_2D, 0,
PIPE_BIND_RENDER_TARGET) &&
!screen->is_format_supported(screen, PIPE_FORMAT_R16G16B16A16_SNORM,
- PIPE_TEXTURE_2D, 0,
- PIPE_BIND_RENDER_TARGET) &&
+ PIPE_TEXTURE_2D, 0,
+ PIPE_BIND_RENDER_TARGET) &&
!screen->is_format_supported(screen, PIPE_FORMAT_R16G16B16A16_FLOAT,
PIPE_TEXTURE_2D, 0,
PIPE_BIND_RENDER_TARGET) &&
diff --git a/mesalib/src/mesa/state_tracker/st_format.c b/mesalib/src/mesa/state_tracker/st_format.c index 8b3e782a5..32b44b806 100644 --- a/mesalib/src/mesa/state_tracker/st_format.c +++ b/mesalib/src/mesa/state_tracker/st_format.c @@ -954,14 +954,24 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat, /* prefer formats in order of data size, choosing 16-bit ones if equal sized */
case GL_RGBA16F_ARB:
+ {
+ static const enum pipe_format formats[] = {
+ PIPE_FORMAT_R16G16B16A16_FLOAT,
+ PIPE_FORMAT_R32G32B32A32_FLOAT
+ };
+ return find_supported_format(screen, formats, Elements(formats),
+ target, sample_count, bindings);
+ }
case GL_RGB16F_ARB:
{
static const enum pipe_format formats[] = {
+ PIPE_FORMAT_R16G16B16_FLOAT,
PIPE_FORMAT_R16G16B16A16_FLOAT,
+ PIPE_FORMAT_R32G32B32_FLOAT,
PIPE_FORMAT_R32G32B32A32_FLOAT
};
return find_supported_format(screen, formats, Elements(formats),
- target, sample_count, bindings);
+ target, sample_count, bindings);
}
case GL_LUMINANCE_ALPHA16F_ARB:
{
@@ -1040,14 +1050,23 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat, /* try a 32-bit format if available, otherwise fallback to a 16-bit one */
case GL_RGBA32F_ARB:
+ {
+ static const enum pipe_format formats[] = {
+ PIPE_FORMAT_R32G32B32A32_FLOAT,
+ PIPE_FORMAT_R16G16B16A16_FLOAT
+ };
+ return find_supported_format(screen, formats, Elements(formats),
+ target, sample_count, bindings);
+ }
case GL_RGB32F_ARB:
{
static const enum pipe_format formats[] = {
+ PIPE_FORMAT_R32G32B32_FLOAT,
PIPE_FORMAT_R32G32B32A32_FLOAT,
PIPE_FORMAT_R16G16B16A16_FLOAT
};
return find_supported_format(screen, formats, Elements(formats),
- target, sample_count, bindings);
+ target, sample_count, bindings);
}
case GL_LUMINANCE_ALPHA32F_ARB:
{
|