mirror of
https://gitee.com/openharmony/third_party_mesa3d
synced 2024-12-03 13:13:02 +00:00
pan/bi: Add second destination to TEXC
Used to model dual texturing, which writes to separate sets of staging registers. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13723>
This commit is contained in:
parent
8e02731624
commit
7dc90b68d9
@ -7689,13 +7689,14 @@
|
||||
</mod>
|
||||
</ins>
|
||||
|
||||
<ins name="+TEXC" staging="rw=sr_count" mask="0xffc00" exact="0xd7000" message="tex">
|
||||
<ins name="+TEXC" staging="rw=sr_count" mask="0xffc00" exact="0xd7000" message="tex" dests="2">
|
||||
<src start="0"/>
|
||||
<src start="3"/>
|
||||
<src start="6" mask="0xf7"/>
|
||||
<mod name="skip" start="9" size="1" opt="skip"/>
|
||||
<!-- not actually encoded, but used for IR -->
|
||||
<immediate name="sr_count" size="4" pseudo="true"/>
|
||||
<immediate name="sr_count_2" size="4" pseudo="true"/>
|
||||
<mod name="lod_mode" start="13" size="1" default="zero_lod" pseudo="true">
|
||||
<opt>computed_lod</opt>
|
||||
<opt>zero_lod</opt>
|
||||
|
@ -2769,9 +2769,9 @@ bi_emit_texc(bi_builder *b, nir_tex_instr *instr)
|
||||
|
||||
uint32_t desc_u = 0;
|
||||
memcpy(&desc_u, &desc, sizeof(desc_u));
|
||||
bi_texc_to(b, sr_count ? idx : bi_dest_index(&instr->dest),
|
||||
bi_texc_to(b, sr_count ? idx : bi_dest_index(&instr->dest), bi_null(),
|
||||
idx, cx, cy, bi_imm_u32(desc_u), !computed_lod,
|
||||
sr_count);
|
||||
sr_count, 0);
|
||||
|
||||
/* Explicit copy to facilitate tied operands */
|
||||
if (sr_count) {
|
||||
|
@ -107,6 +107,8 @@ bi_count_write_registers(const bi_instr *ins, unsigned d)
|
||||
return bi_count_staging_registers(ins);
|
||||
} else if (ins->op == BI_OPCODE_SEG_ADD_I64) {
|
||||
return 2;
|
||||
} else if (ins->op == BI_OPCODE_TEXC && d == 1) {
|
||||
return ins->sr_count_2;
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user