[gtk+/wip/otte/shader: 183/200] gskspv: Implement writing constructor functions
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/otte/shader: 183/200] gskspv: Implement writing constructor functions
- Date: Mon, 16 Oct 2017 23:15:20 +0000 (UTC)
commit 9a554a8fcdcc9295188e8cca616adc961fb92e45
Author: Benjamin Otte <otte redhat com>
Date: Wed Oct 11 16:55:38 2017 +0200
gskspv: Implement writing constructor functions
Calling a constructor is a simple OpConstantComposite call. Who'd have
thought.
gsk/gskslfunction.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/gsk/gskslfunction.c b/gsk/gskslfunction.c
index a94b7e6..122e810 100644
--- a/gsk/gskslfunction.c
+++ b/gsk/gskslfunction.c
@@ -162,9 +162,12 @@ gsk_sl_function_constructor_write_call_spv (GskSlFunction *function,
GskSpvWriter *writer,
guint32 *arguments)
{
- g_assert_not_reached ();
+ const GskSlFunctionConstructor *constructor = (const GskSlFunctionConstructor *) function;
- return 0;
+ return gsk_spv_writer_composite_construct (writer,
+ constructor->type,
+ arguments,
+ gsk_sl_type_get_n_members (constructor->type));
}
static const GskSlFunctionClass GSK_SL_FUNCTION_CONSTRUCTOR = {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]