summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@vmware.com>2009-01-16 16:44:53 +0000
committerAlan Hourihane <alanh@vmware.com>2009-01-16 16:44:53 +0000
commit2e28c1fda24988241ef7abb91b7d896e38f5df26 (patch)
tree593e70705d1f60babd77697b75f7618a94c6703b /src
parent47ca0234dc9f83808cb141944537c78eaade5d55 (diff)
parente442fe5ba53acf16c78339f19921d70dba3928f6 (diff)
Merge commit 'origin/master' into gallium-0.2
Conflicts: src/mesa/shader/slang/slang_compile.c
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/intel/intel_depthstencil.c13
-rw-r--r--src/mesa/drivers/dri/intel/intel_fbo.c15
-rw-r--r--src/mesa/drivers/dri/intel/intel_pixel_copy.c6
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_format.c10
-rw-r--r--src/mesa/drivers/dri/r300/r300_state.c7
-rw-r--r--src/mesa/drivers/dri/r300/radeon_program_pair.c5
-rw-r--r--src/mesa/drivers/windows/gdi/mesa.def5
-rw-r--r--src/mesa/main/version.h2
-rw-r--r--src/mesa/shader/slang/slang_codegen.c23
-rw-r--r--src/mesa/shader/slang/slang_compile.c2
-rw-r--r--src/mesa/shader/slang/slang_emit.c3
-rw-r--r--src/mesa/shader/slang/slang_link.c4
-rw-r--r--src/mesa/shader/slang/slang_typeinfo.c2
13 files changed, 80 insertions, 17 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_depthstencil.c b/src/mesa/drivers/dri/intel/intel_depthstencil.c
index c2b4d7728b..354b3bf0d7 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;
@@ -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 */
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
index 7453b96dc5..54f2fa5287 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:
@@ -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;
diff --git a/src/mesa/drivers/dri/intel/intel_pixel_copy.c b/src/mesa/drivers/dri/intel/intel_pixel_copy.c
index 447c6494e7..7c7aa6097c 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.
diff --git a/src/mesa/drivers/dri/intel/intel_tex_format.c b/src/mesa/drivers/dri/intel/intel_tex_format.c
index 2be060dd3e..5e418ac446 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:
diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c
index 6a5c3633a2..a63dbac343 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 5ad50d2863..58bc0d5843 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);
diff --git a/src/mesa/drivers/windows/gdi/mesa.def b/src/mesa/drivers/windows/gdi/mesa.def
index 3f2d644e86..b386e34aad 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
diff --git a/src/mesa/main/version.h b/src/mesa/main/version.h
index 83aefe685a..24495d608a 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))
diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c
index 51eb4c9c11..11340d26e2 100644
--- a/src/mesa/shader/slang/slang_codegen.c
+++ b/src/mesa/shader/slang/slang_codegen.c
@@ -4239,6 +4239,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
* storage will be used.
@@ -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);
diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c
index 6667138cdd..818b90b7a8 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 {
+ /* 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);
diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c
index 6b744d72c8..ea446fa5d4 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;
}
diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c
index b3aae759b9..b5862bda82 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;
}
diff --git a/src/mesa/shader/slang/slang_typeinfo.c b/src/mesa/shader/slang/slang_typeinfo.c
index a5bcde404f..1ef43f58c0 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
*/