diff options
author | marha <marha@users.sourceforge.net> | 2011-09-12 09:07:21 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-09-12 09:07:21 +0200 |
commit | 0b40f5f4b54453a77f4b09c431f8efc6875da61f (patch) | |
tree | c1f08e0dd75a6ed7876c24c7219f93f01cab3605 /mesalib/src/mesa/state_tracker | |
parent | 75530c6eb2feebe234f7cb078c4caaf70c64981a (diff) | |
parent | 24a692ce832161d3b794110dd82b1508d38a0887 (diff) | |
download | vcxsrv-0b40f5f4b54453a77f4b09c431f8efc6875da61f.tar.gz vcxsrv-0b40f5f4b54453a77f4b09c431f8efc6875da61f.tar.bz2 vcxsrv-0b40f5f4b54453a77f4b09c431f8efc6875da61f.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
mesalib/src/glsl/ast_to_hir.cpp
mesalib/src/glsl/glcpp/glcpp.c
mesalib/src/mesa/drivers/dri/common/dri_util.c
mesalib/src/mesa/drivers/dri/common/spantmp2.h
mesalib/src/mesa/drivers/dri/common/utils.c
mesalib/src/mesa/drivers/dri/swrast/swrast.c
mesalib/src/mesa/program/ir_to_mesa.cpp
mesalib/src/mesa/state_tracker/st_extensions.c
mesalib/src/mesa/state_tracker/st_mesa_to_tgsi.c
pixman/configure.ac
pixman/pixman/pixman-arm-neon-asm.S
pixman/test/Makefile.am
pixman/test/utils.c
pixman/test/utils.h
Diffstat (limited to 'mesalib/src/mesa/state_tracker')
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_extensions.c | 11 | ||||
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 33 | ||||
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_mesa_to_tgsi.c | 2 |
3 files changed, 32 insertions, 14 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_extensions.c b/mesalib/src/mesa/state_tracker/st_extensions.c index 7abb8d4fb..8af144bbb 100644 --- a/mesalib/src/mesa/state_tracker/st_extensions.c +++ b/mesalib/src/mesa/state_tracker/st_extensions.c @@ -85,6 +85,9 @@ void st_init_limits(struct st_context *st) c->MaxTextureRectSize
= _min(1 << (c->MaxTextureLevels - 1), MAX_TEXTURE_RECT_SIZE);
+ c->MaxArrayTextureLayers
+ = screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS);
+
c->MaxTextureImageUnits
= _min(screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS),
MAX_TEXTURE_IMAGE_UNITS);
@@ -170,6 +173,12 @@ void st_init_limits(struct st_context *st) /* raise MaxParameters if native support is higher */
pc->MaxParameters = MAX2(pc->MaxParameters, pc->MaxNativeParameters);
+ /* Gallium doesn't really care about local vs. env parameters so use the
+ * same limits.
+ */
+ pc->MaxLocalParams = pc->MaxParameters;
+ pc->MaxEnvParams = pc->MaxParameters;
+
options->EmitNoNoise = TRUE;
/* TODO: make these more fine-grained if anyone needs it */
@@ -499,7 +508,7 @@ void st_init_extensions(struct st_context *st) }
/* GL_EXT_texture_array */
- if (screen->get_param(screen, PIPE_CAP_ARRAY_TEXTURES)) {
+ if (screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS) > 1) {
ctx->Extensions.EXT_texture_array = GL_TRUE;
ctx->Extensions.MESA_texture_array = GL_TRUE;
}
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 9394bea00..892169822 100644 --- a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -519,7 +519,7 @@ glsl_to_tgsi_visitor::emit(ir_instruction *ir, unsigned op, inst->function = NULL; - if (op == TGSI_OPCODE_ARL) + if (op == TGSI_OPCODE_ARL || op == TGSI_OPCODE_UARL) this->num_address_regs = 1; /* Update indirect addressing status used by TGSI */ @@ -746,16 +746,12 @@ void glsl_to_tgsi_visitor::emit_arl(ir_instruction *ir, st_dst_reg dst, st_src_reg src0) { - st_src_reg tmp = get_temp(glsl_type::float_type); + int op = TGSI_OPCODE_ARL; - if (src0.type == GLSL_TYPE_INT) - emit(NULL, TGSI_OPCODE_I2F, st_dst_reg(tmp), src0); - else if (src0.type == GLSL_TYPE_UINT) - emit(NULL, TGSI_OPCODE_U2F, st_dst_reg(tmp), src0); - else - tmp = src0; - - emit(NULL, TGSI_OPCODE_ARL, dst, tmp); + if (src0.type == GLSL_TYPE_INT || src0.type == GLSL_TYPE_UINT) + op = TGSI_OPCODE_UARL; + + emit(NULL, op, dst, src0); } /** @@ -2558,6 +2554,8 @@ glsl_to_tgsi_visitor::visit(ir_texture *ir) break; } + const glsl_type *sampler_type = ir->sampler->type; + if (ir->projector) { if (opcode == TGSI_OPCODE_TEX) { /* Slot the projector in as the last component of the coord. */ @@ -2589,6 +2587,9 @@ glsl_to_tgsi_visitor::visit(ir_texture *ir) tmp_src = get_temp(glsl_type::vec4_type); st_dst_reg tmp_dst = st_dst_reg(tmp_src); + /* Projective division not allowed for array samplers. */ + assert(!sampler_type->sampler_array); + tmp_dst.writemask = WRITEMASK_Z; emit(ir, TGSI_OPCODE_MOV, tmp_dst, this->result); @@ -2613,7 +2614,15 @@ glsl_to_tgsi_visitor::visit(ir_texture *ir) * coord. */ ir->shadow_comparitor->accept(this); - coord_dst.writemask = WRITEMASK_Z; + + /* XXX This will need to be updated for cubemap array samplers. */ + if (sampler_type->sampler_dimensionality == GLSL_SAMPLER_DIM_2D && + sampler_type->sampler_array) { + coord_dst.writemask = WRITEMASK_W; + } else { + coord_dst.writemask = WRITEMASK_Z; + } + emit(ir, TGSI_OPCODE_MOV, coord_dst, this->result); coord_dst.writemask = WRITEMASK_XYZW; } @@ -2651,8 +2660,6 @@ glsl_to_tgsi_visitor::visit(ir_texture *ir) inst->tex_offsets[0].SwizzleZ = GET_SWZ(offset.swizzle, 2); } - const glsl_type *sampler_type = ir->sampler->type; - switch (sampler_type->sampler_dimensionality) { case GLSL_SAMPLER_DIM_1D: inst->tex_target = (sampler_type->sampler_array) diff --git a/mesalib/src/mesa/state_tracker/st_mesa_to_tgsi.c b/mesalib/src/mesa/state_tracker/st_mesa_to_tgsi.c index ce6d87937..3ced74e41 100644 --- a/mesalib/src/mesa/state_tracker/st_mesa_to_tgsi.c +++ b/mesalib/src/mesa/state_tracker/st_mesa_to_tgsi.c @@ -276,6 +276,8 @@ translate_texture_target( GLuint textarget, case TEXTURE_1D_INDEX: return TGSI_TEXTURE_SHADOW1D;
case TEXTURE_2D_INDEX: return TGSI_TEXTURE_SHADOW2D;
case TEXTURE_RECT_INDEX: return TGSI_TEXTURE_SHADOWRECT;
+ case TEXTURE_1D_ARRAY_INDEX: return TGSI_TEXTURE_SHADOW1D_ARRAY;
+ case TEXTURE_2D_ARRAY_INDEX: return TGSI_TEXTURE_SHADOW2D_ARRAY;
default: break;
}
}
|