• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

hardware/intel/intel-driver


Commit MetaInfo

Revisão030f48af1ea3160894db798093559e0fdc4ba079 (tree)
Hora2014-12-14 01:26:32
AutorZhao Yakui <yakui.zhao@inte...>
CommiterXiang, Haihao

Mensagem de Log

Media/SKL: Follow the spec to update the STATE_BASE_ADDRESS command for media pipeline

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
(cherry picked from commit b660c288f963dd2a2bb1951feeb8161483c2faf2)

Mudança Sumário

Diff

--- a/src/i965_gpe_utils.c
+++ b/src/i965_gpe_utils.c
@@ -1207,6 +1207,67 @@ gen8_gpe_load_kernels(VADriverContextP ctx,
12071207 return;
12081208 }
12091209
1210+static void
1211+gen9_gpe_state_base_address(VADriverContextP ctx,
1212+ struct i965_gpe_context *gpe_context,
1213+ struct intel_batchbuffer *batch)
1214+{
1215+ BEGIN_BATCH(batch, 19);
1216+
1217+ OUT_BATCH(batch, CMD_STATE_BASE_ADDRESS | (19 - 2));
1218+
1219+ OUT_BATCH(batch, 0 | BASE_ADDRESS_MODIFY); //General State Base Address
1220+ OUT_BATCH(batch, 0);
1221+ OUT_BATCH(batch, 0);
1222+
1223+ /*DW4 Surface state base address */
1224+ OUT_RELOC(batch, gpe_context->surface_state_binding_table.bo, I915_GEM_DOMAIN_INSTRUCTION, 0, BASE_ADDRESS_MODIFY); /* Surface state base address */
1225+ OUT_BATCH(batch, 0);
1226+
1227+ /*DW6. Dynamic state base address */
1228+ if (gpe_context->dynamic_state.bo)
1229+ OUT_RELOC(batch, gpe_context->dynamic_state.bo,
1230+ I915_GEM_DOMAIN_RENDER | I915_GEM_DOMAIN_SAMPLER,
1231+ 0, BASE_ADDRESS_MODIFY);
1232+ else
1233+ OUT_BATCH(batch, 0 | BASE_ADDRESS_MODIFY);
1234+
1235+ OUT_BATCH(batch, 0);
1236+
1237+ /*DW8. Indirect Object base address */
1238+ if (gpe_context->indirect_state.bo)
1239+ OUT_RELOC(batch, gpe_context->indirect_state.bo,
1240+ I915_GEM_DOMAIN_SAMPLER,
1241+ 0, BASE_ADDRESS_MODIFY);
1242+ else
1243+ OUT_BATCH(batch, 0 | BASE_ADDRESS_MODIFY);
1244+
1245+ OUT_BATCH(batch, 0);
1246+
1247+ /*DW10. Instruct base address */
1248+ if (gpe_context->instruction_state.bo)
1249+ OUT_RELOC(batch, gpe_context->instruction_state.bo,
1250+ I915_GEM_DOMAIN_INSTRUCTION,
1251+ 0, BASE_ADDRESS_MODIFY);
1252+ else
1253+ OUT_BATCH(batch, 0 | BASE_ADDRESS_MODIFY);
1254+
1255+ OUT_BATCH(batch, 0);
1256+
1257+ /* DW12. Size limitation */
1258+ OUT_BATCH(batch, 0xFFFFF000 | BASE_ADDRESS_MODIFY); //General State Access Upper Bound
1259+ OUT_BATCH(batch, 0xFFFFF000 | BASE_ADDRESS_MODIFY); //Dynamic State Access Upper Bound
1260+ OUT_BATCH(batch, 0xFFFFF000 | BASE_ADDRESS_MODIFY); //Indirect Object Access Upper Bound
1261+ OUT_BATCH(batch, 0xFFFFF000 | BASE_ADDRESS_MODIFY); //Instruction Access Upper Bound
1262+
1263+ /* the bindless surface state address */
1264+ OUT_BATCH(batch, 0 | BASE_ADDRESS_MODIFY);
1265+ OUT_BATCH(batch, 0);
1266+ OUT_BATCH(batch, 0xFFFFF000);
1267+
1268+ ADVANCE_BATCH(batch);
1269+}
1270+
12101271 void
12111272 gen9_gpe_pipeline_setup(VADriverContextP ctx,
12121273 struct i965_gpe_context *gpe_context,
@@ -1215,7 +1276,7 @@ gen9_gpe_pipeline_setup(VADriverContextP ctx,
12151276 intel_batchbuffer_emit_mi_flush(batch);
12161277
12171278 i965_gpe_select(ctx, gpe_context, batch);
1218- gen8_gpe_state_base_address(ctx, gpe_context, batch);
1279+ gen9_gpe_state_base_address(ctx, gpe_context, batch);
12191280 gen8_gpe_vfe_state(ctx, gpe_context, batch);
12201281 gen8_gpe_curbe_load(ctx, gpe_context, batch);
12211282 gen8_gpe_idrt(ctx, gpe_context, batch);