vbox的更動 98914 路徑 trunk/src/VBox/Additions/3D
- 時間撮記:
- 2023-3-11 下午11:08:00 (21 月 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Additions/3D/mesa/mesa-21.3.8/src/gallium/drivers/svga/svga_tgsi_vgpu10.c
r96488 r98914 1156 1156 static void 1157 1157 emit_indirect_register(struct svga_shader_emitter_v10 *emit, 1158 #ifndef VBOX_WITH_MESA3D_NINE_SVGA 1158 1159 unsigned addr_reg_index) 1160 #else 1161 unsigned addr_reg_index, 1162 unsigned addr_reg_select) 1163 #endif 1159 1164 { 1160 1165 unsigned tmp_reg_index; … … 1172 1177 operand0.index0Representation = VGPU10_OPERAND_INDEX_IMMEDIATE32; 1173 1178 operand0.selectionMode = VGPU10_OPERAND_4_COMPONENT_SELECT_1_MODE; 1179 #ifndef VBOX_WITH_MESA3D_NINE_SVGA 1174 1180 operand0.swizzleX = 0; 1175 1181 operand0.swizzleY = 1; 1176 1182 operand0.swizzleZ = 2; 1177 1183 operand0.swizzleW = 3; 1184 #else 1185 operand0.selectMask = addr_reg_select; 1186 #endif 1178 1187 1179 1188 emit_dword(emit, operand0.value); … … 1436 1445 1437 1446 if (indirect) { 1447 #ifndef VBOX_WITH_MESA3D_NINE_SVGA 1438 1448 emit_indirect_register(emit, reg->Indirect.Index); 1449 #else 1450 emit_indirect_register(emit, reg->Indirect.Index, reg->Indirect.Swizzle); 1451 #endif 1439 1452 } 1440 1453 } … … 1828 1841 1829 1842 if (indirect2d) { 1843 #ifndef VBOX_WITH_MESA3D_NINE_SVGA 1830 1844 emit_indirect_register(emit, reg->DimIndirect.Index); 1845 #else 1846 emit_indirect_register(emit, reg->DimIndirect.Index, reg->DimIndirect.Swizzle); 1847 #endif 1831 1848 } 1832 1849 } … … 1835 1852 1836 1853 if (indirect) { 1854 #ifndef VBOX_WITH_MESA3D_NINE_SVGA 1837 1855 emit_indirect_register(emit, reg->Indirect.Index); 1856 #else 1857 emit_indirect_register(emit, reg->Indirect.Index, reg->Indirect.Swizzle); 1858 #endif 1838 1859 } 1839 1860 } … … 6402 6423 } 6403 6424 6425 6426 #ifdef VBOX_WITH_MESA3D_NINE_SVGA 6427 /** 6428 * Emit code for TGSI_OPCODE_ARR instruction. 6429 */ 6430 static boolean 6431 emit_arr(struct svga_shader_emitter_v10 *emit, 6432 const struct tgsi_full_instruction *inst) 6433 { 6434 unsigned index = inst->Dst[0].Register.Index; 6435 struct tgsi_full_src_register half = make_immediate_reg_float(emit, 0.5f); 6436 struct tgsi_full_dst_register address_reg_dst; 6437 struct tgsi_full_src_register address_reg_src; 6438 VGPU10_OPCODE_TYPE opcode; 6439 6440 assert(index < MAX_VGPU10_ADDR_REGS); 6441 address_reg_dst = make_dst_temp_reg(emit->address_reg_index[index]); 6442 address_reg_dst = writemask_dst(&address_reg_dst, inst->Dst[0].Register.WriteMask); 6443 6444 address_reg_src = make_src_temp_reg(emit->address_reg_index[index]); 6445 6446 /* ARR dst, s0 6447 * Translates into: 6448 * ADD address_tmp, s0, 0.5f 6449 * FTOI address_tmp, address_tmp 6450 */ 6451 6452 emit_instruction_op2(emit, VGPU10_OPCODE_ADD, &address_reg_dst, &inst->Src[0], &half); 6453 emit_instruction_op1(emit, VGPU10_OPCODE_FTOI, &address_reg_dst, &address_reg_src); 6454 6455 return TRUE; 6456 } 6457 #endif 6404 6458 6405 6459 /** … … 9380 9434 case TGSI_OPCODE_UARL: 9381 9435 return emit_arl_uarl(emit, inst); 9436 #ifdef VBOX_WITH_MESA3D_NINE_SVGA 9437 case TGSI_OPCODE_ARR: 9438 return emit_arr(emit, inst); 9439 #endif 9382 9440 case TGSI_OPCODE_BGNSUB: 9383 9441 /* no-op */
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器