Re: [fpc-pascal] Division by zero when running SDL program on GPU (NVIDIA)

2024-01-30 Thread Rafael Picanço via fpc-pascal
Thank you Hairy, I will try to ask on the SDL forums.

Best,
Rafael Picanço

On Tue, Jan 30, 2024 at 8:48 AM Hairy Pixels  wrote:

> I don't think this has anything to do with the compiler. You should
> probably ask on the SDL forums. They've been helpful for me before.
>
> > On Jan 30, 2024, at 6:45 PM, Rafael Picanço via fpc-pascal <
> fpc-pascal@lists.freepascal.org> wrote:
> >
> > Hi everyone, how are you doing?
> >
> > I am receiving an "FLT divide by zero" error when creating a renderer
> with
> >
> > // will default to Direct3d renderer
> > DL_CreateRenderer(FSDLWindow, -1,
> > // error
> > // SDL_RENDERER_ACCELERATED or SDL_RENDERER_PRESENTVSYNC
> > SDL_RENDERER_SOFTWARE
> > );
> >
> > So, my notebook have two GPUs, an on-board Intel and a discrete NVIDIA ,
> and the error happens only on NVIDIA.
> >
> > Here (https://forum.lazarus.freepascal.org/index.php/topic,66042.0.html)
> Jamie suggests that I may need to:
> >
> > Set8087CW($133f)
> >
> > and Tron suggests:
> >
> > SetExceptionMask
> >
> > Calling these functions during the OnCreate in the main form did not
> solve the problem.
> >
> > Can you shed some light on this?
> >
> > ___
> > fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> > https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
>
> Regards,
> Ryan Joseph
>
>
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Division by zero when running SDL program on GPU (NVIDIA)

2024-01-30 Thread Hairy Pixels via fpc-pascal
I don't think this has anything to do with the compiler. You should probably 
ask on the SDL forums. They've been helpful for me before.

> On Jan 30, 2024, at 6:45 PM, Rafael Picanço via fpc-pascal 
>  wrote:
> 
> Hi everyone, how are you doing?
> 
> I am receiving an "FLT divide by zero" error when creating a renderer with 
> 
> // will default to Direct3d renderer
> DL_CreateRenderer(FSDLWindow, -1,
> // error
> // SDL_RENDERER_ACCELERATED or SDL_RENDERER_PRESENTVSYNC
> SDL_RENDERER_SOFTWARE
> );
> 
> So, my notebook have two GPUs, an on-board Intel and a discrete NVIDIA , and 
> the error happens only on NVIDIA.
> 
> Here (https://forum.lazarus.freepascal.org/index.php/topic,66042.0.html) 
> Jamie suggests that I may need to:
> 
> Set8087CW($133f)
> 
> and Tron suggests:
> 
> SetExceptionMask
> 
> Calling these functions during the OnCreate in the main form did not solve 
> the problem.
> 
> Can you shed some light on this? 
> 
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Regards,
Ryan Joseph

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] Division by zero when running SDL program on GPU (NVIDIA)

2024-01-30 Thread Rafael Picanço via fpc-pascal
Hi everyone, how are you doing?

I am receiving an "FLT divide by zero" error when creating a renderer with

// will default to Direct3d renderer
DL_CreateRenderer(FSDLWindow, -1,
// error
// SDL_RENDERER_ACCELERATED or SDL_RENDERER_PRESENTVSYNC
SDL_RENDERER_SOFTWARE
);

So, my notebook have two GPUs, an on-board Intel and a discrete NVIDIA ,
and the error happens only on NVIDIA.

Here (https://forum.lazarus.freepascal.org/index.php/topic,66042.0.html)
Jamie suggests that I may need to:

Set8087CW($133f)

and Tron suggests:

SetExceptionMask

Calling these functions during the OnCreate in the main form did not
solve the problem.

Can you shed some light on this?
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal