From 89c0d32b458aa467987a42f2c634900729b4df36 Mon Sep 17 00:00:00 2001 From: michal Date: Wed, 22 Aug 2007 17:21:02 +0100 Subject: [PATCH] First pass on tgsi deco. --- src/mesa/pipe/tgsi/deco/deco_caps.c | 10 +++ src/mesa/pipe/tgsi/deco/deco_caps.h | 97 +++++++++++++++++++++++++++++ 2 files changed, 107 insertions(+) create mode 100644 src/mesa/pipe/tgsi/deco/deco_caps.c diff --git a/src/mesa/pipe/tgsi/deco/deco_caps.c b/src/mesa/pipe/tgsi/deco/deco_caps.c new file mode 100644 index 00000000000..66df05a14b8 --- /dev/null +++ b/src/mesa/pipe/tgsi/deco/deco_caps.c @@ -0,0 +1,10 @@ +#include "tgsi_platform.h" +#include "tgsi_deco.h" + +void +tgsi_deco_caps_init( + struct tgsi_deco_caps *caps ) +{ + memset( caps, 0, sizeof( *caps ) ); +} + diff --git a/src/mesa/pipe/tgsi/deco/deco_caps.h b/src/mesa/pipe/tgsi/deco/deco_caps.h index b3a40b03d8a..40ca1c96f37 100644 --- a/src/mesa/pipe/tgsi/deco/deco_caps.h +++ b/src/mesa/pipe/tgsi/deco/deco_caps.h @@ -5,7 +5,104 @@ extern "C" { #endif // defined __cplusplus +struct tgsi_deco_caps +{ + /* + * Predicates (D3D9-specific). + * + * Constraints: + * 1. Token tgsi_dst_register_ext_predicate must not be used. + * 2. Token tgsi_instruction_ext_predicate must not be used. + */ + unsigned Predicates : 1; + /* + * Destination register post-modulate. + * + * Constraints: + * 1. Field tgsi_dst_register_ext_modulate::Modulate + * must be set to TGSI_MODULATE_1X. + */ + unsigned DstModulate : 1; + + /* + * Condition codes (NVIDIA-specific). + * + * Constraints: + * 1. Token tgsi_dst_register_ext_concode must not be used. + * 2. Field tgsi_instruction_ext_nv::CondDstUpdate must be set to FALSE. + * 3. Field tgsi_instruction_ext_nv::CondFlowEnable must be set to FALSE. + */ + unsigned ConCodes : 1; + + /* + * Source register invert. + * + * Constraints: + * 1. Field tgsi_src_register_ext_mod::Complement must be set to FALSE. + */ + unsigned SrcInvert : 1; + + /* + * Source register bias. + * + * Constraints: + * 1. Field tgsi_src_register_ext_mod::Bias must be set to FALSE. + */ + unsigned SrcBias : 1; + + /* + * Source register scale by 2. + * + * Constraints: + * 1. Field tgsi_src_register_ext_mod::Scale2X must be set to FALSE. + */ + unsigned SrcScale : 1; + + /* + * Source register absolute. + * + * Constraints: + * 1. Field tgsi_src_register_ext_mod::Absolute must be set to FALSE. + */ + unsigned SrcAbsolute : 1; + + /* + * Source register force sign. + * + * Constraints: + * 1. Fields tgsi_src_register_ext_mod::Absolute and + * tgsi_src_register_ext_mod::Negate must not be both set to TRUE + * at the same time. + */ + unsigned SrcForceSign : 1; + + /* + * Source register divide. + * + * Constraints: + * 1. Field tgsi_src_register_ext_swz::ExtDivide + * must be set to TGSI_EXTSWIZZLE_ONE. + */ + unsigned SrcDivide : 1; + + /* + * Source register extended swizzle. + * + * Constraints: + * 1. Field tgsi_src_register_ext_swz::ExtSwizzleX/Y/Z/W + * must be set to TGSI_EXTSWIZZLE_X/Y/Z/W. + * 2. Fields tgsi_src_register_ext_swz::NegateX/Y/Z/W + * must all be set to the same value. + */ + unsigned SrcExtSwizzle : 1; + + unsigned Padding : 22; +}; + +void +tgsi_deco_caps_init( + struct tgsi_deco_caps *caps ); #if defined __cplusplus } // extern "C" -- 2.30.2