Skip to content

Commit

Permalink
Use underscore
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-Cena committed Oct 27, 2024
1 parent 7b18a33 commit 3882709
Show file tree
Hide file tree
Showing 33 changed files with 89 additions and 89 deletions.
2 changes: 1 addition & 1 deletion files/en-us/web/api/gpuadapter/requestdevice/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ async function init() {

const device = await adapter.requestDevice({
defaultQueue: {
label: "myqueue",
label: "my_queue",
},
requiredFeatures,
requiredLimits,
Expand Down
8 changes: 4 additions & 4 deletions files/en-us/web/api/gpubindgroup/label/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ const bindGroup = device.createBindGroup({
],
});

bindGroup.label = "my-bind-group";
bindGroup.label = "my_bind_group";

console.log(bindGroup.label); // "my-bind-group";
console.log(bindGroup.label); // "my_bind_group"
```

Setting a label via the originating {{domxref("GPUDevice.createBindGroup()")}} call, and then getting it via `GPUBindGroup.label`:
Expand All @@ -58,10 +58,10 @@ const bindGroup = device.createBindGroup({
},
},
],
label: "my-bind-group",
label: "my_bind_group",
});

console.log(bindGroup.label); // "my-bind-group";
console.log(bindGroup.label); // "my_bind_group"
```

## Specifications
Expand Down
8 changes: 4 additions & 4 deletions files/en-us/web/api/gpubindgrouplayout/label/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ const bindGroupLayout = device.createBindGroupLayout({
],
});

bindGroupLayout.label = "my-bind-group-layout";
bindGroupLayout.label = "my_bind_group_layout";

console.log(bindGroupLayout.label); // "my-bind-group-layout";
console.log(bindGroupLayout.label); // "my_bind_group_layout"
```

Setting a label via the originating {{domxref("GPUDevice.createBindGroupLayout()")}} call, and then getting it via `GPUBindGroupLayout.label`:
Expand All @@ -58,10 +58,10 @@ const bindGroupLayout = device.createBindGroupLayout({
},
},
],
label: "my-bind-group-layout",
label: "my_bind_group_layout",
});

console.log(bindGroupLayout.label); // "my-bind-group-layout";
console.log(bindGroupLayout.label); // "my_bind_group_layout"
```

## Specifications
Expand Down
8 changes: 4 additions & 4 deletions files/en-us/web/api/gpubuffer/label/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ const output = device.createBuffer({
usage: GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_SRC,
});

output.label = "my-buffer";
output.label = "my_buffer";

console.log(output.label); // "my-buffer"
console.log(output.label); // "my_buffer"
```

Setting a label via the originating {{domxref("GPUDevice.createBuffer()")}} call, and then getting it via `GPUBuffer.label`:
Expand All @@ -40,10 +40,10 @@ Setting a label via the originating {{domxref("GPUDevice.createBuffer()")}} call
const output = device.createBuffer({
size: BUFFER_SIZE,
usage: GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_SRC,
label: "my-buffer",
label: "my_buffer",
});

console.log(output.label); // "my-buffer"
console.log(output.label); // "my_buffer"
```

## Specifications
Expand Down
8 changes: 4 additions & 4 deletions files/en-us/web/api/gpucommandbuffer/label/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ Setting and getting a label via `GPUCommandBuffer.label`:

```js
const commandBuffer = commandEncoder.finish();
commandBuffer.label = "my-command-buffer";
console.log(commandBuffer.label); // "my-command-buffer";
commandBuffer.label = "my_command_buffer";
console.log(commandBuffer.label); // "my_command_buffer"
```

Setting a label via the originating {{domxref("GPUCommandEncoder.finish()")}} call, and then getting it via `GPUCommandBuffer.label`:

```js
const commandBuffer = commandEncoder.finish({
label: "my-command-buffer",
label: "my_command_buffer",
});

console.log(commandBuffer.label); // "my-command-buffer";
console.log(commandBuffer.label); // "my_command_buffer"
```

## Specifications
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ None ({{jsxref("Undefined")}}).
```js
// ...

commandEncoder.insertDebugMarker("my-marker");
commandEncoder.insertDebugMarker("my_marker");

// ...
```
Expand Down
8 changes: 4 additions & 4 deletions files/en-us/web/api/gpucommandencoder/label/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ Setting and getting a label via `GPUCommandEncoder.label`:

```js
const commandEncoder = device.createCommandEncoder();
commandEncoder.label = "my-command-encoder";
console.log(commandEncoder.label); // "my-command-encoder";
commandEncoder.label = "my_command_encoder";
console.log(commandEncoder.label); // "my_command_encoder"
```

Setting a label via the originating {{domxref("GPUDevice.createCommandEncoder()")}} call, and then getting it via `GPUCommandEncoder.label`:

```js
const commandEncoder = device.createCommandEncoder({
label: "my-command-encoder",
label: "my_command_encoder",
});

console.log(commandEncoder.label); // "my-command-encoder";
console.log(commandEncoder.label); // "my_command_encoder"
```

## Specifications
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ The following criteria must be met when calling **`popDebugGroup()`**, otherwise
```js
// ...

commandEncoder.pushDebugGroup("my-group-marker"); // Start labeled debug group
commandEncoder.pushDebugGroup("my_group_marker"); // Start labeled debug group

const passEncoder = commandEncoder.beginRenderPass(renderPassDescriptor);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ None ({{jsxref("Undefined")}}).
```js
// ...

commandEncoder.pushDebugGroup("my-group-marker"); // Start labeled debug group
commandEncoder.pushDebugGroup("my_group_marker"); // Start labeled debug group

const passEncoder = commandEncoder.beginRenderPass(renderPassDescriptor);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ None ({{jsxref("Undefined")}}).
```js
// ...

passEncoder.insertDebugMarker("my-marker");
passEncoder.insertDebugMarker("my_marker");

// ...
```
Expand Down
8 changes: 4 additions & 4 deletions files/en-us/web/api/gpucomputepassencoder/label/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ Setting and getting a label via `GPUComputePassEncoder.label`:
const commandEncoder = device.createCommandEncoder();
const passEncoder = commandEncoder.beginComputePass();

passEncoder.label = "my-compute-pass-encoder";
console.log(passEncoder.label); // "my-compute-pass-encoder"
passEncoder.label = "my_compute_pass_encoder";
console.log(passEncoder.label); // "my_compute_pass_encoder"
```

Setting a label via the originating {{domxref("GPUCommandEncoder.beginComputePass()")}} call, and then getting it via `GPUComputePassEncoder.label`:

```js
const commandEncoder = device.createCommandEncoder();
const passEncoder = commandEncoder.beginComputePass({
label: "my-compute-pass-encoder",
label: "my_compute_pass_encoder",
});

console.log(passEncoder.label); // "my-compute-pass-encoder"
console.log(passEncoder.label); // "my_compute_pass_encoder"
```

## Specifications
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ The following criteria must be met when calling **`popDebugGroup()`**, otherwise

const passEncoder = commandEncoder.beginComputePass();

passEncoder.pushDebugGroup("my-group-marker"); // Start labeled debug group
passEncoder.pushDebugGroup("my_group_marker"); // Start labeled debug group

passEncoder.setPipeline(computePipeline);
passEncoder.setBindGroup(0, bindGroup);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ None ({{jsxref("Undefined")}}).

const passEncoder = commandEncoder.beginComputePass();

passEncoder.pushDebugGroup("my-group-marker"); // Start labeled debug group
passEncoder.pushDebugGroup("my_group_marker"); // Start labeled debug group

passEncoder.setPipeline(computePipeline);
passEncoder.setBindGroup(0, bindGroup);
Expand Down
8 changes: 4 additions & 4 deletions files/en-us/web/api/gpucomputepipeline/label/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ const computePipeline = device.createComputePipeline({
},
});

computePipeline.label = "my-compute-pipeline";
computePipeline.label = "my_compute_pipeline";

console.log(computePipeline.label); // "my-compute-pipeline"
console.log(computePipeline.label); // "my_compute_pipeline"
```

Setting a label via a {{domxref("GPUDevice.createComputePipeline()")}} call, and then getting it via `GPUComputePipeline.label`:
Expand All @@ -54,10 +54,10 @@ const computePipeline = device.createComputePipeline({
module: shaderModule,
entryPoint: "main",
},
label: "my-compute-pipeline",
label: "my_compute_pipeline",
});

