On 10/28/20 13:30, Michel Dänzer wrote:
> On 2020-10-28 11:09 a.m., Paul Gofman wrote:
>> On 10/28/20 11:18, Pekka Paalanen wrote:
>>>
+static unsigned log2_int(unsigned x)
+{
+ unsigned l;
+
+ if (x < 2) {
+ return 0;
+ }
+ for (l = 2; ;
On 2020-10-28 11:09 a.m., Paul Gofman wrote:
On 10/28/20 11:18, Pekka Paalanen wrote:
+static unsigned log2_int(unsigned x)
+{
+unsigned l;
+
+if (x < 2) {
+return 0;
+}
+for (l = 2; ; l++) {
+if ((unsigned)(1 << l) > x) {
Hi,
wouldn't this loop fail to end
On 10/28/20 11:18, Pekka Paalanen wrote:
>
>>
>> +static unsigned log2_int(unsigned x)
>> +{
>> +unsigned l;
>> +
>> +if (x < 2) {
>> +return 0;
>> +}
>> +for (l = 2; ; l++) {
>> +if ((unsigned)(1 << l) > x) {
> Hi,
>
> wouldn't this loop fail to end when x >= 0x80
On Mon, 26 Oct 2020 16:11:20 +0300
Paul Gofman wrote:
> log() is affected by FP control word and can provide inaccurate result.
>
> Fixes Killer Instinct under Wine not being able to find AMD vulkan
> device.
>
> Signed-off-by: Paul Gofman
> ---
> With the rounding mode the application set
I've applied this to libdrm master.
Thanks,
Dave.
On Mon, 26 Oct 2020 at 23:27, Paul Gofman wrote:
>
> log() is affected by FP control word and can provide inaccurate result.
>
> Fixes Killer Instinct under Wine not being able to find AMD vulkan
> device.
>
> Signed-off-by: Paul Gofman
> ---
>
log() is affected by FP control word and can provide inaccurate result.
Fixes Killer Instinct under Wine not being able to find AMD vulkan
device.
Signed-off-by: Paul Gofman
---
With the rounding mode the application sets (unsigned int)log2(4) is 1.
The log2_int() implemetation is copied