aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesalib/configure.ac15
-rw-r--r--mesalib/docs/index.html9
-rw-r--r--mesalib/docs/relnotes.html1
-rw-r--r--mesalib/src/glsl/link_varyings.cpp6
-rw-r--r--mesalib/src/mesa/main/fbobject.c2
-rw-r--r--mesalib/src/mesa/main/shaderapi.c5
-rw-r--r--mesalib/src/mesa/main/teximage.c2
-rw-r--r--mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp55
8 files changed, 76 insertions, 19 deletions
diff --git a/mesalib/configure.ac b/mesalib/configure.ac
index d6f21ea87..99a761a42 100644
--- a/mesalib/configure.ac
+++ b/mesalib/configure.ac
@@ -1179,6 +1179,13 @@ if test "x$enable_gbm" = xyes; then
if test "x$enable_shared_glapi" = xno; then
AC_MSG_ERROR([gbm_dri requires --enable-shared-glapi])
fi
+ else
+ # Strictly speaking libgbm does not require --enable-dri, although
+ # both of its backends do. Thus one can build libgbm without any
+ # backends if --disable-dri is set.
+ # To avoid unnecessary complexity of checking if at least one backend
+ # is available when building, just mandate --enable-dri.
+ AC_MSG_ERROR([gbm requires --enable-dri])
fi
fi
AM_CONDITIONAL(HAVE_GBM, test "x$enable_gbm" = xyes)
@@ -1605,6 +1612,12 @@ if test "x$enable_gallium_llvm" = xyes; then
AC_COMPUTE_INT([LLVM_VERSION_MINOR], [LLVM_VERSION_MINOR],
[#include "${LLVM_INCLUDEDIR}/llvm/Config/llvm-config.h"])
+ dnl In LLVM 3.4.1 patch level was defined in config.h and not
+ dnl llvm-config.h
+ AC_COMPUTE_INT([LLVM_VERSION_PATCH], [LLVM_VERSION_PATCH],
+ [#include "${LLVM_INCLUDEDIR}/llvm/Config/config.h"],
+ LLVM_VERSION_PATCH=0) dnl Default if LLVM_VERSION_PATCH not found
+
if test -n "${LLVM_VERSION_MAJOR}"; then
LLVM_VERSION_INT="${LLVM_VERSION_MAJOR}0${LLVM_VERSION_MINOR}"
else
@@ -1627,7 +1640,7 @@ if test "x$enable_gallium_llvm" = xyes; then
LLVM_COMPONENTS="${LLVM_COMPONENTS} option"
fi
fi
- DEFINES="${DEFINES} -DHAVE_LLVM=0x0$LLVM_VERSION_INT"
+ DEFINES="${DEFINES} -DHAVE_LLVM=0x0$LLVM_VERSION_INT -DLLVM_VERSION_PATCH=$LLVM_VERSION_PATCH"
MESA_LLVM=1
dnl Check for Clang internal headers
diff --git a/mesalib/docs/index.html b/mesalib/docs/index.html
index cb1846a8f..0c22e8502 100644
--- a/mesalib/docs/index.html
+++ b/mesalib/docs/index.html
@@ -16,6 +16,15 @@
<h1>News</h1>
+<h2>May 9, 2014</h2>
+<p>
+<a href="relnotes/10.1.3.html">Mesa 10.1.3</a> is released.
+This is a bug-fix release, and is being released sooner than
+originally scheduled to fix a performance regression (vmware
+swapbuffers falling back to software) introduced to the
+10.1.2 release.
+</p>
+
<h2>May 5, 2014</h2>
<p>
<a href="relnotes/10.1.2.html">Mesa 10.1.2</a> is released.
diff --git a/mesalib/docs/relnotes.html b/mesalib/docs/relnotes.html
index 8ef7bbb81..db38fdfa4 100644
--- a/mesalib/docs/relnotes.html
+++ b/mesalib/docs/relnotes.html
@@ -21,6 +21,7 @@ The release notes summarize what's new or changed in each Mesa release.
</p>
<ul>
+<li><a href="relnotes/10.1.3.html">10.1.3 release notes</a>
<li><a href="relnotes/10.1.2.html">10.1.2 release notes</a>
<li><a href="relnotes/10.1.1.html">10.1.1 release notes</a>
<li><a href="relnotes/10.1.html">10.1 release notes</a>
diff --git a/mesalib/src/glsl/link_varyings.cpp b/mesalib/src/glsl/link_varyings.cpp
index ac38a2f31..71998dfa9 100644
--- a/mesalib/src/glsl/link_varyings.cpp
+++ b/mesalib/src/glsl/link_varyings.cpp
@@ -992,7 +992,7 @@ varying_matches::match_comparator(const void *x_generic, const void *y_generic)
* varyings, but excludes variables such as gl_FrontFacing and gl_FragCoord.
*/
static bool
-is_varying_var(gl_shader_stage stage, const ir_variable *var)
+var_counts_against_varying_limit(gl_shader_stage stage, const ir_variable *var)
{
/* Only fragment shaders will take a varying variable as an input */
if (stage == MESA_SHADER_FRAGMENT &&
@@ -1462,7 +1462,7 @@ check_against_output_limit(struct gl_context *ctx,
ir_variable *const var = ((ir_instruction *) node)->as_variable();
if (var && var->data.mode == ir_var_shader_out &&
- is_varying_var(producer->Stage, var)) {
+ var_counts_against_varying_limit(producer->Stage, var)) {
output_vectors += var->type->count_attribute_slots();
}
}
@@ -1501,7 +1501,7 @@ check_against_input_limit(struct gl_context *ctx,
ir_variable *const var = ((ir_instruction *) node)->as_variable();
if (var && var->data.mode == ir_var_shader_in &&
- is_varying_var(consumer->Stage, var)) {
+ var_counts_against_varying_limit(consumer->Stage, var)) {
input_vectors += var->type->count_attribute_slots();
}
}
diff --git a/mesalib/src/mesa/main/fbobject.c b/mesalib/src/mesa/main/fbobject.c
index ca16ae1ec..97538bc7b 100644
--- a/mesalib/src/mesa/main/fbobject.c
+++ b/mesalib/src/mesa/main/fbobject.c
@@ -1058,6 +1058,8 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx,
if (att->Layered) {
if (att_tex_target == GL_TEXTURE_CUBE_MAP)
att_layer_count = 6;
+ else if (att_tex_target == GL_TEXTURE_1D_ARRAY)
+ att_layer_count = att->Renderbuffer->Height;
else
att_layer_count = att->Renderbuffer->Depth;
} else {
diff --git a/mesalib/src/mesa/main/shaderapi.c b/mesalib/src/mesa/main/shaderapi.c
index 6f84acd01..28739daeb 100644
--- a/mesalib/src/mesa/main/shaderapi.c
+++ b/mesalib/src/mesa/main/shaderapi.c
@@ -1879,6 +1879,11 @@ _mesa_copy_linked_program_data(gl_shader_stage type,
dst_gp->UsesEndPrimitive = src->Geom.UsesEndPrimitive;
}
break;
+ case MESA_SHADER_FRAGMENT: {
+ struct gl_fragment_program *dst_fp = (struct gl_fragment_program *) dst;
+ dst_fp->FragDepthLayout = src->FragDepthLayout;
+ }
+ break;
case MESA_SHADER_COMPUTE: {
struct gl_compute_program *dst_cp = (struct gl_compute_program *) dst;
int i;
diff --git a/mesalib/src/mesa/main/teximage.c b/mesalib/src/mesa/main/teximage.c
index c7f301cbd..845ba8014 100644
--- a/mesalib/src/mesa/main/teximage.c
+++ b/mesalib/src/mesa/main/teximage.c
@@ -3024,7 +3024,7 @@ _mesa_choose_texture_format(struct gl_context *ctx,
}
/* choose format from scratch */
- f = ctx->Driver.ChooseTextureFormat(ctx, texObj->Target, internalFormat,
+ f = ctx->Driver.ChooseTextureFormat(ctx, target, internalFormat,
format, type);
ASSERT(f != MESA_FORMAT_NONE);
return f;
diff --git a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 6eb6c8a97..bdee1f4eb 100644
--- a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -87,8 +87,7 @@ extern "C" {
*/
#define MAX_ARRAYS 256
-/* if we support a native gallium TG4 with the ability to take 4 texoffsets then bump this */
-#define MAX_GLSL_TEXTURE_OFFSET 1
+#define MAX_GLSL_TEXTURE_OFFSET 4
class st_src_reg;
class st_dst_reg;
@@ -2728,12 +2727,13 @@ glsl_to_tgsi_visitor::visit(ir_call *ir)
void
glsl_to_tgsi_visitor::visit(ir_texture *ir)
{
- st_src_reg result_src, coord, cube_sc, lod_info, projector, dx, dy, offset, sample_index, component;
+ st_src_reg result_src, coord, cube_sc, lod_info, projector, dx, dy, offset[MAX_GLSL_TEXTURE_OFFSET], sample_index, component;
st_dst_reg result_dst, coord_dst, cube_sc_dst;
glsl_to_tgsi_instruction *inst = NULL;
unsigned opcode = TGSI_OPCODE_NOP;
const glsl_type *sampler_type = ir->sampler->type;
bool is_cube_array = false;
+ unsigned i;
/* if we are a cube array sampler */
if ((sampler_type->sampler_dimensionality == GLSL_SAMPLER_DIM_CUBE &&
@@ -2771,7 +2771,7 @@ glsl_to_tgsi_visitor::visit(ir_texture *ir)
opcode = (is_cube_array && ir->shadow_comparitor) ? TGSI_OPCODE_TEX2 : TGSI_OPCODE_TEX;
if (ir->offset) {
ir->offset->accept(this);
- offset = this->result;
+ offset[0] = this->result;
}
break;
case ir_txb:
@@ -2780,7 +2780,7 @@ glsl_to_tgsi_visitor::visit(ir_texture *ir)
lod_info = this->result;
if (ir->offset) {
ir->offset->accept(this);
- offset = this->result;
+ offset[0] = this->result;
}
break;
case ir_txl:
@@ -2789,7 +2789,7 @@ glsl_to_tgsi_visitor::visit(ir_texture *ir)
lod_info = this->result;
if (ir->offset) {
ir->offset->accept(this);
- offset = this->result;
+ offset[0] = this->result;
}
break;
case ir_txd:
@@ -2800,7 +2800,7 @@ glsl_to_tgsi_visitor::visit(ir_texture *ir)
dy = this->result;
if (ir->offset) {
ir->offset->accept(this);
- offset = this->result;
+ offset[0] = this->result;
}
break;
case ir_txs:
@@ -2814,7 +2814,7 @@ glsl_to_tgsi_visitor::visit(ir_texture *ir)
lod_info = this->result;
if (ir->offset) {
ir->offset->accept(this);
- offset = this->result;
+ offset[0] = this->result;
}
break;
case ir_txf_ms:
@@ -2828,9 +2828,17 @@ glsl_to_tgsi_visitor::visit(ir_texture *ir)
component = this->result;
if (ir->offset) {
ir->offset->accept(this);
- /* this should have been lowered */
- assert(ir->offset->type->base_type != GLSL_TYPE_ARRAY);
- offset = this->result;
+ if (ir->offset->type->base_type == GLSL_TYPE_ARRAY) {
+ const glsl_type *elt_type = ir->offset->type->fields.array;
+ for (i = 0; i < ir->offset->type->length; i++) {
+ offset[i] = this->result;
+ offset[i].index += i * type_size(elt_type);
+ offset[i].type = elt_type->base_type;
+ offset[i].swizzle = swizzle_for_size(elt_type->vector_elements);
+ }
+ } else {
+ offset[0] = this->result;
+ }
}
break;
case ir_lod:
@@ -2960,8 +2968,9 @@ glsl_to_tgsi_visitor::visit(ir_texture *ir)
this->prog);
if (ir->offset) {
- inst->tex_offset_num_offset = 1;
- inst->tex_offsets[0] = offset;
+ for (i = 0; i < MAX_GLSL_TEXTURE_OFFSET && offset[i].file != PROGRAM_UNDEFINED; i++)
+ inst->tex_offsets[i] = offset[i];
+ inst->tex_offset_num_offset = i;
}
switch (sampler_type->sampler_dimensionality) {
@@ -4479,6 +4488,8 @@ translate_tex_offset(struct st_translate *t,
{
struct tgsi_texture_offset offset;
struct ureg_src imm_src;
+ struct ureg_dst dst;
+ int array;
switch (in_offset->file) {
case PROGRAM_IMMEDIATE:
@@ -4500,6 +4511,20 @@ translate_tex_offset(struct st_translate *t,
offset.SwizzleZ = GET_SWZ(in_offset->swizzle, 2);
offset.Padding = 0;
break;
+ case PROGRAM_ARRAY:
+ array = in_offset->index >> 16;
+
+ assert(array >= 0);
+ assert(array < (int) Elements(t->arrays));
+
+ dst = t->arrays[array];
+ offset.File = dst.File;
+ offset.Index = dst.Index + (in_offset->index & 0xFFFF) - 0x8000;
+ offset.SwizzleX = GET_SWZ(in_offset->swizzle, 0);
+ offset.SwizzleY = GET_SWZ(in_offset->swizzle, 1);
+ offset.SwizzleZ = GET_SWZ(in_offset->swizzle, 2);
+ offset.Padding = 0;
+ break;
default:
break;
}
@@ -5350,6 +5375,7 @@ st_new_shader_program(struct gl_context *ctx, GLuint name)
GLboolean
st_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
{
+ struct pipe_screen *pscreen = ctx->st->pipe->screen;
assert(prog->LinkStatus);
for (unsigned i = 0; i < MESA_SHADER_STAGES; i++) {
@@ -5388,7 +5414,8 @@ st_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
lower_packing_builtins(ir, lower_inst);
}
- lower_offset_arrays(ir);
+ if (!pscreen->get_param(pscreen, PIPE_CAP_TEXTURE_GATHER_OFFSETS))
+ lower_offset_arrays(ir);
do_mat_op_to_vec(ir);
lower_instructions(ir,
MOD_TO_FRACT |