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/evergreen_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/evergreen_shader.c')
-rw-r--r-- | src/evergreen_shader.c | 36 |
1 files changed, 3 insertions, 33 deletions
diff --git a/src/evergreen_shader.c b/src/evergreen_shader.c index bbdd7a76..a6faba05 100644 --- a/src/evergreen_shader.c +++ b/src/evergreen_shader.c @@ -1306,7 +1306,7 @@ int evergreen_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), VALID_PIXEL_MODE(0), END_OF_PROGRAM(0), CF_INST(SQ_CF_INST_TC), @@ -1337,8 +1337,8 @@ int evergreen_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), @@ -1354,36 +1354,6 @@ int evergreen_xv_ps(RADEONChipFamily ChipSet, uint32_t* shader) SRC_SEL_Z(SQ_SEL_0), SRC_SEL_W(SQ_SEL_1)); shader[i++] = TEX_DWORD_PAD; - /* 34/35 */ - shader[i++] = TEX_DWORD0(TEX_INST(SQ_TEX_INST_SAMPLE), - INST_MOD(0), - FETCH_WHOLE_QUAD(0), - RESOURCE_ID(1), - SRC_GPR(0), - SRC_REL(ABSOLUTE), - ALT_CONST(0), - RESOURCE_INDEX_MODE(SQ_CF_INDEX_NONE), - SAMPLER_INDEX_MODE(SQ_CF_INDEX_NONE)); - 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; } |