From: Tim Rowley Date: Wed, 16 Mar 2016 23:54:04 +0000 (-0600) Subject: swr: [rasterizer jitter] signed immediate builder X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=257db3610a91a9355d8301b8fb6123346f9c1b07;p=mesa.git swr: [rasterizer jitter] signed immediate builder --- diff --git a/src/gallium/drivers/swr/rasterizer/jitter/builder_misc.cpp b/src/gallium/drivers/swr/rasterizer/jitter/builder_misc.cpp index 178f4c27c65..876fe83511e 100644 --- a/src/gallium/drivers/swr/rasterizer/jitter/builder_misc.cpp +++ b/src/gallium/drivers/swr/rasterizer/jitter/builder_misc.cpp @@ -259,6 +259,13 @@ uint32_t Builder::IMMED(Value* v) return pValConst->getZExtValue(); } +int32_t Builder::S_IMMED(Value* v) +{ + SWR_ASSERT(isa(v)); + ConstantInt *pValConst = cast(v); + return pValConst->getSExtValue(); +} + Value *Builder::GEP(Value* ptr, const std::initializer_list &indexList) { std::vector indices; diff --git a/src/gallium/drivers/swr/rasterizer/jitter/builder_misc.h b/src/gallium/drivers/swr/rasterizer/jitter/builder_misc.h index 18c30a2891f..4c9c431179f 100644 --- a/src/gallium/drivers/swr/rasterizer/jitter/builder_misc.h +++ b/src/gallium/drivers/swr/rasterizer/jitter/builder_misc.h @@ -67,6 +67,7 @@ Value *VRCP(Value *va); Value *VPLANEPS(Value* vA, Value* vB, Value* vC, Value* &vX, Value* &vY); uint32_t IMMED(Value* i); +int32_t S_IMMED(Value* i); Value *GEP(Value* ptr, const std::initializer_list &indexList); Value *GEP(Value* ptr, const std::initializer_list &indexList);