mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-01 22:40:09 +01:00
Merge branch 'mesa_7_6_branch'
This commit is contained in:
commit
41bbc83951
14 changed files with 87 additions and 10 deletions
|
|
@ -23,6 +23,7 @@ HOST_CC = $(CC)
|
|||
CFLAGS = -O
|
||||
CXXFLAGS = -O
|
||||
LDFLAGS =
|
||||
HOST_CFLAGS = $(CFLAGS)
|
||||
GLU_CFLAGS =
|
||||
|
||||
# Compiler for building demos/tests/etc
|
||||
|
|
|
|||
|
|
@ -1202,7 +1202,7 @@ if test "x$enable_gallium_radeon" = xyes; then
|
|||
fi
|
||||
|
||||
dnl
|
||||
dnl Gallium Radeon configuration
|
||||
dnl Gallium Nouveau configuration
|
||||
dnl
|
||||
AC_ARG_ENABLE([gallium-nouveau],
|
||||
[AS_HELP_STRING([--enable-gallium-nouveau],
|
||||
|
|
|
|||
|
|
@ -45,6 +45,8 @@ tbd
|
|||
<ul>
|
||||
<li>Assorted bug fixes for i965/i945 drivers
|
||||
<li>Fixed Gallium glDrawPixels(GL_STENCIL_INDEX) failure.
|
||||
<li>Fixed GLSL linker/preprocessor version directive issue seen in Wine
|
||||
(such as bug 23946)
|
||||
</ul>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -57,6 +57,10 @@ This was written by Zack Rusin at Tungsten Graphics.
|
|||
GL_ARB_fragment_program.</li>
|
||||
<li>Added configure --with-max-width=W, --with-max-height=H options to specify
|
||||
max framebuffer, viewport size.
|
||||
<li>Initial version of Gallium llvmpipe driver. This is a new driver based
|
||||
on LLVM which makes exensive use of run-time code generation. This is
|
||||
an "alpha" stage driver. See the src/gallium/drivers/llvmpipe/README
|
||||
file for more information.
|
||||
</ul>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1740,6 +1740,9 @@ GLAPI void GLAPIENTRY glSeparableFilter2D( GLenum target,
|
|||
GLAPI void GLAPIENTRY glGetSeparableFilter( GLenum target, GLenum format,
|
||||
GLenum type, GLvoid *row, GLvoid *column, GLvoid *span );
|
||||
|
||||
typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
|
||||
typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
|
@ -1945,6 +1948,18 @@ GLAPI void GLAPIENTRY glMultTransposeMatrixf( const GLfloat m[16] );
|
|||
GLAPI void GLAPIENTRY glSampleCoverage( GLclampf value, GLboolean invert );
|
||||
|
||||
|
||||
typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
|
||||
typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert);
|
||||
typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
|
||||
typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
|
||||
typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
|
||||
typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
|
||||
typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
|
||||
typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
|
||||
typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid *img);
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* GL_ARB_multitexture (ARB extension 1 and OpenGL 1.2.1)
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -119,6 +119,12 @@ static void Init( void )
|
|||
glBindProgramARB(GL_VERTEX_PROGRAM_ARB, prognum);
|
||||
glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
|
||||
sz, (const GLubyte *) buf);
|
||||
if (glGetError()) {
|
||||
printf("Program failed to compile:\n%s\n", buf);
|
||||
printf("Error: %s\n",
|
||||
(char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
|
||||
exit(1);
|
||||
}
|
||||
assert(glIsProgramARB(prognum));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ include $(TOP)/configs/current
|
|||
|
||||
LIBNAME = llvmpipe
|
||||
|
||||
CFLAGS += -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS
|
||||
|
||||
C_SOURCES = \
|
||||
lp_bld_alpha.c \
|
||||
lp_bld_arit.c \
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
#include "util/u_debug.h" /* for assert */
|
||||
|
||||
|
||||
#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_HAIKU)
|
||||
#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_HAIKU)
|
||||
|
||||
#include <pthread.h> /* POSIX threads headers */
|
||||
#include <stdio.h> /* for perror() */
|
||||
|
|
@ -213,7 +213,7 @@ typedef unsigned pipe_condvar;
|
|||
*/
|
||||
|
||||
typedef struct {
|
||||
#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_HAIKU)
|
||||
#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_HAIKU)
|
||||
pthread_key_t key;
|
||||
#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER)
|
||||
DWORD key;
|
||||
|
|
@ -228,7 +228,7 @@ typedef struct {
|
|||
static INLINE void
|
||||
pipe_tsd_init(pipe_tsd *tsd)
|
||||
{
|
||||
#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_HAIKU)
|
||||
#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_HAIKU)
|
||||
if (pthread_key_create(&tsd->key, NULL/*free*/) != 0) {
|
||||
perror("pthread_key_create(): failed to allocate key for thread specific data");
|
||||
exit(-1);
|
||||
|
|
@ -245,7 +245,7 @@ pipe_tsd_get(pipe_tsd *tsd)
|
|||
if (tsd->initMagic != (int) PIPE_TSD_INIT_MAGIC) {
|
||||
pipe_tsd_init(tsd);
|
||||
}
|
||||
#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_HAIKU)
|
||||
#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_HAIKU)
|
||||
return pthread_getspecific(tsd->key);
|
||||
#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER)
|
||||
assert(0);
|
||||
|
|
@ -262,7 +262,7 @@ pipe_tsd_set(pipe_tsd *tsd, void *value)
|
|||
if (tsd->initMagic != (int) PIPE_TSD_INIT_MAGIC) {
|
||||
pipe_tsd_init(tsd);
|
||||
}
|
||||
#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_HAIKU)
|
||||
#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_HAIKU)
|
||||
if (pthread_setspecific(tsd->key, value) != 0) {
|
||||
perror("pthread_set_specific() failed");
|
||||
exit(-1);
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ XLIB_WINSYS_SOURCES = \
|
|||
xlib_brw_aub.c \
|
||||
xlib_brw_context.c \
|
||||
xlib_brw_screen.c \
|
||||
xlib_llvmpipe.c \
|
||||
xlib_softpipe.c \
|
||||
xlib_trace.c
|
||||
|
||||
|
|
|
|||
|
|
@ -33,6 +33,8 @@
|
|||
*/
|
||||
|
||||
|
||||
#if defined(GALLIUM_LLVMPIPE)
|
||||
|
||||
#include "xm_api.h"
|
||||
|
||||
#undef ASSERT
|
||||
|
|
@ -459,3 +461,4 @@ struct xm_driver xlib_llvmpipe_driver =
|
|||
|
||||
|
||||
|
||||
#endif /* GALLIUM_LLVMPIPE */
|
||||
|
|
|
|||
|
|
@ -263,7 +263,7 @@ void radeonAllocDmaRegion(radeonContextPtr rmesa,
|
|||
|
||||
void radeonFreeDmaRegions(radeonContextPtr rmesa)
|
||||
{
|
||||
struct radeon_dma_bo *dma_bo = CALLOC_STRUCT(radeon_dma_bo);
|
||||
struct radeon_dma_bo *dma_bo;
|
||||
struct radeon_dma_bo *temp;
|
||||
if (RADEON_DEBUG & RADEON_DMA)
|
||||
fprintf(stderr, "%s\n", __FUNCTION__);
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ validate_texture_wrap_mode(GLcontext * ctx, GLenum target, GLenum wrap)
|
|||
return GL_TRUE;
|
||||
}
|
||||
|
||||
_mesa_error( ctx, GL_INVALID_VALUE, "glTexParameter(param=0x%x)", wrap );
|
||||
_mesa_error( ctx, GL_INVALID_ENUM, "glTexParameter(param=0x%x)", wrap );
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
|
|
@ -210,7 +210,7 @@ set_tex_parameteri(GLcontext *ctx,
|
|||
}
|
||||
/* fall-through */
|
||||
default:
|
||||
_mesa_error( ctx, GL_INVALID_VALUE, "glTexParameter(param=0x%x)",
|
||||
_mesa_error( ctx, GL_INVALID_ENUM, "glTexParameter(param=0x%x)",
|
||||
params[0] );
|
||||
}
|
||||
return GL_FALSE;
|
||||
|
|
@ -225,7 +225,7 @@ set_tex_parameteri(GLcontext *ctx,
|
|||
texObj->MagFilter = params[0];
|
||||
return GL_TRUE;
|
||||
default:
|
||||
_mesa_error( ctx, GL_INVALID_VALUE, "glTexParameter(param=0x%x)",
|
||||
_mesa_error( ctx, GL_INVALID_ENUM, "glTexParameter(param=0x%x)",
|
||||
params[0]);
|
||||
}
|
||||
return GL_FALSE;
|
||||
|
|
|
|||
|
|
@ -1474,6 +1474,21 @@ _mesa_link_program(GLcontext *ctx, GLuint program)
|
|||
FLUSH_VERTICES(ctx, _NEW_PROGRAM);
|
||||
|
||||
_slang_link(ctx, program, shProg);
|
||||
|
||||
/* debug code */
|
||||
if (0) {
|
||||
GLuint i;
|
||||
|
||||
_mesa_printf("Link %u shaders in program %u: %s\n",
|
||||
shProg->NumShaders, shProg->Name,
|
||||
shProg->LinkStatus ? "Success" : "Failed");
|
||||
|
||||
for (i = 0; i < shProg->NumShaders; i++) {
|
||||
_mesa_printf(" shader %u, type 0x%x\n",
|
||||
shProg->Shaders[i]->Name,
|
||||
shProg->Shaders[i]->Type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -546,6 +546,32 @@ _slang_update_inputs_outputs(struct gl_program *prog)
|
|||
|
||||
|
||||
|
||||
/**
|
||||
* Remove extra #version directives from the concatenated source string.
|
||||
* Disable the extra ones by converting first two chars to //, a comment.
|
||||
* This is a bit of hack to work around a preprocessor bug that only
|
||||
* allows one #version directive per source.
|
||||
*/
|
||||
static void
|
||||
remove_extra_version_directives(GLchar *source)
|
||||
{
|
||||
GLuint verCount = 0;
|
||||
while (1) {
|
||||
char *ver = _mesa_strstr(source, "#version");
|
||||
if (ver) {
|
||||
verCount++;
|
||||
if (verCount > 1) {
|
||||
ver[0] = '/';
|
||||
ver[1] = '/';
|
||||
}
|
||||
source += 8;
|
||||
}
|
||||
else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -593,6 +619,8 @@ concat_shaders(struct gl_shader_program *shProg, GLenum shaderType)
|
|||
_mesa_printf("---NEW CONCATENATED SHADER---:\n%s\n------------\n", source);
|
||||
*/
|
||||
|
||||
remove_extra_version_directives(source);
|
||||
|
||||
newShader = CALLOC_STRUCT(gl_shader);
|
||||
newShader->Type = shaderType;
|
||||
newShader->Source = source;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue