mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-10 12:30:11 +01:00
radeon: use txformat to decide to emit rect tex state.
This is more logical, and fixes a TFP issue.
This commit is contained in:
parent
2914f2b7fd
commit
2fdb0e5d3b
1 changed files with 8 additions and 4 deletions
|
|
@ -833,11 +833,14 @@ static void import_tex_obj_state( r100ContextPtr rmesa,
|
|||
cmd[TEX_PP_TXFORMAT] |= texobj->pp_txformat & TEXOBJ_TXFORMAT_MASK;
|
||||
cmd[TEX_PP_BORDER_COLOR] = texobj->pp_border_color;
|
||||
|
||||
if (texobj->base.Target == GL_TEXTURE_RECTANGLE_NV) {
|
||||
GLuint *txr_cmd = RADEON_DB_STATE( txr[unit] );
|
||||
if (texobj->pp_txformat & RADEON_TXFORMAT_NON_POWER2) {
|
||||
uint32_t *txr_cmd = &rmesa->hw.txr[unit].cmd[TXR_CMD_0];
|
||||
txr_cmd[TXR_PP_TEX_SIZE] = texobj->pp_txsize; /* NPOT only! */
|
||||
txr_cmd[TXR_PP_TEX_PITCH] = texobj->pp_txpitch; /* NPOT only! */
|
||||
RADEON_DB_STATECHANGE( rmesa, &rmesa->hw.txr[unit] );
|
||||
RADEON_STATECHANGE( rmesa, txr[unit] );
|
||||
}
|
||||
|
||||
if (texobj->base.Target == GL_TEXTURE_RECTANGLE_NV) {
|
||||
se_coord_fmt |= RADEON_VTX_ST0_NONPARAMETRIC << unit;
|
||||
}
|
||||
else {
|
||||
|
|
@ -1114,7 +1117,7 @@ static GLboolean radeon_validate_texture(GLcontext *ctx, struct gl_texture_objec
|
|||
RADEON_STATECHANGE( rmesa, ctx );
|
||||
rmesa->hw.ctx.cmd[CTX_PP_CNTL] |=
|
||||
(RADEON_TEX_0_ENABLE | RADEON_TEX_BLEND_0_ENABLE) << unit;
|
||||
|
||||
fprintf(stderr,"enabling tex %d\n", unit);
|
||||
RADEON_STATECHANGE( rmesa, tcl );
|
||||
rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXFMT] |= RADEON_ST_BIT(unit);
|
||||
|
||||
|
|
@ -1171,6 +1174,7 @@ void radeonUpdateTextureState( GLcontext *ctx )
|
|||
GLboolean ok;
|
||||
|
||||
/* set the ctx all textures off */
|
||||
fprintf(stderr,"resetting tex\n");
|
||||
RADEON_STATECHANGE( rmesa, ctx );
|
||||
rmesa->hw.ctx.cmd[CTX_PP_CNTL] &= ~((RADEON_TEX_ENABLE_MASK) | (RADEON_TEX_BLEND_ENABLE_MASK));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue