Home   Forum

Welcome to the Apollo Forum

This forum is for people interested in the APOLLO CPU.
Please read the forum usage manual.
VISIT APOLLO IRC CHANNEL



All TopicsNewsPerformanceGamesApolloVampireReleases
Performance and Benchmark Results!

OpenGL On Vampire Cardspage  1 2 3 4 

Asaf Ayoub

Posts 8
18 Mar 2017 22:47



Maybe a command similar to Cuda Lop3 could help.

8.7.7.6. Logic and Shift Instructions: lop3

Compute logical operation on inputs a, b, c and stores result in destination d.

http://docs.nvidia.com/cuda/parallel-thread-execution/index.html#axzz4bihuGGFT



Thellier Alain

Posts 8
20 Mar 2017 14:01


@Gunnar

I dont have the time to go IRC just to found some informations

Note: we can also use fixed size 16.16  for clipping: I have just implemented it yesterday in my PatchCompositeTags program and it works fine
Here it is the code for cutting a segment A---B between two points  at a given limit to a new point P using integers only

A-------|-------------B
        limit

result is

A-------P

(This dont include the test poly (in/out screen) nor the full clipping code that every GL implementation already have)

#define CUT(val)    P->val= A->val + (ratio*((B->val - A->val)>>16) );
#define RATIO(val)  ratio=(limit - A->val) / ((B->val - A->val)>>16); P->val=limit;
/*==================================================================*/
inline void ClipX(struct Point3D *P,struct Point3D *A,struct Point3D *B,LONG limit)
{
register LONG ratio;

  RATIO(x)
  CUT(y)
  CUT(z)
  CUT(u)
  CUT(v)
  CUT(w)
}
/*==================================================================*/
inline void ClipY(struct Point3D *P,struct Point3D *A,struct Point3D *B,LONG limit)
{
register LONG ratio;

  RATIO(y)
  CUT(x)
  CUT(z)
  CUT(u)
  CUT(v)
  CUT(w)
}
/*==================================================================*/
inline void ClipZ(struct Point3D *P,struct Point3D *A,struct Point3D *B,LONG limit)
{
register LONG ratio;

  RATIO(z)
  CUT(x)
  CUT(y)
  CUT(u)
  CUT(v)
  CUT(w)
}
/*==================================================================*/



posts 62page  1 2 3 4