Mesa (master): r600g: fix shadow rect samplers
Marek Olšák
mareko at kemper.freedesktop.org
Sat Sep 10 06:56:32 UTC 2011
Module: Mesa
Branch: master
Commit: 6b9a36cc3ff3b0a65f70b8a5503e26339a0e4fbe
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6b9a36cc3ff3b0a65f70b8a5503e26339a0e4fbe
Author: Marek Olšák <maraeo at gmail.com>
Date: Mon Sep 5 08:01:24 2011 +0200
r600g: fix shadow rect samplers
---
src/gallium/drivers/r600/r600_shader.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c
index fa8ad61..7f7f745 100644
--- a/src/gallium/drivers/r600/r600_shader.c
+++ b/src/gallium/drivers/r600/r600_shader.c
@@ -2179,6 +2179,7 @@ static int tgsi_tex(struct r600_shader_ctx *ctx)
opcode = ctx->inst_info->r600_opcode;
if (inst->Texture.Texture == TGSI_TEXTURE_SHADOW1D ||
inst->Texture.Texture == TGSI_TEXTURE_SHADOW2D ||
+ inst->Texture.Texture == TGSI_TEXTURE_SHADOWRECT ||
inst->Texture.Texture == TGSI_TEXTURE_SHADOW1D_ARRAY ||
inst->Texture.Texture == TGSI_TEXTURE_SHADOW2D_ARRAY) {
switch (opcode) {
@@ -2228,12 +2229,13 @@ static int tgsi_tex(struct r600_shader_ctx *ctx)
tex.src_sel_w = 1;
}
- if (inst->Texture.Texture != TGSI_TEXTURE_RECT) {
+ if (inst->Texture.Texture != TGSI_TEXTURE_RECT &&
+ inst->Texture.Texture != TGSI_TEXTURE_SHADOWRECT) {
tex.coord_type_x = 1;
tex.coord_type_y = 1;
- tex.coord_type_z = 1;
- tex.coord_type_w = 1;
}
+ tex.coord_type_z = 1;
+ tex.coord_type_w = 1;
tex.offset_x = offset_x;
tex.offset_y = offset_y;
@@ -2244,6 +2246,7 @@ static int tgsi_tex(struct r600_shader_ctx *ctx)
* Some instructions expect the depth in Z. */
if ((inst->Texture.Texture == TGSI_TEXTURE_SHADOW1D ||
inst->Texture.Texture == TGSI_TEXTURE_SHADOW2D ||
+ inst->Texture.Texture == TGSI_TEXTURE_SHADOWRECT ||
inst->Texture.Texture == TGSI_TEXTURE_SHADOW1D_ARRAY) &&
opcode != SQ_TEX_INST_SAMPLE_C_L &&
opcode != SQ_TEX_INST_SAMPLE_C_LB) {
More information about the mesa-commit
mailing list