diff options
author | Roland Scheidegger <rscheidegger_lists@hispeed.ch> | 2012-05-11 05:25:32 +0200 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2012-05-11 01:14:48 -0400 |
commit | 4b9bad959438725e4434e2aa4f142542d8dcc260 (patch) | |
tree | 18f0c465eaadeb7ee0cf0d7105299689cefe8d7a /src/r600_shader.c | |
parent | 37786e9027b8c8d1f9ec9928915784dd28853766 (diff) |
radeon: use GB_GR and BG_RG formats for packed yuv video for r600+
Those formats were invented for exactly that purpose so use them.
This saves some code and also some hw resources (only need one
sampler instead of two for packed yuv).
Only tested on EG.
Diffstat (limited to 'src/r600_shader.c')
-rw-r--r-- | src/r600_shader.c | 34 |
1 files changed, 3 insertions, 31 deletions
diff --git a/src/r600_shader.c b/src/r600_shader.c index ab2f4850..4cb2fc89 100644 --- a/src/r600_shader.c +++ b/src/r600_shader.c @@ -1090,7 +1090,7 @@ int R600_xv_ps(RADEONChipFamily ChipSet, uint32_t* shader) shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), - I_COUNT(2), + I_COUNT(1), CALL_COUNT(0), END_OF_PROGRAM(0), VALID_PIXEL_MODE(0), @@ -1120,8 +1120,8 @@ int R600_xv_ps(RADEONChipFamily ChipSet, uint32_t* shader) shader[i++] = TEX_DWORD1(DST_GPR(1), DST_REL(ABSOLUTE), DST_SEL_X(SQ_SEL_X), - DST_SEL_Y(SQ_SEL_MASK), - DST_SEL_Z(SQ_SEL_MASK), + DST_SEL_Y(SQ_SEL_Y), + DST_SEL_Z(SQ_SEL_Z), DST_SEL_W(SQ_SEL_1), LOD_BIAS(0), COORD_TYPE_X(TEX_NORMALIZED), @@ -1137,34 +1137,6 @@ int R600_xv_ps(RADEONChipFamily ChipSet, uint32_t* shader) SRC_SEL_Z(SQ_SEL_0), SRC_SEL_W(SQ_SEL_1)); shader[i++] = TEX_DWORD_PAD; - /* 28/29 */ - shader[i++] = TEX_DWORD0(TEX_INST(SQ_TEX_INST_SAMPLE), - BC_FRAC_MODE(0), - FETCH_WHOLE_QUAD(0), - RESOURCE_ID(1), - SRC_GPR(0), - SRC_REL(ABSOLUTE), - R7xx_ALT_CONST(0)); - shader[i++] = TEX_DWORD1(DST_GPR(1), - DST_REL(ABSOLUTE), - DST_SEL_X(SQ_SEL_MASK), - DST_SEL_Y(SQ_SEL_X), - DST_SEL_Z(SQ_SEL_Y), - DST_SEL_W(SQ_SEL_MASK), - LOD_BIAS(0), - COORD_TYPE_X(TEX_NORMALIZED), - COORD_TYPE_Y(TEX_NORMALIZED), - COORD_TYPE_Z(TEX_NORMALIZED), - COORD_TYPE_W(TEX_NORMALIZED)); - shader[i++] = TEX_DWORD2(OFFSET_X(0), - OFFSET_Y(0), - OFFSET_Z(0), - SAMPLER_ID(1), - SRC_SEL_X(SQ_SEL_X), - SRC_SEL_Y(SQ_SEL_Y), - SRC_SEL_Z(SQ_SEL_0), - SRC_SEL_W(SQ_SEL_1)); - shader[i++] = TEX_DWORD_PAD; return i; } |