summaryrefslogtreecommitdiff
path: root/lib/mesa/src/gallium/winsys/sw
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2024-04-02 09:30:07 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2024-04-02 09:30:07 +0000
commitf54e142455cb3c9d1662dae7e096a32a47e5409b (patch)
tree440ecd46269f0eac25e349e1ed58f246490c5e26 /lib/mesa/src/gallium/winsys/sw
parent36d8503c27530f68d655d3ef77a6eaa4dfd8ad65 (diff)
Import Mesa 23.3.6
Diffstat (limited to 'lib/mesa/src/gallium/winsys/sw')
-rw-r--r--lib/mesa/src/gallium/winsys/sw/gdi/gdi_sw_winsys.c33
-rw-r--r--lib/mesa/src/gallium/winsys/sw/gdi/gdi_sw_winsys.h2
-rw-r--r--lib/mesa/src/gallium/winsys/sw/hgl/hgl_sw_winsys.cpp2
-rw-r--r--lib/mesa/src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c2
4 files changed, 23 insertions, 16 deletions
diff --git a/lib/mesa/src/gallium/winsys/sw/gdi/gdi_sw_winsys.c b/lib/mesa/src/gallium/winsys/sw/gdi/gdi_sw_winsys.c
index 7077862d4..34f424ff5 100644
--- a/lib/mesa/src/gallium/winsys/sw/gdi/gdi_sw_winsys.c
+++ b/lib/mesa/src/gallium/winsys/sw/gdi/gdi_sw_winsys.c
@@ -58,7 +58,7 @@ struct gdi_sw_displaytarget
void *data;
- BITMAPINFO bmi;
+ BITMAPV5HEADER bmi;
};
@@ -150,17 +150,24 @@ gdi_sw_displaytarget_create(struct sw_winsys *winsys,
if(!gdt->data)
goto no_data;
- gdt->bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
- gdt->bmi.bmiHeader.biWidth = gdt->stride / cpp;
- gdt->bmi.bmiHeader.biHeight= -(long)height;
- gdt->bmi.bmiHeader.biPlanes = 1;
- gdt->bmi.bmiHeader.biBitCount = bpp;
- gdt->bmi.bmiHeader.biCompression = BI_RGB;
- gdt->bmi.bmiHeader.biSizeImage = 0;
- gdt->bmi.bmiHeader.biXPelsPerMeter = 0;
- gdt->bmi.bmiHeader.biYPelsPerMeter = 0;
- gdt->bmi.bmiHeader.biClrUsed = 0;
- gdt->bmi.bmiHeader.biClrImportant = 0;
+ gdt->bmi.bV5Size = sizeof(BITMAPV5HEADER);
+ gdt->bmi.bV5Width = gdt->stride / cpp;
+ gdt->bmi.bV5Height = -(long)height;
+ gdt->bmi.bV5Planes = 1;
+ gdt->bmi.bV5BitCount = bpp;
+ gdt->bmi.bV5Compression = BI_RGB;
+ gdt->bmi.bV5SizeImage = 0;
+ gdt->bmi.bV5XPelsPerMeter = 0;
+ gdt->bmi.bV5YPelsPerMeter = 0;
+ gdt->bmi.bV5ClrUsed = 0;
+ gdt->bmi.bV5ClrImportant = 0;
+
+ if (format == PIPE_FORMAT_B5G6R5_UNORM) {
+ gdt->bmi.bV5Compression = BI_BITFIELDS;
+ gdt->bmi.bV5RedMask = 0xF800;
+ gdt->bmi.bV5GreenMask = 0x07E0;
+ gdt->bmi.bV5BlueMask = 0x001F;
+ }
*stride = gdt->stride;
return (struct sw_displaytarget *)gdt;
@@ -203,7 +210,7 @@ gdi_sw_display( struct sw_winsys *winsys,
StretchDIBits(hDC,
0, 0, gdt->width, gdt->height,
0, 0, gdt->width, gdt->height,
- gdt->data, &gdt->bmi, 0, SRCCOPY);
+ gdt->data, (BITMAPINFO *)&gdt->bmi, 0, SRCCOPY);
}
static void
diff --git a/lib/mesa/src/gallium/winsys/sw/gdi/gdi_sw_winsys.h b/lib/mesa/src/gallium/winsys/sw/gdi/gdi_sw_winsys.h
index c882b1d8d..1fc1d9bcd 100644
--- a/lib/mesa/src/gallium/winsys/sw/gdi/gdi_sw_winsys.h
+++ b/lib/mesa/src/gallium/winsys/sw/gdi/gdi_sw_winsys.h
@@ -3,7 +3,7 @@
#include <windows.h>
-#include "pipe/p_compiler.h"
+#include "util/compiler.h"
#include "frontend/sw_winsys.h"
void gdi_sw_display( struct sw_winsys *winsys,
diff --git a/lib/mesa/src/gallium/winsys/sw/hgl/hgl_sw_winsys.cpp b/lib/mesa/src/gallium/winsys/sw/hgl/hgl_sw_winsys.cpp
index f0f772d45..2bc1b972f 100644
--- a/lib/mesa/src/gallium/winsys/sw/hgl/hgl_sw_winsys.cpp
+++ b/lib/mesa/src/gallium/winsys/sw/hgl/hgl_sw_winsys.cpp
@@ -27,7 +27,7 @@
#include <stdio.h>
-#include "pipe/p_compiler.h"
+#include "util/compiler.h"
#include "pipe/p_defines.h"
#include "util/format/u_formats.h"
#include "util/u_inlines.h"
diff --git a/lib/mesa/src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c b/lib/mesa/src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c
index 5761c0e10..206ec9090 100644
--- a/lib/mesa/src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c
+++ b/lib/mesa/src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c
@@ -42,7 +42,7 @@
#include <fcntl.h>
#include <xf86drm.h>
-#include "pipe/p_compiler.h"
+#include "util/compiler.h"
#include "util/format/u_formats.h"
#include "pipe/p_state.h"
#include "util/u_inlines.h"