Skip to content
Permalink
Browse files
Flag more registers as scalar. Fixes use of dcl_fog, oPts and oFog re…
…gisters.
  • Loading branch information
icculus committed Apr 13, 2012
1 parent b4e8c75 commit 234406f21282f35c8f7f45bc08a8eb1c5aa172d4

File 2 of 2 in 234406f

@@ -399,13 +399,20 @@ typedef struct
RegisterType regtype;
} DestArgInfo;

// NOTE: This will NOT know a dcl_psize output register should be scalar!
// This function doesn't have access to that information.
// NOTE: This will NOT know a dcl_psize or dcl_fog output register should be
// scalar! This function doesn't have access to that information.
static inline int scalar_register(const MOJOSHADER_shaderType shader_type,
const RegisterType regtype, const int regnum)
{
switch (regtype)
{
case REG_TYPE_RASTOUT:
if (((const RastOutType) regnum) == RASTOUT_TYPE_FOG)
return 1;
else if (((const RastOutType) regnum) == RASTOUT_TYPE_POINT_SIZE)
return 1;
return 0;

case REG_TYPE_DEPTHOUT:
case REG_TYPE_CONSTBOOL:
case REG_TYPE_LOOP:

0 comments on commit 234406f

Please sign in to comment.