From 257db3610a91a9355d8301b8fb6123346f9c1b07 Mon Sep 17 00:00:00 2001 From: Tim Rowley Date: Wed, 16 Mar 2016 17:54:04 -0600 Subject: swr: [rasterizer jitter] signed immediate builder --- src/gallium/drivers/swr/rasterizer/jitter/builder_misc.cpp | 7 +++++++ src/gallium/drivers/swr/rasterizer/jitter/builder_misc.h | 1 + 2 files changed, 8 insertions(+) (limited to 'src') 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); -- cgit v1.2.3