<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Jan 24, 2018, at 11:43 AM, Emil Velikov <<a href="mailto:emil.l.velikov@gmail.com" class="">emil.l.velikov@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">On
24 January 2018 at 15:30, George Kyriazis <</span><a href="mailto:george.kyriazis@intel.com" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">george.kyriazis@intel.com</a><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">>
wrote:</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">
LLVM 3.9 was not taken into in initial check-in.<br class="">
<br class="">
Fixes: 01ab218bbc ("swr/rast: Initial work for debugging support.")<br class="">
cc: <a href="mailto:mesa-stable@lists.freedesktop.org" class="">mesa-stable@lists.freedesktop.org</a><br class="">
---<br class="">
src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp | 14 ++++++++++++++<br class="">
1 file changed, 14 insertions(+)<br class="">
<br class="">
diff --git a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp<br class="">
index 93e3240..1e954f6 100644<br class="">
--- a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp<br class="">
+++ b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp<br class="">
@@ -249,9 +249,15 @@ DIType* JitManager::GetDebugType(Type* pTy)<br class="">
switch (id)<br class="">
{<br class="">
case Type::VoidTyID: return builder.createUnspecifiedType("void"); break;<br class="">
+#if LLVM_VERSION_MAJOR >= 4<br class="">
case Type::HalfTyID: return builder.createBasicType("float16", 16, dwarf::DW_ATE_float); break;<br class="">
case Type::FloatTyID: return builder.createBasicType("float", 32, dwarf::DW_ATE_float); break;<br class="">
case Type::DoubleTyID: return builder.createBasicType("double", 64, dwarf::DW_ATE_float); break;<br class="">
+#else<br class="">
+ case Type::HalfTyID: return builder.createBasicType("float16", 16, 16, dwarf::DW_ATE_float); break;<br class="">
+ case Type::FloatTyID: return builder.createBasicType("float", 32, 32, dwarf::DW_ATE_float); break;<br class="">
+ case Type::DoubleTyID: return builder.createBasicType("double", 64, 64, dwarf::DW_ATE_float); break;<br class="">
+#endif<br class="">
case Type::IntegerTyID: return GetDebugIntegerType(pTy); break;<br class="">
case Type::StructTyID: return GetDebugStructType(pTy); break;<br class="">
case Type::ArrayTyID: return GetDebugArrayType(pTy); break;<br class="">
@@ -288,11 +294,19 @@ DIType* JitManager::GetDebugIntegerType(Type* pTy)<br class="">
IntegerType* pIntTy = cast<IntegerType>(pTy);<br class="">
switch (pIntTy->getBitWidth())<br class="">
{<br class="">
+#if LLVM_VERSION_MAJOR >= 4<br class="">
case 1: return builder.createBasicType("int1", 1, dwarf::DW_ATE_unsigned); break;<br class="">
case 8: return builder.createBasicType("int8", 8, dwarf::DW_ATE_signed); break;<br class="">
case 16: return builder.createBasicType("int16", 16, dwarf::DW_ATE_signed); break;<br class="">
case 32: return builder.createBasicType("int", 32, dwarf::DW_ATE_signed); break;<br class="">
case 64: return builder.createBasicType("int64", 64, dwarf::DW_ATE_signed); break;<br class="">
+#else<br class="">
+ case 1: return builder.createBasicType("int1", 1, 8, dwarf::DW_ATE_unsigned); break;<br class="">
+ case 8: return builder.createBasicType("int8", 8, 8, dwarf::DW_ATE_signed); break;<br class="">
+ case 16: return builder.createBasicType("int16", 16, 16, dwarf::DW_ATE_signed); break;<br class="">
+ case 32: return builder.createBasicType("int", 32, 32, dwarf::DW_ATE_signed); break;<br class="">
+ case 64: return builder.createBasicType("int64", 64, 64, dwarf::DW_ATE_signed); break;<br class="">
+#endif<br class="">
</blockquote>
<br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Please
mention in the commit message why we're not using zero for</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">AlignInBits
as in the LLVM patch [1]. With that:</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
</div>
</blockquote>
<div>You are right, alignment could be 0. I can do a v2 with alignment set to 0.</div>
<br class="">
<blockquote type="cite" class="">
<div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Bugzilla:<span class="Apple-converted-space"> </span></span><a href="https://bugs.freedesktop.org/show_bug.cgi?id=104749" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">https://bugs.freedesktop.org/show_bug.cgi?id=104749</a><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Acked-by:
Emil Velikov <</span><a href="mailto:emil.velikov@collabora.com" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">emil.velikov@collabora.com</a><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">></span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Thanks</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Emil</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">[1]<span class="Apple-converted-space"> </span></span><a href="https://github.com/llvm-mirror/llvm/commit/e69c459a6e9756ca1ff3acb1dcfc434843aee80f#diff-71a247a97ac2b40bf8d9d8d64460f6f9" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">https://github.com/llvm-mirror/llvm/commit/e69c459a6e9756ca1ff3acb1dcfc434843aee80f#diff-71a247a97ac2b40bf8d9d8d64460f6f9</a></div>
</blockquote>
</div>
<br class="">
</body>
</html>