r600: use GET_BUFFER_RESINFO vtx fetch on eg instead of setting up consts
Contrary to what the comment said, this appears to work just fine on my rv770 (tested with piglit textureSize 140 fs/vs samplerBuffer). Dave Airlie confirmed it working on cayman too. I have no clue though if it's actually preferrable to use it (unfortunately we cannot get rid of the tex constants completely, as we still require them for cube map txq). Albeit filling in the format (1 channels or 4?) and the stuff related to mega- or mini-fetch (what the hell is this...) is just a guess based on other usage of vtx fetch instructions... v2: it really needs to be done through texture cache (I botched the testing because sb optimizations turned it automatically into tc, but can't rely on it and isn't happening on tes). Tested-by: Konstantin Kharlamov <hi-angel@yandex.ru> Reviewed-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
@@ -1510,7 +1510,8 @@ int cm_bytecode_add_cf_end(struct r600_bytecode *bc)
|
||||
/* common to all 3 families */
|
||||
static int r600_bytecode_vtx_build(struct r600_bytecode *bc, struct r600_bytecode_vtx *vtx, unsigned id)
|
||||
{
|
||||
bc->bytecode[id] = S_SQ_VTX_WORD0_BUFFER_ID(vtx->buffer_id) |
|
||||
bc->bytecode[id] = S_SQ_VTX_WORD0_VTX_INST(vtx->op) |
|
||||
S_SQ_VTX_WORD0_BUFFER_ID(vtx->buffer_id) |
|
||||
S_SQ_VTX_WORD0_FETCH_TYPE(vtx->fetch_type) |
|
||||
S_SQ_VTX_WORD0_SRC_GPR(vtx->src_gpr) |
|
||||
S_SQ_VTX_WORD0_SRC_SEL_X(vtx->src_sel_x);
|
||||
|
Reference in New Issue
Block a user