From 5912cdff3e1f2296b1f5753a008b225bdac4559a Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 14 Jan 2009 16:26:41 -0700 Subject: i965: fix some FBO depth/stencil assertions --- src/mesa/drivers/dri/intel/intel_depthstencil.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/intel/intel_depthstencil.c b/src/mesa/drivers/dri/intel/intel_depthstencil.c index c2b4d7728b4..f43b9aed486 100644 --- a/src/mesa/drivers/dri/intel/intel_depthstencil.c +++ b/src/mesa/drivers/dri/intel/intel_depthstencil.c @@ -177,8 +177,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 */ -- cgit v1.2.3 From c7f43543af8a0bf95750eb6d332fdede07d104ea Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 14 Jan 2009 16:28:55 -0700 Subject: i965: fix incorrect renderbuffer DataType assignment --- src/mesa/drivers/dri/intel/intel_fbo.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c index 7453b96dc5d..93fc84503e5 100644 --- a/src/mesa/drivers/dri/intel/intel_fbo.c +++ b/src/mesa/drivers/dri/intel/intel_fbo.c @@ -529,20 +529,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 +559,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; -- cgit v1.2.3 From 947d1c5b2a70c0eafa4c408b47607574a2908468 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 14 Jan 2009 16:42:19 -0700 Subject: i965: asst. fixes, work-arounds for FBOs and render to texture OpenGL allows mixing and matching depth and stencil renderbuffers in framebuffer objects while the hardware really only supports interleaved depth/stencil buffers. This makes for some tricky buffer management. An extra wrinkle is the situation where the user allocates a 16bpp depth texture or renderbuffer then tries to render to it along with a stencil buffer. We'd have to promote the 16bpp Z values to 24-bit Z values and mix in the stencil values to setup the depth/stencil renderbuffer. There's no support for that now, so always allocate 32bpp depth textures/ renderbuffers for now. --- src/mesa/drivers/dri/intel/intel_depthstencil.c | 6 ++++++ src/mesa/drivers/dri/intel/intel_fbo.c | 7 +++++++ src/mesa/drivers/dri/intel/intel_tex_format.c | 10 ++++++++-- 3 files changed, 21 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/intel/intel_depthstencil.c b/src/mesa/drivers/dri/intel/intel_depthstencil.c index f43b9aed486..354b3bf0d70 100644 --- a/src/mesa/drivers/dri/intel/intel_depthstencil.c +++ b/src/mesa/drivers/dri/intel/intel_depthstencil.c @@ -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; diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c index 93fc84503e5..54f2fa5287b 100644 --- a/src/mesa/drivers/dri/intel/intel_fbo.c +++ b/src/mesa/drivers/dri/intel/intel_fbo.c @@ -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: diff --git a/src/mesa/drivers/dri/intel/intel_tex_format.c b/src/mesa/drivers/dri/intel/intel_tex_format.c index 2be060dd3e3..5e418ac4463 100644 --- a/src/mesa/drivers/dri/intel/intel_tex_format.c +++ b/src/mesa/drivers/dri/intel/intel_tex_format.c @@ -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: -- cgit v1.2.3 From 0dffd223491765fe572d606c2b10855cb568db7a Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 14 Jan 2009 16:48:54 -0700 Subject: r300: work-around FRAG_BIT_FOGC warning/error See bug 17929. Fog doesn't actually work, but the often complained about warning is silenced. --- src/mesa/drivers/dri/r300/r300_state.c | 7 +++++++ src/mesa/drivers/dri/r300/radeon_program_pair.c | 5 +++++ 2 files changed, 12 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c index 6a5c3633a23..a63dbac3436 100644 --- a/src/mesa/drivers/dri/r300/r300_state.c +++ b/src/mesa/drivers/dri/r300/r300_state.c @@ -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; diff --git a/src/mesa/drivers/dri/r300/radeon_program_pair.c b/src/mesa/drivers/dri/r300/radeon_program_pair.c index 5ad50d2863a..58bc0d5843f 100644 --- a/src/mesa/drivers/dri/r300/radeon_program_pair.c +++ b/src/mesa/drivers/dri/r300/radeon_program_pair.c @@ -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); -- cgit v1.2.3 From b5f32e1d5a1780292b10ba51fa2c7d05e77a7346 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 14 Jan 2009 12:33:06 -0700 Subject: glsl: minor clean-up for rect sampler test --- src/mesa/shader/slang/slang_codegen.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 51eb4c9c112..11340d26e21 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.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); -- cgit v1.2.3 From 7d08091767c9713e153922385b02047c73ab70e2 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 14 Jan 2009 12:35:43 -0700 Subject: glsl: fix comment --- src/mesa/shader/slang/slang_typeinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/slang/slang_typeinfo.c b/src/mesa/shader/slang/slang_typeinfo.c index a5bcde404f6..1ef43f58c02 100644 --- a/src/mesa/shader/slang/slang_typeinfo.c +++ b/src/mesa/shader/slang/slang_typeinfo.c @@ -23,7 +23,7 @@ */ /** - * \file slang_assemble_typeinfo.c + * \file slang_typeinfo.c * slang type info * \author Michal Krol */ -- cgit v1.2.3 From 8f8435637d5915cbb217340e831728bf10333c78 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 14 Jan 2009 17:01:35 -0700 Subject: mesa: bump version to 7.3-rc2 --- Makefile | 8 ++++---- src/mesa/main/version.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/mesa') diff --git a/Makefile b/Makefile index 5197e4967b3..55d2e39b848 100644 --- a/Makefile +++ b/Makefile @@ -174,10 +174,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* \ diff --git a/src/mesa/main/version.h b/src/mesa/main/version.h index 83aefe685ad..24495d608a5 100644 --- a/src/mesa/main/version.h +++ b/src/mesa/main/version.h @@ -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)) -- cgit v1.2.3 From fbf13bcb8aeeeb70475d9bd8a0d0640936d27047 Mon Sep 17 00:00:00 2001 From: Alan Hourihane Date: Thu, 15 Jan 2009 11:51:39 +0000 Subject: mesa: check frambuffer complete status before rendering --- src/mesa/main/api_validate.c | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c index 98dfbb105f5..59c2debb229 100644 --- a/src/mesa/main/api_validate.c +++ b/src/mesa/main/api_validate.c @@ -78,6 +78,23 @@ max_buffer_index(GLcontext *ctx, GLuint count, GLenum type, return max; } +static GLboolean +check_valid_to_render(GLcontext *ctx, char *function) +{ + if (ctx->DrawBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) { + _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT, + "glDraw%s(incomplete framebuffer)", function); + return GL_FALSE; + } + + /* Always need vertex positions, unless a vertex program is in use */ + if (!ctx->VertexProgram._Current && + !ctx->Array.ArrayObj->Vertex.Enabled && + !ctx->Array.ArrayObj->VertexAttrib[0].Enabled) + return GL_FALSE; + + return GL_TRUE; +} GLboolean _mesa_validate_DrawElements(GLcontext *ctx, @@ -108,10 +125,7 @@ _mesa_validate_DrawElements(GLcontext *ctx, if (ctx->NewState) _mesa_update_state(ctx); - /* Always need vertex positions, unless a vertex program is in use */ - if (!ctx->VertexProgram._Current && - !ctx->Array.ArrayObj->Vertex.Enabled && - !ctx->Array.ArrayObj->VertexAttrib[0].Enabled) + if (!check_valid_to_render(ctx, "Elements")) return GL_FALSE; /* Vertex buffer object tests */ @@ -155,7 +169,6 @@ _mesa_validate_DrawElements(GLcontext *ctx, return GL_TRUE; } - GLboolean _mesa_validate_DrawRangeElements(GLcontext *ctx, GLenum mode, GLuint start, GLuint end, @@ -190,10 +203,7 @@ _mesa_validate_DrawRangeElements(GLcontext *ctx, GLenum mode, if (ctx->NewState) _mesa_update_state(ctx); - /* Always need vertex positions, unless a vertex program is in use */ - if (!ctx->VertexProgram._Current && - !ctx->Array.ArrayObj->Vertex.Enabled && - !ctx->Array.ArrayObj->VertexAttrib[0].Enabled) + if (!check_valid_to_render(ctx, "RangeElements")) return GL_FALSE; /* Vertex buffer object tests */ @@ -261,10 +271,7 @@ _mesa_validate_DrawArrays(GLcontext *ctx, if (ctx->NewState) _mesa_update_state(ctx); - /* Always need vertex positions, unless a vertex program is in use */ - if (!ctx->VertexProgram._Current && - !ctx->Array.ArrayObj->Vertex.Enabled && - !ctx->Array.ArrayObj->VertexAttrib[0].Enabled) + if (!check_valid_to_render(ctx, "Arrays")) return GL_FALSE; if (ctx->Const.CheckArrayBounds) { -- cgit v1.2.3 From e1ba29ea19fd99d16b63cc34bc2aa1e4a26c5a25 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 15 Jan 2009 07:04:36 -0700 Subject: glsl: move declaration before code --- src/mesa/shader/slang/slang_compile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index 04fa2e0f931..818b90b7a86 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -1471,9 +1471,9 @@ parse_expression(slang_parse_ctx * C, slang_output_ctx * O, RETURN0; } else { - array_constructor = GL_TRUE; /* parse the array constructor size */ slang_operation array_size; + array_constructor = GL_TRUE; slang_operation_construct(&array_size); if (!parse_expression(C, O, &array_size)) { slang_operation_destruct(&array_size); -- cgit v1.2.3 From 4a8356209d143f21138eaa3ea64626e04c969669 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 15 Jan 2009 07:04:52 -0700 Subject: glsl: use _mesa_sprintf() --- src/mesa/shader/slang/slang_link.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c index 05a3e2dee07..c6d5cc05668 100644 --- a/src/mesa/shader/slang/slang_link.c +++ b/src/mesa/shader/slang/slang_link.c @@ -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; } -- cgit v1.2.3 From e7c988d065d3a86bb231c92dada569825105dee9 Mon Sep 17 00:00:00 2001 From: Karl Schultz Date: Thu, 15 Jan 2009 07:05:15 -0700 Subject: windows: updated mesa.def file --- src/mesa/drivers/windows/gdi/mesa.def | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/drivers/windows/gdi/mesa.def b/src/mesa/drivers/windows/gdi/mesa.def index 3f2d644e86e..b386e34aadf 100644 --- a/src/mesa/drivers/windows/gdi/mesa.def +++ b/src/mesa/drivers/windows/gdi/mesa.def @@ -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 \ No newline at end of file -- cgit v1.2.3 From 66a4f5cf9a74f906f802eeeae56de79fc640a2c9 Mon Sep 17 00:00:00 2001 From: "Xiang, Haihao" Date: Fri, 16 Jan 2009 16:06:33 +0800 Subject: i915: fallback on transfer mode --- src/mesa/drivers/dri/intel/intel_pixel_copy.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/intel/intel_pixel_copy.c b/src/mesa/drivers/dri/intel/intel_pixel_copy.c index 447c6494e79..7c7aa6097c8 100644 --- a/src/mesa/drivers/dri/intel/intel_pixel_copy.c +++ b/src/mesa/drivers/dri/intel/intel_pixel_copy.c @@ -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. -- cgit v1.2.3 From e442fe5ba53acf16c78339f19921d70dba3928f6 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 16 Jan 2009 09:30:37 -0700 Subject: glsl: fix broken sampler assignments --- src/mesa/shader/slang/slang_emit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 6b744d72c82..ea446fa5d49 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -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; } -- cgit v1.2.3