Mesa (staging/19.2): st/nine: Properly initialize GLSL types for NIR shaders.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Sep 9 18:29:30 UTC 2019
Module: Mesa
Branch: staging/19.2
Commit: e4bb2ceb789e92da5af63959219ea13d57c1e71d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e4bb2ceb789e92da5af63959219ea13d57c1e71d
Author: Timur Kristóf <timur.kristof at gmail.com>
Date: Thu Aug 29 01:23:37 2019 +0200
st/nine: Properly initialize GLSL types for NIR shaders.
NIR shaders use GLSL types (note: these live outside libglsl), and
nine needs to properly initialize these just like the other state
trackers. This fixes an assertion failure when TTN is used.
Signed-off-by: Timur Kristóf <timur.kristof at gmail.com>
---
src/gallium/state_trackers/nine/device9.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c
index 6d29378a7bc..0e3333a257d 100644
--- a/src/gallium/state_trackers/nine/device9.c
+++ b/src/gallium/state_trackers/nine/device9.c
@@ -51,6 +51,7 @@
#include "util/u_surface.h"
#include "util/u_upload_mgr.h"
#include "hud/hud_context.h"
+#include "compiler/glsl_types.h"
#include "cso_cache/cso_context.h"
@@ -144,6 +145,9 @@ NineDevice9_ctor( struct NineDevice9 *This,
if (FAILED(hr)) { return hr; }
+ /* NIR shaders need to use GLSL types so let's initialize them here */
+ glsl_type_singleton_init_or_ref();
+
list_inithead(&This->update_buffers);
list_inithead(&This->update_textures);
list_inithead(&This->managed_buffers);
@@ -583,6 +587,7 @@ NineDevice9_dtor( struct NineDevice9 *This )
if (This->d3d9) { IDirect3D9_Release(This->d3d9); }
NineUnknown_dtor(&This->base);
+ glsl_type_singleton_decref();
}
struct pipe_screen *
More information about the mesa-commit
mailing list