Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GLSL: get GLSL limping in render-test #2

Merged
merged 1 commit into from
Jun 12, 2017

Conversation

tangent-vector
Copy link
Contributor

The test case that is there right now is nominally a cross-compilation test, but for right now it uses the preprocessor to present completely different code for HLSL and GLSL compilation.

This change is really just fleshing out the OpenGL side of render-test enough that it can produce images using OpenGL to enable further testing.

The test case that is there right now is nominally a cross-compilation test, but for right now it uses the preprocessor to present completely different code for HLSL and GLSL compilation.

This change is really just fleshing out the OpenGL side of `render-test` enough that it can produce images using OpenGL to enable further testing.
@tangent-vector tangent-vector merged commit d1f11a2 into shader-slang:master Jun 12, 2017
tangent-vector added a commit to tangent-vector/slang that referenced this pull request May 2, 2018
This change adds support for specifying explicit register spaces, like:

```hlsl
// Bind to texture register shader-slang#2 in space shader-slang#1
Texture2D t : register(t2, space1);
```

I added a test case to confirm that the register space is properly propagated through the Slang reflection API.

This change also adds proper error messages for some error/unsupported cases that weren't being diagnosed:

* Specifying a completely bogus register "class" (e.g., `register(bad99)`)
* Failing to specify a register index (`register(u)`)
* Specifying a component mask (`register(t0.x)`)
* Using `packoffset` bindings

I added test cases to cover all of these, as well as the new errors around support for register `space` bindings.

In order to get the existing tests to pass, I had to remove explicit `packoffset` bindings from some DXSDK test shaders.
None of these `packoffset` bindings were semantically significant (they matched what the compiler would do anyway, for both Slang and the standard HLSL compiler). Removing them is required for Slang now that we give an explicit error about our lack of `packoffset` support.
In a future change we might add logic to either detect semantically insignificant `packoffset`s, or to just go ahead and support them properly (as a general feature on `struct` types).
tangent-vector pushed a commit that referenced this pull request May 2, 2018
This change adds support for specifying explicit register spaces, like:

```hlsl
// Bind to texture register #2 in space #1
Texture2D t : register(t2, space1);
```

I added a test case to confirm that the register space is properly propagated through the Slang reflection API.

This change also adds proper error messages for some error/unsupported cases that weren't being diagnosed:

* Specifying a completely bogus register "class" (e.g., `register(bad99)`)
* Failing to specify a register index (`register(u)`)
* Specifying a component mask (`register(t0.x)`)
* Using `packoffset` bindings

I added test cases to cover all of these, as well as the new errors around support for register `space` bindings.

In order to get the existing tests to pass, I had to remove explicit `packoffset` bindings from some DXSDK test shaders.
None of these `packoffset` bindings were semantically significant (they matched what the compiler would do anyway, for both Slang and the standard HLSL compiler). Removing them is required for Slang now that we give an explicit error about our lack of `packoffset` support.
In a future change we might add logic to either detect semantically insignificant `packoffset`s, or to just go ahead and support them properly (as a general feature on `struct` types).
Checkmate50 added a commit to Checkmate50/slang that referenced this pull request Aug 13, 2020
# This is the 1st commit message:

GPU Foreach Loop

This PR introduces the completed GPU foreach loop and updates the
heterogeneous-hello-world example to use it.  This PR builds on the
previous introduction of the GPU Foreach loop parsing and semantic
checking PR (shader-slang#1482) by introducing IR lowering and emmitting.  THe new
feature can be used by having a GPU_Foreach loop interacting with a
named non-CPP entry point, and using the -heterogeneous flag.

# The commit message shader-slang#2 will be skipped:

# Fixed a merge issue
Checkmate50 added a commit to Checkmate50/slang that referenced this pull request Aug 13, 2020
# This is the 1st commit message:

GPU Foreach Loop

This PR introduces the completed GPU foreach loop and updates the
heterogeneous-hello-world example to use it.  This PR builds on the
previous introduction of the GPU Foreach loop parsing and semantic
checking PR (shader-slang#1482) by introducing IR lowering and emmitting.  THe new
feature can be used by having a GPU_Foreach loop interacting with a
named non-CPP entry point, and using the -heterogeneous flag.

# The commit message shader-slang#2 will be skipped:

# Fixed a merge issue

# The commit message shader-slang#3 will be skipped:

# GPU Foreach Parsing and Checking
#
# This PR introduces parsing and semantic checking for a GPU foreach loop
# for heterogeneouis programming.  A GPU foreach loop takes the form:
# ```
# __GPU_FOREACH(renderer, gridDims, LAMBDA(uint3 dispatchThreadID) {
#         kernelCall(args, ...); });
# ```
# And will allow the host code to call into a kernel with the correct
# renderer and grid dimensions.  This commit also introduces a hack to
# unify types in the heterogeneous hello world file, while will hopefully
# be amended in the future.

# The commit message shader-slang#4 will be skipped:

# Removed some things causing warnings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant