[Mesa-dev] [PATCH] nvc0: advertise 8 bits subpixel precision for viewport bounds

Józef Kucia joseph.kucia at gmail.com
Mon Aug 8 16:16:30 UTC 2016


Based on subpixel precision returned by the blob.

Signed-off-by: Józef Kucia <joseph.kucia at gmail.com>
---

I've checked that the blob returns 8 for the following GPUs:
GeForce GTX 460 (GF104), GeForce GTX 760 (GK104), GeForce GTX 970 (GM204).
Generally, I expect that 8 bits precision should be supported
by any D3D11-capable GPU.

---
 src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
index fb0a9c8..836ee23 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
@@ -156,6 +156,8 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
       return NOUVEAU_MIN_BUFFER_MAP_ALIGN;
    case PIPE_CAP_MAX_VIEWPORTS:
       return NVC0_MAX_VIEWPORTS;
+   case PIPE_CAP_VIEWPORT_SUBPIXEL_BITS:
+      return 8;
    case PIPE_CAP_MAX_TEXTURE_GATHER_COMPONENTS:
       return 4;
    case PIPE_CAP_TEXTURE_BORDER_COLOR_QUIRK:
@@ -272,7 +274,6 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_PCI_BUS:
    case PIPE_CAP_PCI_DEVICE:
    case PIPE_CAP_PCI_FUNCTION:
-   case PIPE_CAP_VIEWPORT_SUBPIXEL_BITS:
       return 0;
 
    case PIPE_CAP_VENDOR_ID:
-- 
2.7.3



More information about the mesa-dev mailing list