mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 21:40:08 +01:00
Merge commit 'origin/master' into gallium-0.2
Conflicts: src/mesa/shader/slang/slang_compile.c
This commit is contained in:
commit
2e28c1fda2
15 changed files with 102 additions and 22 deletions
8
Makefile
8
Makefile
|
|
@ -182,10 +182,10 @@ ultrix-gcc:
|
|||
|
||||
# Rules for making release tarballs
|
||||
|
||||
DIRECTORY = Mesa-7.3-rc1
|
||||
LIB_NAME = MesaLib-7.3-rc1
|
||||
DEMO_NAME = MesaDemos-7.3-rc1
|
||||
GLUT_NAME = MesaGLUT-7.3-rc1
|
||||
DIRECTORY = Mesa-7.3-rc2
|
||||
LIB_NAME = MesaLib-7.3-rc2
|
||||
DEMO_NAME = MesaDemos-7.3-rc2
|
||||
GLUT_NAME = MesaGLUT-7.3-rc2
|
||||
|
||||
MAIN_FILES = \
|
||||
$(DIRECTORY)/Makefile* \
|
||||
|
|
|
|||
|
|
@ -110,7 +110,10 @@ intel_unpair_depth_stencil(GLcontext *ctx, struct intel_renderbuffer *irb)
|
|||
ASSERT(stencilIrb->PairedDepth == rb->Name);
|
||||
intel_renderbuffer_map(intel, rb);
|
||||
intel_renderbuffer_map(intel, stencilRb);
|
||||
#if 0
|
||||
/* disable for now */
|
||||
_mesa_extract_stencil(ctx, rb, stencilRb);
|
||||
#endif
|
||||
intel_renderbuffer_unmap(intel, stencilRb);
|
||||
intel_renderbuffer_unmap(intel, rb);
|
||||
stencilIrb->PairedDepth = 0;
|
||||
|
|
@ -132,7 +135,10 @@ intel_unpair_depth_stencil(GLcontext *ctx, struct intel_renderbuffer *irb)
|
|||
ASSERT(depthIrb->PairedStencil == rb->Name);
|
||||
intel_renderbuffer_map(intel, rb);
|
||||
intel_renderbuffer_map(intel, depthRb);
|
||||
#if 0
|
||||
/* disable for now */
|
||||
_mesa_extract_stencil(ctx, depthRb, rb);
|
||||
#endif
|
||||
intel_renderbuffer_unmap(intel, depthRb);
|
||||
intel_renderbuffer_unmap(intel, rb);
|
||||
depthIrb->PairedStencil = 0;
|
||||
|
|
@ -177,8 +183,11 @@ intel_validate_paired_depth_stencil(GLcontext * ctx,
|
|||
}
|
||||
else {
|
||||
/* Separate depth/stencil buffers, need to interleave now */
|
||||
ASSERT(depthRb->Base._BaseFormat == GL_DEPTH_COMPONENT);
|
||||
ASSERT(stencilRb->Base._BaseFormat == GL_STENCIL_INDEX);
|
||||
ASSERT(depthRb->Base._BaseFormat == GL_DEPTH_COMPONENT ||
|
||||
depthRb->Base._BaseFormat == GL_DEPTH_STENCIL);
|
||||
ASSERT(stencilRb->Base._BaseFormat == GL_STENCIL_INDEX ||
|
||||
stencilRb->Base._BaseFormat == GL_DEPTH_STENCIL);
|
||||
|
||||
/* may need to interleave depth/stencil now */
|
||||
if (depthRb->PairedStencil == stencilRb->Base.Name) {
|
||||
/* OK, the depth and stencil buffers are already interleaved */
|
||||
|
|
|
|||
|
|
@ -248,11 +248,18 @@ intel_alloc_renderbuffer_storage(GLcontext * ctx, struct gl_renderbuffer *rb,
|
|||
cpp = 4;
|
||||
break;
|
||||
case GL_DEPTH_COMPONENT16:
|
||||
#if 0
|
||||
rb->_ActualFormat = GL_DEPTH_COMPONENT16;
|
||||
rb->DataType = GL_UNSIGNED_SHORT;
|
||||
rb->DepthBits = 16;
|
||||
cpp = 2;
|
||||
break;
|
||||
#else
|
||||
/* fall-through.
|
||||
* 16bpp depth renderbuffer can't be paired with a stencil buffer so
|
||||
* always used combined depth/stencil format.
|
||||
*/
|
||||
#endif
|
||||
case GL_DEPTH_COMPONENT:
|
||||
case GL_DEPTH_COMPONENT24:
|
||||
case GL_DEPTH_COMPONENT32:
|
||||
|
|
@ -529,20 +536,25 @@ intel_update_wrapper(GLcontext *ctx, struct intel_renderbuffer *irb,
|
|||
if (texImage->TexFormat == &_mesa_texformat_argb8888) {
|
||||
irb->Base._ActualFormat = GL_RGBA8;
|
||||
irb->Base._BaseFormat = GL_RGBA;
|
||||
irb->Base.DataType = GL_UNSIGNED_BYTE;
|
||||
DBG("Render to RGBA8 texture OK\n");
|
||||
}
|
||||
else if (texImage->TexFormat == &_mesa_texformat_rgb565) {
|
||||
irb->Base._ActualFormat = GL_RGB5;
|
||||
irb->Base._BaseFormat = GL_RGB;
|
||||
irb->Base.DataType = GL_UNSIGNED_SHORT;
|
||||
DBG("Render to RGB5 texture OK\n");
|
||||
}
|
||||
else if (texImage->TexFormat == &_mesa_texformat_z16) {
|
||||
irb->Base._ActualFormat = GL_DEPTH_COMPONENT16;
|
||||
irb->Base._BaseFormat = GL_DEPTH_COMPONENT;
|
||||
irb->Base.DataType = GL_UNSIGNED_SHORT;
|
||||
DBG("Render to DEPTH16 texture OK\n");
|
||||
} else if (texImage->TexFormat == &_mesa_texformat_s8_z24) {
|
||||
}
|
||||
else if (texImage->TexFormat == &_mesa_texformat_s8_z24) {
|
||||
irb->Base._ActualFormat = GL_DEPTH24_STENCIL8_EXT;
|
||||
irb->Base._BaseFormat = GL_DEPTH_STENCIL_EXT;
|
||||
irb->Base.DataType = GL_UNSIGNED_INT_24_8_EXT;
|
||||
DBG("Render to DEPTH_STENCIL texture OK\n");
|
||||
}
|
||||
else {
|
||||
|
|
@ -554,7 +566,6 @@ intel_update_wrapper(GLcontext *ctx, struct intel_renderbuffer *irb,
|
|||
irb->Base.InternalFormat = irb->Base._ActualFormat;
|
||||
irb->Base.Width = texImage->Width;
|
||||
irb->Base.Height = texImage->Height;
|
||||
irb->Base.DataType = GL_UNSIGNED_BYTE; /* FBO XXX fix */
|
||||
irb->Base.RedBits = texImage->TexFormat->RedBits;
|
||||
irb->Base.GreenBits = texImage->TexFormat->GreenBits;
|
||||
irb->Base.BlueBits = texImage->TexFormat->BlueBits;
|
||||
|
|
|
|||
|
|
@ -119,6 +119,12 @@ do_texture_copypixels(GLcontext * ctx,
|
|||
if (!src || !dst || type != GL_COLOR)
|
||||
return GL_FALSE;
|
||||
|
||||
if (ctx->_ImageTransferState) {
|
||||
if (INTEL_DEBUG & DEBUG_PIXEL)
|
||||
fprintf(stderr, "%s: check_color failed\n", __FUNCTION__);
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
/* Can't handle overlapping regions. Don't have sufficient control
|
||||
* over rasterization to pull it off in-place. Punt on these for
|
||||
* now.
|
||||
|
|
|
|||
|
|
@ -134,8 +134,14 @@ intelChooseTextureFormat(GLcontext * ctx, GLint internalFormat,
|
|||
case GL_DEPTH_COMPONENT16:
|
||||
case GL_DEPTH_COMPONENT24:
|
||||
case GL_DEPTH_COMPONENT32:
|
||||
#if 0
|
||||
return &_mesa_texformat_z16;
|
||||
|
||||
#else
|
||||
/* fall-through.
|
||||
* 16bpp depth texture can't be paired with a stencil buffer so
|
||||
* always used combined depth/stencil format.
|
||||
*/
|
||||
#endif
|
||||
case GL_DEPTH_STENCIL_EXT:
|
||||
case GL_DEPTH24_STENCIL8_EXT:
|
||||
return &_mesa_texformat_s8_z24;
|
||||
|
|
@ -158,7 +164,7 @@ intelChooseTextureFormat(GLcontext * ctx, GLint internalFormat,
|
|||
case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:
|
||||
case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:
|
||||
case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:
|
||||
return &_mesa_texformat_srgb_dxt1;
|
||||
return &_mesa_texformat_srgb_dxt1;
|
||||
#endif
|
||||
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -1675,6 +1675,13 @@ static void r300SetupRSUnit(GLcontext * ctx)
|
|||
rs_col_count += count;
|
||||
}
|
||||
|
||||
if (InputsRead & FRAG_BIT_FOGC) {
|
||||
/* XXX FIX THIS
|
||||
* Just turn off the bit for now.
|
||||
* Need to do something similar to the color/texcoord inputs.
|
||||
*/
|
||||
InputsRead &= ~FRAG_BIT_FOGC;
|
||||
}
|
||||
|
||||
for (i = 0; i < ctx->Const.MaxTextureUnits; i++) {
|
||||
int swiz;
|
||||
|
|
|
|||
|
|
@ -473,6 +473,11 @@ static void allocate_input_registers(struct pair_state *s)
|
|||
alloc_hw_reg(s, PROGRAM_INPUT, FRAG_ATTRIB_COL1, hwindex++);
|
||||
InputsRead &= ~FRAG_BIT_COL1;
|
||||
|
||||
/* Fog coordinate */
|
||||
if (InputsRead & FRAG_BIT_FOGC)
|
||||
alloc_hw_reg(s, PROGRAM_INPUT, FRAG_ATTRIB_FOGC, hwindex++);
|
||||
InputsRead &= ~FRAG_BIT_FOGC;
|
||||
|
||||
/* Anything else */
|
||||
if (InputsRead)
|
||||
error("Don't know how to handle inputs 0x%x\n", InputsRead);
|
||||
|
|
|
|||
|
|
@ -867,6 +867,7 @@ EXPORTS
|
|||
_glapi_get_proc_address
|
||||
_mesa_add_soft_renderbuffers
|
||||
_mesa_add_renderbuffer
|
||||
_mesa_begin_query
|
||||
_mesa_buffer_data
|
||||
_mesa_buffer_get_subdata
|
||||
_mesa_buffer_map
|
||||
|
|
@ -881,6 +882,7 @@ EXPORTS
|
|||
_mesa_delete_array_object
|
||||
_mesa_delete_buffer_object
|
||||
_mesa_delete_program
|
||||
_mesa_delete_query
|
||||
_mesa_delete_texture_object
|
||||
_mesa_destroy_framebuffer
|
||||
_mesa_destroy_visual
|
||||
|
|
@ -890,6 +892,7 @@ EXPORTS
|
|||
_mesa_enable_2_0_extensions
|
||||
_mesa_enable_2_1_extensions
|
||||
_mesa_enable_sw_extensions
|
||||
_mesa_end_query
|
||||
_mesa_error
|
||||
_mesa_finish_render_texture
|
||||
_mesa_framebuffer_renderbuffer
|
||||
|
|
@ -941,6 +944,7 @@ EXPORTS
|
|||
_mesa_update_framebuffer_visual
|
||||
_mesa_use_program
|
||||
_mesa_Viewport
|
||||
_mesa_wait_query
|
||||
_swrast_Accum
|
||||
_swrast_Bitmap
|
||||
_swrast_BlitFramebuffer
|
||||
|
|
@ -973,3 +977,4 @@ EXPORTS
|
|||
_tnl_InvalidateState
|
||||
_tnl_run_pipeline
|
||||
_tnl_program_string
|
||||
_tnl_RasterPos
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
#define MESA_MAJOR 7
|
||||
#define MESA_MINOR 3
|
||||
#define MESA_PATCH 0
|
||||
#define MESA_VERSION_STRING "7.3-rc1"
|
||||
#define MESA_VERSION_STRING "7.3-rc2"
|
||||
|
||||
/* To make version comparison easy */
|
||||
#define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
|
||||
|
|
|
|||
|
|
@ -4238,6 +4238,21 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper)
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check if the given type specifier is a rectangular texture sampler.
|
||||
*/
|
||||
static GLboolean
|
||||
is_rect_sampler_spec(const slang_type_specifier *spec)
|
||||
{
|
||||
while (spec->_array) {
|
||||
spec = spec->_array;
|
||||
}
|
||||
return spec->type == SLANG_SPEC_SAMPLER2DRECT ||
|
||||
spec->type == SLANG_SPEC_SAMPLER2DRECTSHADOW;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Called by compiler when a global variable has been parsed/compiled.
|
||||
* Here we examine the variable's type to determine what kind of register
|
||||
|
|
@ -4282,14 +4297,12 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var,
|
|||
}
|
||||
#if FEATURE_es2_glsl /* XXX should use FEATURE_texture_rect */
|
||||
/* disallow rect samplers */
|
||||
if ((var->type.specifier._array &&
|
||||
(var->type.specifier._array->type == SLANG_SPEC_SAMPLER2DRECT ||
|
||||
var->type.specifier._array->type == SLANG_SPEC_SAMPLER2DRECTSHADOW)) ||
|
||||
(var->type.specifier.type == SLANG_SPEC_SAMPLER2DRECT ||
|
||||
var->type.specifier.type == SLANG_SPEC_SAMPLER2DRECTSHADOW)) {
|
||||
if (is_rect_sampler_spec(&var->type.specifier)) {
|
||||
slang_info_log_error(A->log, "invalid sampler type for '%s'", varName);
|
||||
return GL_FALSE;
|
||||
}
|
||||
#else
|
||||
(void) is_rect_sampler_spec; /* silence warning */
|
||||
#endif
|
||||
{
|
||||
GLint sampNum = _mesa_add_sampler(prog->Parameters, varName, datatype);
|
||||
|
|
|
|||
|
|
@ -1471,9 +1471,9 @@ parse_expression(slang_parse_ctx * C, slang_output_ctx * O,
|
|||
RETURN0;
|
||||
}
|
||||
else {
|
||||
/* parse the array constructor size */
|
||||
slang_operation array_size;
|
||||
array_constructor = GL_TRUE;
|
||||
/* parse the array constructor size */
|
||||
slang_operation_construct(&array_size);
|
||||
if (!parse_expression(C, O, &array_size)) {
|
||||
slang_operation_destruct(&array_size);
|
||||
|
|
|
|||
|
|
@ -1349,9 +1349,10 @@ emit_copy(slang_emit_info *emitInfo, slang_ir_node *n)
|
|||
|
||||
if (n->Store->File == PROGRAM_SAMPLER) {
|
||||
/* no code generated for sampler assignments,
|
||||
* just copy the sampler index at compile time.
|
||||
* just copy the sampler index/target at compile time.
|
||||
*/
|
||||
n->Store->Index = n->Children[1]->Store->Index;
|
||||
n->Store->TexTarget = n->Children[1]->Store->TexTarget;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -260,8 +260,8 @@ link_uniform_vars(GLcontext *ctx,
|
|||
GLuint newSampNum = *numSamplers;
|
||||
if (newSampNum >= ctx->Const.MaxTextureImageUnits) {
|
||||
char s[100];
|
||||
sprintf(s, "Too many texture samplers (%u, max is %u)",
|
||||
newSampNum, ctx->Const.MaxTextureImageUnits);
|
||||
_mesa_sprintf(s, "Too many texture samplers (%u, max is %u)",
|
||||
newSampNum, ctx->Const.MaxTextureImageUnits);
|
||||
link_error(shProg, s);
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* \file slang_assemble_typeinfo.c
|
||||
* \file slang_typeinfo.c
|
||||
* slang type info
|
||||
* \author Michal Krol
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8,00"
|
||||
Version="8.00"
|
||||
Name="mesa"
|
||||
ProjectGUID="{2120C974-2717-4709-B44F-D6E6D0A56448}"
|
||||
RootNamespace="mesa"
|
||||
TargetFrameworkVersion="131072"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
|
|
@ -347,6 +348,22 @@
|
|||
<File
|
||||
RelativePath="..\..\..\..\src\mesa\glapi\glapi_getproc.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\src\mesa\glapi\glthread.c"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue