aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorChristian König <[email protected]>2011-07-13 15:54:28 +0200
committerChristian König <[email protected]>2011-07-13 15:54:28 +0200
commitc8dd301b6fd6bb473d8f9f16689d9689d9608520 (patch)
tree60da9768b59f972ba18f0d33d68a91db284c4c15 /src/gallium
parent7c48575402e8c384db2fab24e4dd0fc72bef0451 (diff)
r600g: revert "set BLEND_CLAMP depending on clamp_fragment_color"
BLEND_CLAMP doesn't seems to be the right way to implement "ARB_color_buffer_float".
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/r600/r600_state.c11
-rw-r--r--src/gallium/winsys/r600/drm/r600_hw_context.c18
2 files changed, 11 insertions, 18 deletions
diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c
index f8f7c2031db..01406f2bad6 100644
--- a/src/gallium/drivers/r600/r600_state.c
+++ b/src/gallium/drivers/r600/r600_state.c
@@ -874,7 +874,7 @@ static void *r600_create_rs_state(struct pipe_context *ctx,
struct r600_pipe_context *rctx = (struct r600_pipe_context *)ctx;
struct r600_pipe_rasterizer *rs = CALLOC_STRUCT(r600_pipe_rasterizer);
struct r600_pipe_state *rstate;
- unsigned tmp, cb;
+ unsigned tmp;
unsigned prov_vtx = 1, polygon_dual_mode;
unsigned clip_rule;
@@ -949,11 +949,6 @@ static void *r600_create_rs_state(struct pipe_context *ctx,
r600_pipe_state_add_reg(rstate, R_028DFC_PA_SU_POLY_OFFSET_CLAMP, 0x00000000, 0xFFFFFFFF, NULL);
r600_pipe_state_add_reg(rstate, R_02820C_PA_SC_CLIPRECT_RULE, clip_rule, 0xFFFFFFFF, NULL);
- for (cb = 0; cb < 7; ++cb)
- r600_pipe_state_add_reg(rstate, R_0280A0_CB_COLOR0_INFO + cb * 4,
- S_0280A0_BLEND_CLAMP(state->clamp_fragment_color),
- S_0280A0_BLEND_CLAMP(1), NULL);
-
return rstate;
}
@@ -1409,6 +1404,7 @@ static void r600_cb(struct r600_pipe_context *rctx, struct r600_pipe_state *rsta
color_info = S_0280A0_FORMAT(format) |
S_0280A0_COMP_SWAP(swap) |
S_0280A0_ARRAY_MODE(rtex->array_mode[level]) |
+ S_0280A0_BLEND_CLAMP(1) |
S_0280A0_NUMBER_TYPE(ntype) |
S_0280A0_ENDIAN(endian);
@@ -1421,7 +1417,6 @@ static void r600_cb(struct r600_pipe_context *rctx, struct r600_pipe_state *rsta
* - BLEND_CLAMP is enabled
* - BLEND_FLOAT32 is disabled
*/
- // TODO get BLEND_CLAMP state from rasterizer state
if (desc->colorspace != UTIL_FORMAT_COLORSPACE_ZS &&
(desc->channel[i].size < 12 &&
desc->channel[i].type != UTIL_FORMAT_TYPE_FLOAT &&
@@ -1449,7 +1444,7 @@ static void r600_cb(struct r600_pipe_context *rctx, struct r600_pipe_state *rsta
(offset + r600_bo_offset(bo[0])) >> 8, 0xFFFFFFFF, bo[0]);
r600_pipe_state_add_reg(rstate,
R_0280A0_CB_COLOR0_INFO + cb * 4,
- color_info, ~S_0280A0_BLEND_CLAMP(1), NULL);
+ color_info, 0xFFFFFFFF, bo[0]);
r600_pipe_state_add_reg(rstate,
R_028060_CB_COLOR0_SIZE + cb * 4,
S_028060_PITCH_TILE_MAX(pitch) |
diff --git a/src/gallium/winsys/r600/drm/r600_hw_context.c b/src/gallium/winsys/r600/drm/r600_hw_context.c
index 69f7884f823..a2f13ff0863 100644
--- a/src/gallium/winsys/r600/drm/r600_hw_context.c
+++ b/src/gallium/winsys/r600/drm/r600_hw_context.c
@@ -1054,7 +1054,7 @@ void r600_context_pipe_state_set(struct r600_context *ctx, struct r600_pipe_stat
}
if (block->flags & REG_FLAG_DIRTY_ALWAYS)
dirty |= R600_BLOCK_STATUS_DIRTY;
- if (block->pm4_bo_index[id] && state->regs[i].bo) {
+ if (block->pm4_bo_index[id]) {
/* find relocation */
reloc_id = block->pm4_bo_index[id];
r600_bo_reference(ctx->radeon, &block->reloc[reloc_id].bo, reg->bo);
@@ -1298,15 +1298,13 @@ void r600_context_block_emit_dirty(struct r600_context *ctx, struct r600_block *
if (block->pm4_bo_index[j]) {
/* find relocation */
id = block->pm4_bo_index[j];
- if (block->reloc[id].bo) {
- r600_context_bo_reloc(ctx,
- &block->pm4[block->reloc[id].bo_pm4_index],
- block->reloc[id].bo);
- r600_context_bo_flush(ctx,
- block->reloc[id].flush_flags,
- block->reloc[id].flush_mask,
- block->reloc[id].bo);
- }
+ r600_context_bo_reloc(ctx,
+ &block->pm4[block->reloc[id].bo_pm4_index],
+ block->reloc[id].bo);
+ r600_context_bo_flush(ctx,
+ block->reloc[id].flush_flags,
+ block->reloc[id].flush_mask,
+ block->reloc[id].bo);
nbo--;
if (nbo == 0)
break;