[Mesa-dev] [PATCH 33/39] st/nine: Add asserts for output/input packing
Axel Davy
axel.davy at ens.fr
Sun May 15 10:45:47 UTC 2016
Nine doesn't support vs output/ps input packing.
We haven't found any application requiring that,
and implementing it properly is complex.
Add asserts for now.
Signed-off-by: Axel Davy <axel.davy at ens.fr>
---
src/gallium/state_trackers/nine/nine_shader.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/gallium/state_trackers/nine/nine_shader.c b/src/gallium/state_trackers/nine/nine_shader.c
index a5f603b..eeafdf9 100644
--- a/src/gallium/state_trackers/nine/nine_shader.c
+++ b/src/gallium/state_trackers/nine/nine_shader.c
@@ -2040,6 +2040,7 @@ DECL_SPECIAL(DCL)
if (sem.usage == D3DDECLUSAGE_POSITIONT)
tx->info->position_t = TRUE;
assert(sem.reg.idx < Elements(tx->regs.o));
+ assert(ureg_dst_is_undef(tx->regs.o[sem.reg.idx]) && "Nine doesn't support yet packing");
tx->regs.o[sem.reg.idx] = ureg_DECL_output_masked(
ureg, tgsi.Name, tgsi.Index, sem.reg.mask, 0, 1);
@@ -2053,6 +2054,7 @@ DECL_SPECIAL(DCL)
unsigned interp_location = 0;
/* SM3 only, SM2 input semantic determined by file */
assert(sem.reg.idx < Elements(tx->regs.v));
+ assert(ureg_src_is_undef(tx->regs.v[sem.reg.idx]) && "Nine doesn't support yet packing");
/* PositionT and tessfactor forbidden */
if (sem.usage == D3DDECLUSAGE_POSITIONT || sem.usage == D3DDECLUSAGE_TESSFACTOR)
return D3DERR_INVALIDCALL;
@@ -3236,6 +3238,8 @@ tx_ctor(struct shader_translator *tx, struct nine_shader_info *info)
tx->regs.vFace = ureg_src_undef();
for (i = 0; i < Elements(tx->regs.o); ++i)
tx->regs.o[i] = ureg_dst_undef();
+ for (i = 0; i < Elements(tx->regs.v); ++i)
+ tx->regs.v[i] = ureg_src_undef();
for (i = 0; i < Elements(tx->regs.oCol); ++i)
tx->regs.oCol[i] = ureg_dst_undef();
for (i = 0; i < Elements(tx->regs.vC); ++i)
--
2.8.2
More information about the mesa-dev
mailing list