summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Barbieri <luca@luca-barbieri.com>2010-09-21 16:00:45 +0200
committerLuca Barbieri <luca@luca-barbieri.com>2010-09-21 16:01:26 +0200
commitbb26272beaf1d2bddffaad5341235e70abcf483b (patch)
tree9476a94ebe9afa6653571aa1c9d992792011cf6a
parentf815b57b888d00228dcb355cbd34ed0f4c44a620 (diff)
d3d1x: actually enable and fix blob apis
-rw-r--r--src/gallium/state_trackers/d3d1x/d3d1xstutil/include/d3d1xstutil.h3
-rw-r--r--src/gallium/state_trackers/d3d1x/gd3d11/d3d11_misc.h10
2 files changed, 7 insertions, 6 deletions
diff --git a/src/gallium/state_trackers/d3d1x/d3d1xstutil/include/d3d1xstutil.h b/src/gallium/state_trackers/d3d1x/d3d1xstutil/include/d3d1xstutil.h
index 47bf842b7b..f79cc72a5d 100644
--- a/src/gallium/state_trackers/d3d1x/d3d1xstutil/include/d3d1xstutil.h
+++ b/src/gallium/state_trackers/d3d1x/d3d1xstutil/include/d3d1xstutil.h
@@ -1049,6 +1049,7 @@ class GalliumD3DBlob : public GalliumComObject<ID3DBlob>
void* data;
size_t size;
+public:
GalliumD3DBlob(void* data, size_t size)
: data(data), size(size)
{}
@@ -1057,7 +1058,7 @@ class GalliumD3DBlob : public GalliumComObject<ID3DBlob>
{
free(data);
}
-public:
+
virtual LPVOID STDMETHODCALLTYPE GetBufferPointer()
{
return data;
diff --git a/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_misc.h b/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_misc.h
index 239a5bb98c..39e41f19e5 100644
--- a/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_misc.h
+++ b/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_misc.h
@@ -1,4 +1,4 @@
-#if API < 10
+#if API < 11
HRESULT D3D10CreateBlob(
__in SIZE_T NumBytes,
__out LPD3D10BLOB *ppBuffer
@@ -37,7 +37,7 @@ static HRESULT dxbc_assemble_as_blob(struct dxbc_chunk_header** chunks, unsigned
std::pair<void*, size_t> p = dxbc_assemble(chunks, num_chunks);
if(!p.first)
return E_OUTOFMEMORY;
- *blob = return new GalliumD3DBlob(p.first, p.second);
+ *blob = new GalliumD3DBlob(p.first, p.second);
return S_OK;
}
@@ -51,7 +51,7 @@ HRESULT D3D10GetInputSignatureBlob(
if(!sig)
return E_FAIL;
- return dxbc_assemble_as_blob(&sig, 1, ppSignatureBlob);
+ return dxbc_assemble_as_blob((dxbc_chunk_header**)&sig, 1, ppSignatureBlob);
}
HRESULT D3D10GetOutputSignatureBlob(
@@ -64,7 +64,7 @@ HRESULT D3D10GetOutputSignatureBlob(
if(!sig)
return E_FAIL;
- return dxbc_assemble_as_blob(&sig, 1, ppSignatureBlob);
+ return dxbc_assemble_as_blob((dxbc_chunk_header**)&sig, 1, ppSignatureBlob);
}
HRESULT D3D10GetInputOutputSignatureBlob(
@@ -81,7 +81,7 @@ HRESULT D3D10GetInputOutputSignatureBlob(
if(!sigs[1])
return E_FAIL;
- return dxbc_assemble_as_blob(&sigs, 2, ppSignatureBlob);
+ return dxbc_assemble_as_blob((dxbc_chunk_header**)&sigs, 2, ppSignatureBlob);
}
#endif