<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@MS Mincho";}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.E-MailFormatvorlage18
        {mso-style-type:personal-reply;
        font-family:"Calibri","serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 color="#1f497d" face=Calibri><span
style='font-size:11.0pt;font-family:"Calibri","serif";color:#1F497D'>I have a
mostly finished assembler, and a HLSL compiler in the works. I have a git tree
out there which has the patches, but the server is currently shut down. I'm
currently away from home, but I'll return tomorrow. If I forget to reply, can
you remind me in a few days?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color="#1f497d" face=Calibri><span
style='font-size:11.0pt;font-family:"Calibri","serif";color:#1F497D'><o:p>&nbsp;</o:p></span></font></p>

<div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'>

<div>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>

<p class=MsoNormal><b><font size=2 face=Tahoma><span lang=DE style='font-size:
10.0pt;font-family:"Tahoma","sans-serif";font-weight:bold'>From:</span></font></b><font
size=2 face=Tahoma><span lang=DE style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
wine-devel-bounces@winehq.org [mailto:wine-devel-bounces@winehq.org] <b><span
style='font-weight:bold'>On Behalf Of </span></b>Kjell Rune Skaaraas<br>
<b><span style='font-weight:bold'>Sent:</span></b> Thursday, October 02, 2008
1:57 PM<br>
<b><span style='font-weight:bold'>To:</span></b> wine-devel@winehq.org<br>
<b><span style='font-weight:bold'>Subject:</span></b> D3DXAssembleShader,
unknown texture formats and misc<o:p></o:p></span></font></p>

</div>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0>
 <tr>
  <td valign=top style='padding:0in 0in 0in 0in'>
  <p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>Hello,<o:p></o:p></span></font></p>
  <p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>I'm
  taking a stab at implmenting D3DXAssembleShader, which takes shader
  instructions like &quot;mul r1, r2.xy, r3.z&quot; and turns them into binary
  code (one-to-one mapping). Although I've got very little clue what I'm really
  doing, I've come quite a way on a parser that breaks it down into the
  separate parts and made some reverse lookups on tables of opcodes, registrys,
  masks etc. that I found in the wine code. I've basicly come so far that I got
  the parts like mul = 0x00000005, r = temp registry = 0x00000000, register
  number = 0x00000001, writemask = 0x000F0000 etc. for all the arguments, but
  I'm struggling a bit putting it all together into the correct binary format.
  I have found a lot of material on the *text* format of the shader
  instructions, but pretty much none on the binary format. Clearly some
  documentation must have been used/made when you implemented glsl and the
  other shader backends as they read this stuff and translates it to OpenGL
  calls. Does anyone have anything they could share with me? <o:p></o:p></span></font></p>
  <p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>P.S.
  Don't expect too much of me though, 1) It's so ugly it makes grown men cry,
  2) Current it leaks memory bigtime and 3) It's a text hack that will never
  validate shader code or anything like that BUT I think I can make this work
  for code that already works.<o:p></o:p></span></font></p>
  <p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>On a different
  note, a game I have is pulling up two completely unknown texture formats R16
  and AL16 as fourcc. I figured I could at least find out something about them
  and add them to the debug tables, but the only references I find on google
  are to wine and wine bug reports. I figure they may be related to R16F (same
  with ints?) and L16 (luminosity, so AL16 with alpha?) but I can't find
  anything on them.<o:p></o:p></span></font></p>
  <p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>Oh yeah
  and for the misc question - where's the right place to add test code? I
  expect my&nbsp;D3DXAssembleShader function will need a lot of it - at least
  one for each opcode, registry tests, write mask tests,&nbsp;whitespace and
  commenting tests+++. No code for you to review yet, not until it works. THEN
  you can bring out the tar and feathers over the code. <o:p></o:p></span></font></p>
  <p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>Regards,<o:p></o:p></span></font></p>
  <p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>Kjell
  Rune<o:p></o:p></span></font></p>
  </td>
 </tr>
</table>

<p class=MsoNormal><font size=2 face=Calibri><span style='font-size:10.0pt;
font-family:"Calibri","serif"'><o:p>&nbsp;</o:p></span></font></p>

<div class=MsoNormal align=center style='text-align:center'><font size=2
face=Calibri><span style='font-size:10.0pt;font-family:"Calibri","serif"'>

<hr size=1 width="100%" align=center>

</span></font></div>

<p class=MsoNormal><font size=2 face=Calibri><span style='font-size:10.0pt;
font-family:"Calibri","serif"'><o:p>&nbsp;</o:p></span></font></p>

<table class=MsoNormalTable border=0 cellpadding=0>
 <tr>
  <td style='padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><font size=3 face="Times New Roman"><span
  style='font-size:12.0pt'>Alt i ett. Få <a href="http://no.mail.yahoo.com">Yahoo!
  Mail</a> med adressekartotek, kalender og notisblokk.<o:p></o:p></span></font></p>
  </td>
 </tr>
</table>

<p class=MsoNormal><font size=2 face=Calibri><span style='font-size:10.0pt;
font-family:"Calibri","serif"'><o:p>&nbsp;</o:p></span></font></p>

</div>

</div>

</body>

</html>