console.log(computePipeline.label); // "my-compute-pipeline"
console.log(computePipeline.label); // "my_compute_pipeline"
```

## Specifications
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/gpudevice/label/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ async function init() {
const device = await adapter.requestDevice();

// Set a label
device.label = "my-label";
device.label = "my_label";

// Get a label
console.log(device.label);
Expand Down
8 changes: 4 additions & 4 deletions files/en-us/web/api/gpuexternaltexture/label/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ const externalTexture = device.importExternalTexture({
source: video,
});

externalTexture.label = "myExtTexture";
externalTexture.label = "my_ext_texture";

console.log(externalTexture.label); // "myExtTexture"
console.log(externalTexture.label); // "my_ext_texture"
```

Setting a label via the originating {{domxref("GPUDevice.importExternalTexture()")}} call, and then getting it via `GPUExternalTexture.label`:
Expand All @@ -42,10 +42,10 @@ Setting a label via the originating {{domxref("GPUDevice.importExternalTexture()

const externalTexture = device.importExternalTexture({
source: video,
label: "myExtTexture",
label: "my_ext_texture",
});

console.log(externalTexture.label); // "myExtTexture"
console.log(externalTexture.label); // "my_ext_texture"
```

## Specifications
Expand Down
8 changes: 4 additions & 4 deletions files/en-us/web/api/gpupipelinelayout/label/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ const pipelineLayout = device.createPipelineLayout({
bindGroupLayouts: [bindGroupLayout],
});

pipelineLayout.label = "my-pipeline-layout";
pipelineLayout.label = "my_pipeline_layout";

console.log(pipelineLayout.label); // "my-pipeline-layout";
console.log(pipelineLayout.label); // "my_pipeline_layout"
```

Setting a label via the originating {{domxref("GPUDevice.createPipelineLayout()")}} call, and then getting it via `GPUPipelineLayout.label`:
Expand All @@ -42,10 +42,10 @@ Setting a label via the originating {{domxref("GPUDevice.createPipelineLayout()"

const pipelineLayout = device.createPipelineLayout({
bindGroupLayouts: [bindGroupLayout],
label: "my-pipeline-layout",
label: "my_pipeline_layout",
});

console.log(pipelineLayout.label); // "my-pipeline-layout";
console.log(pipelineLayout.label); // "my_pipeline_layout"
```

## Specifications
Expand Down
8 changes: 4 additions & 4 deletions files/en-us/web/api/gpuqueryset/label/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ const querySet = device.createQuerySet({
count: 32,
});

querySet.label = "my-query-set";
querySet.label = "my_query_set";

console.log(querySet.label); // "my-query-set"
console.log(querySet.label); // "my_query_set"
```

Setting a label via the originating {{domxref("GPUDevice.createQuerySet()")}} call, and then getting it via `GPUQuerySet.label`:
Expand All @@ -40,10 +40,10 @@ Setting a label via the originating {{domxref("GPUDevice.createQuerySet()")}} ca
const querySet = device.createQuerySet({
type: "occlusion",
count: 32,
label: "my-query-set",
label: "my_query_set",
});

console.log(querySet.label); // "my-query-set"
console.log(querySet.label); // "my_query_set"
```

## Specifications
Expand Down
6 changes: 3 additions & 3 deletions files/en-us/web/api/gpuqueue/label/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ A string. If no label value has previously been set, getting the label returns a
Setting and getting a label via `GPUQueue.label`:

```js
device.queue.label = "myqueue";
console.log(device.queue.label); // "myqueue"
device.queue.label = "my_queue";
console.log(device.queue.label); // "my_queue"
```

You can also set the queue's label at the time you request the device, like this:

```js
const device = adapter.requestDevice({
defaultQueue: { label: "myqueue" },
defaultQueue: { label: "my_queue" },
});
```

Expand Down
8 changes: 4 additions & 4 deletions files/en-us/web/api/gpurenderbundle/label/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@ Setting and getting a label via `GPURenderBundle.label`:
```js
const renderBundle = renderBundleEncoder.finish();

renderBundle.label = "my-render-bundle";
console.log(renderBundle.label); // "my-render-bundle"
renderBundle.label = "my_render_bundle";
console.log(renderBundle.label); // "my_render_bundle"
```

Setting a label via the originating {{domxref("GPURenderBundleEncoder.finish()")}} call, and then getting it via `GPURenderBundle.label`:

```js
const renderBundle = renderBundleEncoder.finish({
label: "my-render-bundle",
label: "my_render_bundle",
});

console.log(renderBundle.label); // "my-render-bundle"
console.log(renderBundle.label); // "my_render_bundle"
```

## Specifications
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ None ({{jsxref("Undefined")}}).
```js
// ...

bundleEncoder.insertDebugMarker("my-marker");
bundleEncoder.insertDebugMarker("my_marker");

// ...
```
Expand Down
8 changes: 4 additions & 4 deletions files/en-us/web/api/gpurenderbundleencoder/label/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,19 @@ const renderBundleEncoder = device.createRenderBundleEncoder({
colorFormats: [presentationFormat],
});

renderBundleEncoder.label = "my-render-bundle-encoder";
console.log(renderBundleEncoder.label); // "my-render-bundle-encoder"
renderBundleEncoder.label = "my_render_bundle_encoder";
console.log(renderBundleEncoder.label); // "my_render_bundle_encoder"
```

Setting a label via the originating {{domxref("GPUDevice.createRenderBundleEncoder()")}} call, and then getting it via `GPURenderBundleEncoder.label`:

```js
const renderBundleEncoder = device.createRenderBundleEncoder({
colorFormats: [presentationFormat],
label: "my-render-bundle-encoder",
label: "my_render_bundle_encoder",
});

console.log(renderBundleEncoder.label); // "my-render-bundle-encoder"
console.log(renderBundleEncoder.label); // "my_render_bundle_encoder"
```

## Specifications
Expand Down
Loading

0 comments on commit 3882709

Please sign in to comment.